diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/src.s60/applicationregistrator/applicationregistrator.cpp --- a/javamanager/javainstaller/installer/src.s60/applicationregistrator/applicationregistrator.cpp Tue Jul 06 20:36:19 2010 +0300 +++ b/javamanager/javainstaller/installer/src.s60/applicationregistrator/applicationregistrator.cpp Fri Jul 09 16:35:45 2010 +0300 @@ -51,6 +51,7 @@ // NAMESPACE DECLARATION using namespace java; +#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK /** * MIDP Stub SIS file UID. The application type Uid for MIDlets in S60 */ @@ -66,6 +67,13 @@ */ _LIT(KAppPostfix, ".fakeapp"); + +#ifdef RD_JAVA_S60_RELEASE_9_2 +const TInt KAppIconCount = 2; +#else +const TInt KAppIconCount = 1; +#endif + // ------------------------ /** @@ -80,14 +88,6 @@ jboolean aBackground); /** - * Internal helper method for checking whether Application Shell is already running - * Used JNI method ...1startAppShellUi - * - * @return ETrue if AppShell is running - */ -TBool isAppShellUiRunning(); - -/** * Internal helper method for checking whether this code is executing in * a device that has correctly working version of * RApaLsSession::ForceCommitNonNativeApplicationsUpdatesL() @@ -95,6 +95,15 @@ * @return ETrue if force commit works well */ TBool isForceCommitSupported(); +#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK + +/** + * Internal helper method for checking whether Application Shell is already running + * Used JNI method ...1startAppShellUi + * + * @return ETrue if AppShell is running + */ +TBool isAppShellUiRunning(); /** * Internal helper method for starting menu application @@ -129,7 +138,7 @@ return err; } -#ifndef RD_JAVA_USIF_APP_REG +#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK // Delete any pending (un)registrations (possible if // e.g. device rebooted before commit). // This call does nothing if there is no pending registrations. @@ -144,7 +153,7 @@ pApaSession->Close(); return err; } -#endif // RD_JAVA_USIF_APP_REG +#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK // Return handle to session. Utilize the fact that in Symbian // all pointer addresses are MOD 4 so the last 2 bits are 0 @@ -168,7 +177,7 @@ * @param[in] aBackground * @return 0 if registration succeeded or Symbian error code */ -#ifdef RD_JAVA_USIF_APP_REG +#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_ApplicationRegistrator__1registerApplication (JNIEnv */*aEnv*/, jclass /*aClass*/, jint /*aSessionHandle*/, jint /*aUid*/, jstring /*aGroupName*/, jstring /*aMIDletName*/, jstring /*aTargetDrive*/, jstring /*aIconFileName*/, @@ -176,7 +185,7 @@ { return KErrNone; } -#else +#else // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_ApplicationRegistrator__1registerApplication (JNIEnv *aEnv, jclass aClass, jint aSessionHandle, jint aUid, jstring aGroupName, jstring aMIDletName, jstring aTargetDrive, jstring aIconFileName, @@ -343,7 +352,6 @@ return err; } -#endif // RD_JAVA_USIF_APP_REG /** @@ -359,7 +367,7 @@ RFile appArcIcon; TUid midletUid; TInt err; - TInt numberOfIcons = 1; // Conversion results always one icon in mbm. + TInt numberOfIcons = KAppIconCount; // number of icons stored in MBM // Also default mbm has one icon. midletUid.iUid = aUid; @@ -475,6 +483,7 @@ return err; } +#endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK /** @@ -484,13 +493,13 @@ * @param[in] aUid The Uid of the application to be unregistered.. * @return 0 if unregistration succeeded or Symbian error code */ -#ifdef RD_JAVA_USIF_APP_REG +#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_ApplicationRegistrator__1unregisterApplication (JNIEnv *, jclass, jint /*aSessionHandle*/, jint /*aUid*/) { return KErrNone; } -#else +#else // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_ApplicationRegistrator__1unregisterApplication (JNIEnv *, jclass, jint aSessionHandle, jint aUid) { @@ -503,7 +512,7 @@ TRAPD(err, pApaSession->DeregisterNonNativeApplicationL(appUid)); return err; } -#endif // RD_JAVA_USIF_APP_REG +#endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK /** @@ -524,7 +533,7 @@ TInt err = KErrNone; -#ifndef RD_JAVA_USIF_APP_REG +#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK if (aSynchronous) { // Make synchronous commit @@ -552,12 +561,12 @@ // Use always this synchronous commit when running in emulator // to make writing autotest cases easier. TRAP(err, pApaSession->CommitNonNativeApplicationsUpdatesL()); -#else +#else // __WINS__ // asynchronous commit TRAP(err, pApaSession->ForceCommitNonNativeApplicationsUpdatesL()); #endif // __WINS__ } -#endif // RD_JAVA_USIF_APP_REG +#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK if (KErrNone == err) { @@ -582,9 +591,9 @@ reinterpret_cast(aSessionHandle<<2); TInt err = KErrNone; -#ifndef RD_JAVA_USIF_APP_REG +#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK err = pApaSession->RollbackNonNativeApplicationsUpdates(); -#endif // RD_JAVA_USIF_APP_REG +#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK pApaSession->Close(); delete pApaSession; @@ -925,6 +934,7 @@ } +#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK /** * Internal helper method for checking whether this code is executing in * a device that has correctly working version of @@ -969,3 +979,4 @@ return EFalse; } } +#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK