equal
deleted
inserted
replaced
61 const wchar_t* const RUNTIME_MAIN_CLASS = L"com.nokia.mj.impl.rt.midp.Main"; |
61 const wchar_t* const RUNTIME_MAIN_CLASS = L"com.nokia.mj.impl.rt.midp.Main"; |
62 const wchar_t* const TRUE_WSTR = L"true"; |
62 const wchar_t* const TRUE_WSTR = L"true"; |
63 |
63 |
64 |
64 |
65 MidpRuntimeStarter::MidpRuntimeStarter(): mMidletInfo(new MidletInfo()), // codescanner::nonleavenew |
65 MidpRuntimeStarter::MidpRuntimeStarter(): mMidletInfo(new MidletInfo()), // codescanner::nonleavenew |
66 mRuntimeState(Constructed), mShudownOk(false) |
66 mRuntimeState(Constructed), mShudownOk(false) |
67 { |
67 { |
68 JELOG2(EJavaRuntime); |
68 JELOG2(EJavaRuntime); |
69 } |
69 } |
70 |
70 |
71 MidpRuntimeStarter::~MidpRuntimeStarter() |
71 MidpRuntimeStarter::~MidpRuntimeStarter() |
348 } |
348 } |
349 } |
349 } |
350 |
350 |
351 void MidpRuntimeStarter::startCoreUi(std::auto_ptr<java::util::DynamicLibLoader>& coreUiLoader) |
351 void MidpRuntimeStarter::startCoreUi(std::auto_ptr<java::util::DynamicLibLoader>& coreUiLoader) |
352 { |
352 { |
353 CoreUi& coreUi = CoreUi::getUiInstance(coreUiLoader); |
|
354 |
|
355 // Create the default UI only if not going into pre-warmed state. |
353 // Create the default UI only if not going into pre-warmed state. |
356 if (!mMidletInfo->mPreWarmStart) |
354 if (!mMidletInfo->mPreWarmStart) |
357 { |
355 { |
358 |
356 |
359 // Open a session to JavaStorage. |
357 // Open a session to JavaStorage. |
440 uiParams.setBackgroundStart(true); |
438 uiParams.setBackgroundStart(true); |
441 } |
439 } |
442 |
440 |
443 // Start the coreUI. |
441 // Start the coreUI. |
444 JavaOsLayer::startUpTrace("Starting CoreUI", -1, -1); |
442 JavaOsLayer::startUpTrace("Starting CoreUI", -1, -1); |
445 coreUi.start(mMidletInfo->mMIDletUid, &uiParams); |
443 CoreUi::start(coreUiLoader, mMidletInfo->mMIDletUid, &uiParams); |
446 JavaOsLayer::startUpTrace("CoreUI started", -1, -1); |
444 JavaOsLayer::startUpTrace("CoreUI started", -1, -1); |
447 |
445 |
448 getMIDletSuiteInfoFromStorage(javaStorage.get(), JAR_PATH, |
446 getMIDletSuiteInfoFromStorage(javaStorage.get(), JAR_PATH, |
449 mMidletInfo->mClassPath); |
447 mMidletInfo->mClassPath); |
450 } |
448 } |
608 { |
606 { |
609 wchar_t c = str[pos]; |
607 wchar_t c = str[pos]; |
610 if (c & 0xFF00) |
608 if (c & 0xFF00) |
611 { |
609 { |
612 // 16 bit char, must send all bits |
610 // 16 bit char, must send all bits |
613 res += ( L'A' + (c >> 12) ); |
611 res += (L'A' + (c >> 12)); |
614 res += ( L'A' + ((c & 0x0F00) >> 8) ); |
612 res += (L'A' + ((c & 0x0F00) >> 8)); |
615 res += ( L'A' + ((c & 0x00F0) >> 4) ); |
613 res += (L'A' + ((c & 0x00F0) >> 4)); |
616 res += ( L'A' + ((c & 0x000F)) ); |
614 res += (L'A' + ((c & 0x000F))); |
617 } |
615 } |
618 else |
616 else |
619 { |
617 { |
620 // 8 bit char, send only lowest 8 bits |
618 // 8 bit char, send only lowest 8 bits |
621 res += ( L'a' + ((c & 0x00F0) >> 4) ); |
619 res += (L'a' + ((c & 0x00F0) >> 4)); |
622 res += ( L'a' + ((c & 0x000F)) ); |
620 res += (L'a' + ((c & 0x000F))); |
623 } |
621 } |
624 } |
622 } |
625 |
623 |
626 return res; |
624 return res; |
627 } |
625 } |