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 |
353 // Create the default UI only if not going into pre-warmed state. |
355 // Create the default UI only if not going into pre-warmed state. |
354 if (!mMidletInfo->mPreWarmStart) |
356 if (!mMidletInfo->mPreWarmStart) |
355 { |
357 { |
356 |
358 |
357 // Open a session to JavaStorage. |
359 // Open a session to JavaStorage. |
438 uiParams.setBackgroundStart(true); |
440 uiParams.setBackgroundStart(true); |
439 } |
441 } |
440 |
442 |
441 // Start the coreUI. |
443 // Start the coreUI. |
442 JavaOsLayer::startUpTrace("Starting CoreUI", -1, -1); |
444 JavaOsLayer::startUpTrace("Starting CoreUI", -1, -1); |
443 CoreUi::start(coreUiLoader, mMidletInfo->mMIDletUid, &uiParams); |
445 coreUi.start(mMidletInfo->mMIDletUid, &uiParams); |
444 JavaOsLayer::startUpTrace("CoreUI started", -1, -1); |
446 JavaOsLayer::startUpTrace("CoreUI started", -1, -1); |
445 |
447 |
446 getMIDletSuiteInfoFromStorage(javaStorage.get(), JAR_PATH, |
448 getMIDletSuiteInfoFromStorage(javaStorage.get(), JAR_PATH, |
447 mMidletInfo->mClassPath); |
449 mMidletInfo->mClassPath); |
448 } |
450 } |
606 { |
608 { |
607 wchar_t c = str[pos]; |
609 wchar_t c = str[pos]; |
608 if (c & 0xFF00) |
610 if (c & 0xFF00) |
609 { |
611 { |
610 // 16 bit char, must send all bits |
612 // 16 bit char, must send all bits |
611 res += (L'A' + (c >> 12)); |
613 res += ( L'A' + (c >> 12) ); |
612 res += (L'A' + ((c & 0x0F00) >> 8)); |
614 res += ( L'A' + ((c & 0x0F00) >> 8) ); |
613 res += (L'A' + ((c & 0x00F0) >> 4)); |
615 res += ( L'A' + ((c & 0x00F0) >> 4) ); |
614 res += (L'A' + ((c & 0x000F))); |
616 res += ( L'A' + ((c & 0x000F)) ); |
615 } |
617 } |
616 else |
618 else |
617 { |
619 { |
618 // 8 bit char, send only lowest 8 bits |
620 // 8 bit char, send only lowest 8 bits |
619 res += (L'a' + ((c & 0x00F0) >> 4)); |
621 res += ( L'a' + ((c & 0x00F0) >> 4) ); |
620 res += (L'a' + ((c & 0x000F))); |
622 res += ( L'a' + ((c & 0x000F)) ); |
621 } |
623 } |
622 } |
624 } |
623 |
625 |
624 return res; |
626 return res; |
625 } |
627 } |