equal
deleted
inserted
replaced
30 #include <Oma2Agent.h> |
30 #include <Oma2Agent.h> |
31 #include <s32file.h> |
31 #include <s32file.h> |
32 #include <e32property.h> |
32 #include <e32property.h> |
33 #include <sacls.h> |
33 #include <sacls.h> |
34 |
34 |
|
35 /* HLa - temporary java remove |
35 #ifdef USE_OLD_JAVA_API |
36 #ifdef USE_OLD_JAVA_API |
36 #include <mjavaregistry.h> |
37 #include <mjavaregistry.h> |
37 #include <swi/minstalledappsregistry.h> |
38 #include <swi/minstalledappsregistry.h> |
38 #else |
39 #else |
39 #include <javaregistry.h> |
40 #include <javaregistry.h> |
40 #include <javaregistrypackageentry.h> |
41 #include <javaregistrypackageentry.h> |
41 |
42 |
42 using namespace Java; |
43 using namespace Java; |
43 #endif |
44 #endif |
44 |
45 */ |
45 #include "ncdinstallationserviceobserver.h" |
46 #include "ncdinstallationserviceobserver.h" |
46 #include "ncdactiveoperationobserver.h" |
47 #include "ncdactiveoperationobserver.h" |
47 #include "ncdsilentinstallactiveobserver.h" |
48 #include "ncdsilentinstallactiveobserver.h" |
48 #include "ncderrors.h" |
49 #include "ncderrors.h" |
49 #include "catalogsutils.h" |
50 #include "catalogsutils.h" |
53 _LIT( KJadFileExtension, ".jad" ); |
54 _LIT( KJadFileExtension, ".jad" ); |
54 const TInt KDelayWhenAppListInvalid = 500000; |
55 const TInt KDelayWhenAppListInvalid = 500000; |
55 |
56 |
56 const TUint KFileOpenFlags = EFileShareReadersOrWriters; |
57 const TUint KFileOpenFlags = EFileShareReadersOrWriters; |
57 |
58 |
|
59 /* HLa - temporary java remove |
58 #ifdef __SERIES60_31__ |
60 #ifdef __SERIES60_31__ |
59 |
61 |
60 const TInt32 KPSUidJavaLatestInstallation = KUidJmiLatestInstallation; |
62 const TInt32 KPSUidJavaLatestInstallation = KUidJmiLatestInstallation; |
61 |
63 |
62 #else |
64 #else |
65 // This should become available at some point in javadomainpskeys.h |
67 // This should become available at some point in javadomainpskeys.h |
66 //const TInt32 KPSUidJavaLatestInstallation = 0x10282567; |
68 //const TInt32 KPSUidJavaLatestInstallation = 0x10282567; |
67 #include <javadomainpskeys.h> |
69 #include <javadomainpskeys.h> |
68 |
70 |
69 #endif |
71 #endif |
|
72 */ |
70 |
73 |
71 // length taken from WidgetRegistryData.h |
74 // length taken from WidgetRegistryData.h |
72 const TInt KWidgetBundleIdLength = KWidgetRegistryVal + 1; |
75 const TInt KWidgetBundleIdLength = KWidgetRegistryVal + 1; |
73 |
76 |
74 _LIT( KWidgetExtension, ".wgz" ); |
77 _LIT( KWidgetExtension, ".wgz" ); |
131 iFs.Close(); |
134 iFs.Close(); |
132 iAknsSrv.Close(); |
135 iAknsSrv.Close(); |
133 delete iInstallationCompleteCallback; |
136 delete iInstallationCompleteCallback; |
134 delete iJadFileName; |
137 delete iJadFileName; |
135 delete iRecognizedMime; |
138 delete iRecognizedMime; |
|
139 |
|
140 /* HLa - temporary java remove |
136 #ifdef USE_OLD_JAVA_API |
141 #ifdef USE_OLD_JAVA_API |
137 iMIDletUids.Close(); |
142 iMIDletUids.Close(); |
138 #endif |
143 #endif |
139 iApaLs.Close(); |
144 iApaLs.Close(); |
|
145 */ |
|
146 |
140 if( iThemes ) |
147 if( iThemes ) |
141 { |
148 { |
142 iThemes->ResetAndDestroy(); |
149 iThemes->ResetAndDestroy(); |
143 delete iThemes; |
150 delete iThemes; |
144 } |
151 } |
491 // --------------------------------------------------------------------------- |
498 // --------------------------------------------------------------------------- |
492 // Open java suite entry |
499 // Open java suite entry |
493 // |
500 // |
494 // --------------------------------------------------------------------------- |
501 // --------------------------------------------------------------------------- |
495 // |
502 // |
|
503 |
496 #ifdef USE_OLD_JAVA_API |
504 #ifdef USE_OLD_JAVA_API |
497 |
505 |
498 TBool CNcdInstallationService::JavaAppExistsL( |
506 TBool CNcdInstallationService::JavaAppExistsL( |
499 const TUid& aUid ) |
507 const TUid& aUid ) |
500 { |
508 { |
|
509 |
|
510 /* HLa - temporary java remove |
501 DLTRACEIN(("")); |
511 DLTRACEIN(("")); |
502 |
512 |
503 MJavaRegistry* javaRegistry = MJavaRegistry::CreateL(); |
513 MJavaRegistry* javaRegistry = MJavaRegistry::CreateL(); |
504 CleanupReleasePushL( *javaRegistry ); |
514 CleanupReleasePushL( *javaRegistry ); |
505 |
515 |
513 |
523 |
514 LeaveIfNotErrorL( err, KErrNotFound ); |
524 LeaveIfNotErrorL( err, KErrNotFound ); |
515 |
525 |
516 CleanupStack::PopAndDestroy( javaRegistry ); |
526 CleanupStack::PopAndDestroy( javaRegistry ); |
517 return err == KErrNone; |
527 return err == KErrNone; |
|
528 */ |
|
529 |
518 } |
530 } |
519 |
531 |
520 #else |
532 #else |
521 |
533 |
522 TBool CNcdInstallationService::JavaAppExistsL( |
534 TBool CNcdInstallationService::JavaAppExistsL( |
523 const TUid& aUid ) |
535 const TUid& aUid ) |
524 { |
536 { |
525 DLTRACEIN(("")); |
537 DLTRACEIN(("")); |
|
538 /* HLa - temporary java remove |
526 |
539 |
527 CJavaRegistry* javaRegistry = CJavaRegistry::NewLC(); |
540 CJavaRegistry* javaRegistry = CJavaRegistry::NewLC(); |
528 |
541 |
529 TBool exists = javaRegistry->RegistryEntryExistsL( aUid ); |
542 TBool exists = javaRegistry->RegistryEntryExistsL( aUid ); |
530 |
543 |
531 CleanupStack::PopAndDestroy( javaRegistry ); |
544 CleanupStack::PopAndDestroy( javaRegistry ); |
532 return exists; |
545 return exists; |
|
546 */ |
|
547 |
533 } |
548 } |
534 |
549 |
535 #endif |
550 #endif |
536 |
551 |
|
552 |
537 // --------------------------------------------------------------------------- |
553 // --------------------------------------------------------------------------- |
538 // Checks the application status |
554 // Checks the application status |
539 // --------------------------------------------------------------------------- |
555 // --------------------------------------------------------------------------- |
540 // |
556 // |
541 TNcdApplicationStatus CNcdInstallationService::IsApplicationInstalledL( |
557 TNcdApplicationStatus CNcdInstallationService::IsApplicationInstalledL( |
1447 iInstallError = KErrNone; |
1463 iInstallError = KErrNone; |
1448 |
1464 |
1449 #ifdef USE_OLD_JAVA_API |
1465 #ifdef USE_OLD_JAVA_API |
1450 // Store installed java app uids before installation to see |
1466 // Store installed java app uids before installation to see |
1451 // which one is a new java app later. |
1467 // which one is a new java app later. |
|
1468 /* HLa - temporary java remove |
1452 MJavaRegistry* javaRegistry = MJavaRegistry::CreateL(); |
1469 MJavaRegistry* javaRegistry = MJavaRegistry::CreateL(); |
1453 CleanupReleasePushL( *javaRegistry ); |
1470 CleanupReleasePushL( *javaRegistry ); |
1454 iMIDletUids.Reset(); |
1471 iMIDletUids.Reset(); |
1455 javaRegistry->InstalledMIDletUidsL( iMIDletUids ); |
1472 javaRegistry->InstalledMIDletUidsL( iMIDletUids ); |
1456 CleanupStack::PopAndDestroy( javaRegistry ); |
1473 CleanupStack::PopAndDestroy( javaRegistry ); |
|
1474 */ |
1457 #endif |
1475 #endif |
1458 |
1476 |
1459 // In platform security systems JAR and JAD has to be in same folder |
1477 // In platform security systems JAR and JAD has to be in same folder |
1460 // to get the installation process work correctly. |
1478 // to get the installation process work correctly. |
1461 // First form the JAD filename from the JAR filename. |
1479 // First form the JAD filename from the JAR filename. |
1826 // |
1844 // |
1827 #ifdef USE_OLD_JAVA_API |
1845 #ifdef USE_OLD_JAVA_API |
1828 |
1846 |
1829 void CNcdInstallationService::MidletUidsL( RArray<TUid>& aUids ) |
1847 void CNcdInstallationService::MidletUidsL( RArray<TUid>& aUids ) |
1830 { |
1848 { |
|
1849 /* HLa - temporary java remove |
1831 DLTRACEIN(("")); |
1850 DLTRACEIN(("")); |
1832 MJavaRegistry* javaRegistry = MJavaRegistry::CreateL(); |
1851 MJavaRegistry* javaRegistry = MJavaRegistry::CreateL(); |
1833 CleanupReleasePushL( *javaRegistry ); |
1852 CleanupReleasePushL( *javaRegistry ); |
1834 javaRegistry->InstalledMIDletUidsL( aUids ); |
1853 javaRegistry->InstalledMIDletUidsL( aUids ); |
1835 CleanupStack::PopAndDestroy( javaRegistry ); |
1854 CleanupStack::PopAndDestroy( javaRegistry ); |
|
1855 */ |
1836 } |
1856 } |
1837 |
1857 |
1838 #else |
1858 #else |
1839 |
1859 |
1840 void CNcdInstallationService::MidletUidsL( RArray<TUid>& aUids ) |
1860 void CNcdInstallationService::MidletUidsL( RArray<TUid>& aUids ) |
1841 { |
1861 { |
|
1862 /* HLa - temporary java remove |
1842 DLTRACEIN(("")); |
1863 DLTRACEIN(("")); |
1843 CJavaRegistry* javaRegistry = CJavaRegistry::NewLC(); |
1864 CJavaRegistry* javaRegistry = CJavaRegistry::NewLC(); |
1844 javaRegistry->GetRegistryEntryUidsL( aUids ); |
1865 javaRegistry->GetRegistryEntryUidsL( aUids ); |
1845 CleanupStack::PopAndDestroy( javaRegistry ); |
1866 CleanupStack::PopAndDestroy( javaRegistry ); |
|
1867 */ |
1846 } |
1868 } |
1847 |
1869 |
1848 #endif |
1870 #endif |
1849 |
1871 |
1850 |
1872 |
1862 // --------------------------------------------------------------------------- |
1884 // --------------------------------------------------------------------------- |
1863 // Returns the UID of the latest installed midlet, NULL UID if none have |
1885 // Returns the UID of the latest installed midlet, NULL UID if none have |
1864 // been installed since the last device restart |
1886 // been installed since the last device restart |
1865 // --------------------------------------------------------------------------- |
1887 // --------------------------------------------------------------------------- |
1866 // |
1888 // |
|
1889 |
|
1890 /* HLa - temporary java remove |
1867 #ifdef USE_OLD_JAVA_API |
1891 #ifdef USE_OLD_JAVA_API |
1868 |
1892 |
1869 TUid CNcdInstallationService::LatestMidletUidL( |
1893 TUid CNcdInstallationService::LatestMidletUidL( |
1870 MJavaRegistry& aJavaRegistry ) const |
1894 MJavaRegistry& aJavaRegistry ) const |
1871 { |
1895 { |
1971 return midletUid; |
1995 return midletUid; |
1972 } |
1996 } |
1973 |
1997 |
1974 |
1998 |
1975 #endif |
1999 #endif |
|
2000 */ |
1976 |
2001 |
1977 // --------------------------------------------------------------------------- |
2002 // --------------------------------------------------------------------------- |
1978 // Returns true if the MIME type matches a Java application or descriptor |
2003 // Returns true if the MIME type matches a Java application or descriptor |
1979 // --------------------------------------------------------------------------- |
2004 // --------------------------------------------------------------------------- |
1980 // |
2005 // |
1986 } |
2011 } |
1987 |
2012 |
1988 |
2013 |
1989 #ifdef USE_OLD_JAVA_API |
2014 #ifdef USE_OLD_JAVA_API |
1990 |
2015 |
|
2016 |
1991 TUid CNcdInstallationService::InstalledMidletUidL() |
2017 TUid CNcdInstallationService::InstalledMidletUidL() |
1992 { |
2018 { |
|
2019 |
|
2020 /* HLa - temporary java remove |
1993 DLTRACEIN(("")); |
2021 DLTRACEIN(("")); |
1994 RArray<TUid> MIDletUids; |
2022 RArray<TUid> MIDletUids; |
1995 CleanupClosePushL( MIDletUids ); |
2023 CleanupClosePushL( MIDletUids ); |
1996 |
2024 |
1997 MJavaRegistry* javaRegistry = MJavaRegistry::CreateL(); |
2025 MJavaRegistry* javaRegistry = MJavaRegistry::CreateL(); |
2022 CleanupStack::PopAndDestroy( javaRegistry ); |
2050 CleanupStack::PopAndDestroy( javaRegistry ); |
2023 CleanupStack::PopAndDestroy( &MIDletUids ); |
2051 CleanupStack::PopAndDestroy( &MIDletUids ); |
2024 |
2052 |
2025 iMIDletUids.Reset(); |
2053 iMIDletUids.Reset(); |
2026 return MIDletUid; |
2054 return MIDletUid; |
|
2055 */ |
|
2056 |
2027 } |
2057 } |
2028 |
2058 |
2029 #else // USE_OLD_JAVA_API |
2059 #else // USE_OLD_JAVA_API |
2030 |
2060 |
2031 TUid CNcdInstallationService::InstalledMidletUidL() |
2061 TUid CNcdInstallationService::InstalledMidletUidL() |
2032 { |
2062 { |
|
2063 /* HLa - temporary java remove |
2033 DLTRACEIN(("")); |
2064 DLTRACEIN(("")); |
2034 CJavaRegistry* registry = CJavaRegistry::NewLC(); |
2065 CJavaRegistry* registry = CJavaRegistry::NewLC(); |
2035 TUid midletUid = LatestMidletUidL( *registry ); |
2066 TUid midletUid = LatestMidletUidL( *registry ); |
2036 CleanupStack::PopAndDestroy( registry ); |
2067 CleanupStack::PopAndDestroy( registry ); |
2037 return midletUid; |
2068 return midletUid; |
|
2069 */ |
2038 } |
2070 } |
2039 |
2071 |
2040 #endif // USE_OLD_JAVA_API |
2072 #endif // USE_OLD_JAVA_API |
2041 |
2073 |
2042 |
2074 |