1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
395 else |
395 else |
396 { |
396 { |
397 LOG(EJavaRuntime, EInfo, "Nokia-MIDlet-App-Orientation not defined"); |
397 LOG(EJavaRuntime, EInfo, "Nokia-MIDlet-App-Orientation not defined"); |
398 } |
398 } |
399 |
399 |
400 // Check if the MIDlet has defined the MIDlet-Splash-Screen-Image |
400 // Check if the MIDlet has defined the Nokia-MIDlet-Splash-Screen-Image |
401 // JAD attribute. |
401 // JAD attribute. |
402 std::auto_ptr<std::wstring> splashScreen |
402 std::auto_ptr<std::wstring> splashScreen |
403 (getMidletAttributeFromStorage(*javaStorage.get(), |
403 (getMidletAttributeFromStorage(*javaStorage.get(), |
404 L"MIDlet-Splash-Screen-Image")); |
404 L"Nokia-MIDlet-Splash-Screen-Image")); |
405 if (splashScreen.get() != 0) |
405 if (splashScreen.get() != 0) |
406 { |
406 { |
407 std::transform(splashScreen->begin(), splashScreen->end(), |
407 std::transform(splashScreen->begin(), splashScreen->end(), |
408 splashScreen->begin(), tolower); |
408 splashScreen->begin(), tolower); |
409 if (*splashScreen == L"suppress") |
409 if (*splashScreen == L"suppress") |
410 { |
410 { |
411 // If MIDlet-Splash-Screen-Image JAD attribute is suppress then |
411 // If Nokia-MIDlet-Splash-Screen-Image JAD attribute is suppress then |
412 // we start the UI into background. |
412 // we start the UI into background. |
413 LOG(EJavaRuntime, EInfo, "MIDlet-Splash-Screen-Image is suppress"); |
413 LOG(EJavaRuntime, EInfo, "Nokia-MIDlet-Splash-Screen-Image is suppress"); |
414 uiParams.setScreenMode(NO_START_SCREEN); |
414 uiParams.setScreenMode(NO_START_SCREEN); |
415 uiParams.setBackgroundStart(true); |
415 uiParams.setBackgroundStart(true); |
416 } |
416 } |
417 else |
417 else |
418 { |
418 { |
419 // If MIDlet-Splash-Screen-Image JAD attribute is not suppress then |
419 // If Nokia-MIDlet-Splash-Screen-Image JAD attribute is not suppress then |
420 // we need to solve the root path of the MIDlet and provide that |
420 // we need to solve the root path of the MIDlet and provide that |
421 // to the coreUI. |
421 // to the coreUI. |
422 uiParams.setScreenMode(MIDLET_DEFINED_SCREEN); |
422 uiParams.setScreenMode(MIDLET_DEFINED_SCREEN); |
423 LOG1(EJavaRuntime, EInfo, "MIDlet-Splash-Screen-Image, setPath to %S", |
423 LOG1(EJavaRuntime, EInfo, "Nokia-MIDlet-Splash-Screen-Image, setPath to %S", |
424 mMidletInfo->mMIDletRootPath.c_str()); |
424 mMidletInfo->mMIDletRootPath.c_str()); |
425 } |
425 } |
426 } |
426 } |
427 else |
427 else |
428 { |
428 { |
429 LOG(EJavaRuntime, EInfo, "MIDlet-Splash-Screen-Image not defined"); |
429 LOG(EJavaRuntime, EInfo, "Nokia-MIDlet-Splash-Screen-Image not defined"); |
430 uiParams.setScreenMode(DEFAULT_START_SCREEN); |
430 uiParams.setScreenMode(DEFAULT_START_SCREEN); |
431 } |
431 } |
432 |
432 |
433 getRootPath(); |
433 getRootPath(); |
434 uiParams.setImagePath(mMidletInfo->mMIDletRootPath); |
434 uiParams.setImagePath(mMidletInfo->mMIDletRootPath); |