Binary file build/loc/resources.jar has changed
--- a/build/makefile.javaversion Wed Sep 01 12:33:18 2010 +0100
+++ b/build/makefile.javaversion Tue Sep 14 21:06:50 2010 +0300
@@ -1,2 +1,2 @@
# Set Java version (must be dot separated, without spaces)
-JAVA_VERSION = 2.2.9
+JAVA_VERSION = 2.2.11
--- a/build/symbian_uids.pri Wed Sep 01 12:33:18 2010 +0100
+++ b/build/symbian_uids.pri Tue Sep 14 21:06:50 2010 +0300
@@ -123,6 +123,7 @@
contains(TARGET, javacaptain_ext_autostarter): TARGET.UID3 = 0x2002EA7E
contains(TARGET, javacontrolpanel): TARGET.UID3 = 0x2002FF62
contains(TARGET, eswtqtwebkit): TARGET.UID3 = 0x2002FFA9
+contains(TARGET, javaopengles): TARGET.UID3 = 0x20031DD1
isEmpty(TARGET.UID3): error($${TEMPLATE} $${TARGET} : UID3 not defined. Please allocate UID3 and configure it either on $${TARGET}.pro file or in command symbian_uids.pri)
--- a/inc/build_defines.hrh Wed Sep 01 12:33:18 2010 +0100
+++ b/inc/build_defines.hrh Tue Sep 14 21:06:50 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-#define RD_JAVA_VERSION 2,2,9
+#define RD_JAVA_VERSION 2,2,11
#define RD_JAVA_SYMBIAN_TARGET
#define RD_JAVA_S60_RELEASE_9_2
#define RD_JAVA_S60_RELEASE_9_2_ONWARDS
--- a/inc/java.txt Wed Sep 01 12:33:18 2010 +0100
+++ b/inc/java.txt Tue Sep 14 21:06:50 2010 +0300
@@ -1,1 +1,1 @@
-2.2.9
+2.2.11
--- a/javacommons/comms/ipclib/clientserver/src.s60/creceiver.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/comms/ipclib/clientserver/src.s60/creceiver.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -33,8 +33,20 @@
CReceiver::CReceiver(IpcClient& aParent, IpcListener& aListener, RComms& aSession)
: CActive(EPriorityStandard), mParent(aParent), mListener(aListener), mSession(aSession)
{
+}
+
+CReceiver* CReceiver::NewLC(IpcClient& aParent, IpcListener& aListener, RComms& aSession)
+{
+ CReceiver* self = new(ELeave) CReceiver(aParent, aListener, aSession);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ return self;
+}
+
+void CReceiver::ConstructL()
+{
CActiveScheduler::Add(this);
- mBuffer.Create(DEFAULT_BUFFER_SIZE);
+ mBuffer.CreateL(DEFAULT_BUFFER_SIZE);
}
CReceiver::~CReceiver()
--- a/javacommons/comms/ipclib/clientserver/src.s60/creceiver.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/comms/ipclib/clientserver/src.s60/creceiver.h Tue Sep 14 21:06:50 2010 +0300
@@ -31,12 +31,16 @@
NONSHARABLE_CLASS(CReceiver): public CActive
{
+ CReceiver(IpcClient& aParent, IpcListener& aListener, RComms& aSession);
public:
- CReceiver(IpcClient& aParent, IpcListener& aListener, RComms& aSession);
+ static CReceiver* NewLC(IpcClient& aParent, IpcListener& aListener, RComms& aSession);
+
~CReceiver();
void Receive();
private:
+ void ConstructL();
+
virtual void RunL();
virtual void DoCancel();
virtual TInt RunError(TInt aError);
--- a/javacommons/comms/ipclib/clientserver/src.s60/ipcclient.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/comms/ipclib/clientserver/src.s60/ipcclient.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -176,8 +176,7 @@
User::LeaveIfError(mComms.Connect(serverName->Des()));
LOG1(EJavaComms, EInfo, "IpcClient connected to %s", address.str().c_str());
- mReceiver = new(ELeave) CReceiver(*this, *mListener, mComms);
- CleanupStack::PushL(mReceiver);
+ mReceiver = CReceiver::NewLC(*this, *mListener, mComms);
mReceiver->Receive();
CActiveScheduler::Add(this);
--- a/javacommons/fileutils/src.s60/filesystemutils.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/fileutils/src.s60/filesystemutils.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -25,6 +25,7 @@
#include "s60filesystemutilities.h"
#include "javasymbianoslayer.h"
+#define BUF_LEN 255
using namespace std;
using namespace java::util;
using namespace java::fileutils;
@@ -94,8 +95,9 @@
OS_EXPORT std::wstring FileUtilities::listRoots()
{
JELOG2(EJavaFile);
- TDesC16 aDes(S60FileSystemUtilities::GetSupportedDrives());
- std::wstring retString((wchar_t*)aDes.Ptr());
+ TBuf<BUF_LEN> buf;
+ buf.Copy(S60FileSystemUtilities::GetSupportedDrives());
+ std::wstring retString((wchar_t*)buf.Ptr());
return retString;
}
--- a/javacommons/fileutils/src/fileutilities.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/fileutils/src/fileutilities.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -323,7 +323,8 @@
char *dirName = JavaCommonUtils::wstringToUtf8(path);
if (ableToOpen)
{
- if (!opendir(dirName))
+ DIR* wDirHandle = opendir(dirName);
+ if (!wDirHandle)
{
ableToOpen = false;
if (mkdir(dirName,0666)<0)
@@ -334,6 +335,7 @@
return -1;
}
}
+ closedir(wDirHandle);
}
else
{
--- a/javacommons/gcfprotocols/http/build/javahttp.pro Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/gcfprotocols/http/build/javahttp.pro Tue Sep 14 21:06:50 2010 +0300
@@ -18,6 +18,7 @@
TARGET=javahttp
TEMPLATE=lib
CONFIG += omj java stl
+CONFIG -= qt
symbian {
--- a/javacommons/gcfprotocols/http/build/javahttp_0x2002DCB1.mmp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/gcfprotocols/http/build/javahttp_0x2002DCB1.mmp Tue Sep 14 21:06:50 2010 +0300
@@ -28,8 +28,6 @@
UID 0x1000008d 0x2002DCB1
SECUREID 0x2002DCB1
-EPOCSTACKSIZE 0x14000
-EPOCHEAPSIZE 0x020000 0x800000
EPOCALLOWDLLDATA
@@ -54,32 +52,14 @@
MACRO RD_JAVA_MIDPRMS_DB
MACRO __SYMBIAN32__
MACRO J9EPOC32
-MACRO QT_GUI_LIB
-MACRO QT_CORE_LIB
-SYSTEMINCLUDE /epoc32/include/mw/QtCore
-SYSTEMINCLUDE /epoc32/include/mw/QtGui
-SYSTEMINCLUDE /epoc32/include/mw
SYSTEMINCLUDE ../../../../../../mw/qt/mkspecs/common/symbian
-SYSTEMINCLUDE /epoc32/include
-SYSTEMINCLUDE /epoc32/include/stdapis
-SYSTEMINCLUDE /epoc32/include/stdapis/sys
-SYSTEMINCLUDE /epoc32/include/platform/mw
-SYSTEMINCLUDE /epoc32/include/platform
-SYSTEMINCLUDE /epoc32/include/app
-SYSTEMINCLUDE /epoc32/include/platform/app
-SYSTEMINCLUDE /epoc32/include/platform/loc
-SYSTEMINCLUDE /epoc32/include/platform/mw/loc
-SYSTEMINCLUDE /epoc32/include/platform/app/loc
-SYSTEMINCLUDE /epoc32/include/platform/loc/sc
-SYSTEMINCLUDE /epoc32/include/platform/mw/loc/sc
-SYSTEMINCLUDE /epoc32/include/platform/app/loc/sc
-SYSTEMINCLUDE /epoc32/include/stdapis/openssl
SYSTEMINCLUDE ../inc.s60
SYSTEMINCLUDE ../../../inc
SYSTEMINCLUDE ../../../../inc
SYSTEMINCLUDE ../src.s60
SYSTEMINCLUDE /epoc32/include/stdapis/stlportv5
+SYSTEMINCLUDE /epoc32/include/mw
SYSTEMINCLUDE .
SOURCEPATH ../src.s60
@@ -110,8 +90,6 @@
LIBRARY javautils.lib
LIBRARY libpthread.lib
LIBRARY libstdcppv5.lib
-LIBRARY QtGui.lib
-LIBRARY QtCore.lib
LIBRARY libc.lib
LIBRARY libm.lib
LIBRARY libdl.lib
@@ -150,6 +128,12 @@
#include <platform_paths.hrh>
+ APP_LAYER_SYSTEMINCLUDE
+
+ OS_LAYER_LIBC_SYSTEMINCLUDE
+
+ OS_LAYER_SSL_SYSTEMINCLUDE
+
deffile ./~/javahttp.def
SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5)
@@ -177,5 +161,3 @@
#elif defined EABI
DEFFILE ./eabi/javahttp.def
#endif
-
-USERINCLUDE .
--- a/javacommons/gcfprotocols/http/src.s60/chttpsessionclient.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/gcfprotocols/http/src.s60/chttpsessionclient.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -244,35 +244,36 @@
} // end of else
LOG1(ESOCKET,EInfo,"apnerr = %d",*apnerr);
+ LOG(ESOCKET,EInfo,"now no re prompting");
// This is special case when that IAP/SNAP is not found
// Override the http stack's feaute of using device default
- if (*apnerr < 0)
- {
- LOG(ESOCKET,EInfo,"ECommDbDialogPrefPrompt set for the http session");
- int ret = iSocketServ.Connect();
- ret = iConnection.Open(iSocketServ);
-#ifdef RD_JAVA_S60_RELEASE_9_2_ONWARDS
- TConnPrefList prefList;
- TExtendedConnPref prefs;
- prefs.SetConnSelectionDialog(ETrue);
- prefList.AppendL(&prefs);
- ret = iConnection.Start(prefList);
- LOG(ESOCKET,EInfo,"+HttpSessionClient:: using extended connection prefernce - error case ");
-#else
- TCommDbConnPref pref;
- pref.SetDialogPreference(ECommDbDialogPrefPrompt);
- ret = iConnection.Start(pref);
- LOG(ESOCKET,EInfo,"+HttpSessionClient:: using commdb con pref - error case ");
-#endif
-
- RHTTPConnectionInfo connInfo = iHttpSession.ConnectionInfo();
- connInfo.SetPropertyL(iHttpSession.StringPool().StringF(
- HTTP::EHttpSocketServ, RHTTPSession::GetTable()), THTTPHdrVal(iSocketServ.Handle()));
- TInt connPtr = REINTERPRET_CAST(TInt, &iConnection);
- connInfo.SetPropertyL(iHttpSession.StringPool().StringF(
- HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), THTTPHdrVal(connPtr));
- }
+// if (*apnerr < 0)
+// {
+// LOG(ESOCKET,EInfo,"ECommDbDialogPrefPrompt set for the http session");
+// int ret = iSocketServ.Connect();
+// ret = iConnection.Open(iSocketServ);
+//#ifdef RD_JAVA_S60_RELEASE_9_2_ONWARDS
+// TConnPrefList prefList;
+// TExtendedConnPref prefs;
+// prefs.SetConnSelectionDialog(ETrue);
+// prefList.AppendL(&prefs);
+// ret = iConnection.Start(prefList);
+// LOG(ESOCKET,EInfo,"+HttpSessionClient:: using extended connection prefernce - error case ");
+//#else
+// TCommDbConnPref pref;
+// pref.SetDialogPreference(ECommDbDialogPrefPrompt);
+// ret = iConnection.Start(pref);
+// LOG(ESOCKET,EInfo,"+HttpSessionClient:: using commdb con pref - error case ");
+//#endif
+//
+// RHTTPConnectionInfo connInfo = iHttpSession.ConnectionInfo();
+// connInfo.SetPropertyL(iHttpSession.StringPool().StringF(
+// HTTP::EHttpSocketServ, RHTTPSession::GetTable()), THTTPHdrVal(iSocketServ.Handle()));
+// TInt connPtr = REINTERPRET_CAST(TInt, &iConnection);
+// connInfo.SetPropertyL(iHttpSession.StringPool().StringF(
+// HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), THTTPHdrVal(connPtr));
+// }
//Add proxy support
TRAP_IGNORE(LoadProxyLibraryL(aAPNId));
--- a/javacommons/gcfprotocols/http/src.s60/nativetransaction.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/gcfprotocols/http/src.s60/nativetransaction.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -20,7 +20,7 @@
#include <centralrepository.h>
#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
-#include <cuseragent.h>
+#include <CUserAgent.h>
#else
#include <cuseragent.h>
#endif
--- a/javacommons/gcfprotocols/socket/socket/javasrc.s60/com/nokia/mj/impl/gcf/protocol/socket/Protocol.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/gcfprotocols/socket/socket/javasrc.s60/com/nokia/mj/impl/gcf/protocol/socket/Protocol.java Tue Sep 14 21:06:50 2010 +0300
@@ -151,7 +151,7 @@
Logger.LOG(Logger.ESOCKET, Logger.EInfo,
"socket - protocol class : server connection");
ApplicationUtils appUtils = ApplicationUtils.getInstance();
- SocketPermissionImpl per = new SocketPermissionImpl("socket://");
+ SocketPermissionImpl per = new SocketPermissionImpl(SocketPermissionImpl.SERVER_TARGET);
appUtils.checkPermission(per);
/* security related stuff */
Logger.LOG(Logger.ESOCKET, Logger.EInfo,
@@ -168,7 +168,7 @@
throw new IllegalArgumentException("Invalid URL: " + fullurl);
}
ApplicationUtils appUtils = ApplicationUtils.getInstance();
- SocketPermissionImpl per = new SocketPermissionImpl("socket://*");
+ SocketPermissionImpl per = new SocketPermissionImpl(SocketPermissionImpl.CLIENT_TARGET);
appUtils.checkPermission(per);
/* security related stuff */
Logger.LOG(Logger.ESOCKET, Logger.EInfo,
--- a/javacommons/gcfprotocols/socket/socket/javasrc/com/nokia/mj/impl/gcf/protocol/socket/PushValidatorImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/gcfprotocols/socket/socket/javasrc/com/nokia/mj/impl/gcf/protocol/socket/PushValidatorImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -127,7 +127,7 @@
Logger.LOG(Logger.ESOCKET, Logger.EInfo,
"socket - push validator : before security check");
ApplicationUtils appUtils = ApplicationUtils.getInstance();
- SocketPermissionImpl per = new SocketPermissionImpl("socket://");
+ SocketPermissionImpl per = new SocketPermissionImpl(SocketPermissionImpl.SERVER_TARGET);
appUtils.checkPermission(per);
/* security check */
Logger.LOG(Logger.ESOCKET, Logger.EInfo,
--- a/javacommons/gcfprotocols/socket/socket/javasrc/com/nokia/mj/impl/gcf/protocol/socket/SocketPermissionImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/gcfprotocols/socket/socket/javasrc/com/nokia/mj/impl/gcf/protocol/socket/SocketPermissionImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -25,6 +25,13 @@
public class SocketPermissionImpl extends PermissionBase
{
+ /**
+ * Constants for identifying the target/uri of connection: client or server
+ */
+ static String CLIENT_TARGET = "socket://*";
+ static String SERVER_TARGET = "socket://";
+
+ private String iTarget;
/**
* Returns the question (as localized text) associated with the security
@@ -36,6 +43,7 @@
public SocketPermissionImpl(String uri)
{
super(uri);
+ iTarget = uri;
}
public String getSecurityPromptQuestion(int aInteractionMode)
@@ -55,6 +63,10 @@
public String toString()
{
+ if (SERVER_TARGET.equals(iTarget))
+ {
+ return "javax.microedition.io.Connector.serversocket";
+ }
return "javax.microedition.io.Connector.socket";
}
@@ -62,7 +74,12 @@
{
if (p instanceof SocketPermissionImpl)
{
- return true;
+ SocketPermissionImpl o = (SocketPermissionImpl)p;
+ if ((iTarget != null && iTarget.equals(o.getTarget()))
+ || (iTarget == null && o.getTarget() == null))
+ {
+ return true;
+ }
}
return false;
}
@@ -87,4 +104,8 @@
return null;
}
+ String getTarget()
+ {
+ return iTarget;
+ }
}
\ No newline at end of file
--- a/javacommons/javastorage/javasrc/com/nokia/mj/impl/storage/StorageSessionImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/javastorage/javasrc/com/nokia/mj/impl/storage/StorageSessionImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -297,7 +297,7 @@
*/
private void ensureNonEmpty(Uid aUid) throws StorageException
{
- if (aUid == null || aUid.equals(""))
+ if (aUid == null || aUid.toString().equals(""))
{
Logger.ELOG(Logger.EJavaStorage, "Invalid argument");
throw new StorageException("Invalid argument");
--- a/javacommons/javastorage/tsrc/java_api/javasrc/com/nokia/mj/impl/storage/TestStorageAttribute.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/javastorage/tsrc/java_api/javasrc/com/nokia/mj/impl/storage/TestStorageAttribute.java Tue Sep 14 21:06:50 2010 +0300
@@ -136,10 +136,10 @@
* 2. Test with Name and Value.
* 3. Test Name null throws StorageException
* 4. Test Name "" throws StorageException
- * 5. Test value null. Type is not set SE thrown.
+ * 5. Test value null. It is allowed value.
* 6. Test value "".
* 7. Test one len name and value.
- * 8. Test value null, type STRING throws StorageException.
+ * 8. Test value null, type STRING is allowed.
*/
public void testNameValueConstructor()
{
@@ -195,11 +195,10 @@
String name = "AttrName";
String value = null;
sa = new StorageAttribute(name, value);
- assertTrue("No exp when value Null", false);
}
catch (StorageException se)
{
- // PASSED
+ assertTrue("SE thrown when null value: " + se.toString(), false);
}
catch (Throwable t)
{
@@ -246,11 +245,10 @@
String name = "A";
String value = null;
sa = new StorageAttribute(name, value);
- assertTrue("No exp thrown when null value, string type", false);
}
catch (StorageException se)
{
- // PASSED
+ assertTrue("SE thrown when null value: " + se.toString(), false);
}
catch (Throwable t)
{
--- a/javacommons/security/data/att_untrusted.txt Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/data/att_untrusted.txt Tue Sep 14 21:06:50 2010 +0300
@@ -2,5 +2,4 @@
grant user "Net Access" oneshot,no {
permission javax.microedition.io.HttpProtocolPermission "http://*";
permission javax.microedition.io.HttpsProtocolPermission "https://*";
- permission javax.microedition.io.Connector.rtsp "*";
}
--- a/javacommons/security/javasrc.cdc/com/nokia/mj/impl/security/midp/authorization/PermissionGranter.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/javasrc.cdc/com/nokia/mj/impl/security/midp/authorization/PermissionGranter.java Tue Sep 14 21:06:50 2010 +0300
@@ -58,6 +58,9 @@
* different aplications being installed
*/
private Hashtable iBlanketPermissionsDetails = new Hashtable();
+
+ private static final int NOT_FOUND = -2;
+ private static final int REMOVED = -1;
/**
* Creates an instance of the PermissionGranter
@@ -171,23 +174,22 @@
* SecurityAttributes.addManifestAttributes())
*/
public void grantJarPermissions(
- StorageSession storageSession,
Uid msUID,
Uid oldMSUID,
- PermissionAttribute[] requestedPermissions)
+ PermissionAttribute[] requestedPermissions,
+ AuthenticationCredentials[] authCredentials)
{
- if (storageSession == null
- || msUID == null)
+ if (msUID == null)
{
return;
}
- // take the domain from storage
- SecurityStorage storage = new SecurityStorage(storageSession);
- String protectionDomainName = storage.readProtectionDomain(msUID);
// filter the already granted permissions
+ String protectionDomainName = authCredentials[0].getProtectionDomainName();
Object o = iGrantedPermissions.remove(
- msUID.getStringValue() + protectionDomainName);
+ msUID.getStringValue()
+ + protectionDomainName);
+
Vector preGrantedPermissions = null;
if (o != null)
{
@@ -215,10 +217,15 @@
}
}
}
- storage.writeGrantedPermissions(
- msUID,
- oldMSUID,
- resolvedPermissions);
+ // in case of update preserve the settings of the "old" suite
+ if (oldMSUID != null)
+ {
+ updateGrantedPermissions(
+ msUID,
+ oldMSUID,
+ resolvedPermissions);
+ }
+
// update the cache with the full set of permissions
iGrantedPermissions.put(msUID.getStringValue() + protectionDomainName,
resolvedPermissions);
@@ -240,7 +247,6 @@
* the MIDlet suite.
*/
public void grantJarPermissions(
- StorageSession storageSession,
Uid uid,
Uid oldUid,
ProtectionDomain protectionDomain)
@@ -265,15 +271,17 @@
protectionDomain.getName(),
securityAttributes.getPermissionAttributes(),
true /* add the assigned permissions */);
-
- // store the permissions
- SecurityStorage storage = new SecurityStorage(storageSession);
- storage.writeGrantedPermissions(
- uid,
- oldUid,
- resolvedPermissions);
+ // in case of update preserve the settings
+ if (oldUid != null)
+ {
+ updateGrantedPermissions(
+ uid,
+ oldUid,
+ resolvedPermissions);
+ }
+
// update the cache with the full set of permissions
- iGrantedPermissions.put(uid.getStringValue() + protectionDomain,
+ iGrantedPermissions.put(uid.getStringValue() + protectionDomain.getName(),
resolvedPermissions);
Logger.logGrantedPermissions(resolvedPermissions);
}
@@ -315,7 +323,7 @@
String key = (String)e.nextElement();
if (key.startsWith(msUidKey))
{
- grantedPermissions = (Vector)iGrantedPermissions.remove(key);
+ grantedPermissions = (Vector)iGrantedPermissions.get(key);
if (key.endsWith("UnidentifiedThirdParty"))
{
// if the suite is not signed, there is no blanket
@@ -360,7 +368,7 @@
((PolicyBasedPermission)grantedPermissions.elementAt(i));
UserSecuritySettings settings =
permission.getUserSecuritySettings();
- if (permission.getType() != PolicyBasedPermission.USER_TYPE
+ if (permission.getType() != PolicyBasedPermission.USER_TYPE
|| settings == null)
{
// not a user permission -> move on to the next permission
@@ -458,24 +466,24 @@
if (permissions_from_sensitive_combination_list_1
&& permissions_from_sensitive_combination_list_2)
{
- /*String blanketPermissionsDetails = (
+ /*String blanketPermissionsDetails = (
((call_control == true && multimedia == true)
- || (call_control == true && read_user_data == true)
+ || (call_control == true && read_user_data == true)
|| (net_access == true && multimedia == true)
|| (net_access == true && read_user_data == true)
|| (messaging == true && multimedia == true)
- || (messaging == true && read_user_data == true)) ?
- "settings_inst_query_perm_net" :
+ || (messaging == true && read_user_data == true)) ?
+ "settings_inst_query_perm_net" :
"settings_inst_query_perm_sec");*/
- Id blanketPermissionsDetails = (
+ Id blanketPermissionsDetails = (
((call_control == true && multimedia == true)
- || (call_control == true && read_user_data == true)
+ || (call_control == true && read_user_data == true)
|| (net_access == true && multimedia == true)
|| (net_access == true && read_user_data == true)
|| (messaging == true && multimedia == true)
- || (messaging == true && read_user_data == true)) ?
- new Id("settings_inst_query_perm_net", "N/A") :
+ || (messaging == true && read_user_data == true)) ?
+ new Id("settings_inst_query_perm_net", "N/A") :
new Id("settings_inst_query_perm_sec", "N/A"));
iBlanketPermissionsDetails.put(msUidKey,
@@ -532,6 +540,8 @@
storage.writeUserSecuritySettings(msUID,
UserSecuritySettings.BLANKET_INTERACTION_MODE,
true /* blanket prompt shown */);
+ // cleanup the cache as well
+ cleanup(msUID);
}
/**
@@ -544,7 +554,7 @@
iGrantedPermissions.clear();
iBlanketPermissionsDetails.clear();
}
-
+
/**
* Removes all the security data related to a certain MIDlet suite
*
@@ -559,6 +569,25 @@
SecurityStorage storage = new SecurityStorage(storageSession);
storage.removeGrantedPermissions(msUID);
// clear the cache
+ cleanup(msUID);
+ }
+
+ /**
+ * Writes to storage all the security data related to a certain MIDlet suite
+ *
+ * @param sessionID the JavaStorage session to be used when
+ * writing the security data into storage
+ * @param msUID the UID if the MIDlet suite whose security data is
+ * being written
+ */
+ public void addSecurityData(StorageSession storageSession, Uid msUID, Uid oldMsUID)
+ {
+ Logger.log("Write granted permissions to storage");
+ if (storageSession == null || msUID == null)
+ {
+ return;
+ }
+ SecurityStorage storage = new SecurityStorage(storageSession);
String msUidKey = msUID.getStringValue();
for (Enumeration e = iGrantedPermissions.keys() ;
e.hasMoreElements() ;)
@@ -566,11 +595,13 @@
String key = (String)e.nextElement();
if (key.startsWith(msUidKey))
{
- iGrantedPermissions.remove(key);
- break;
+ storage.writeGrantedPermissions(
+ msUID,
+ oldMsUID,
+ (Vector)iGrantedPermissions.remove(key));
+ return;
}
}
- iBlanketPermissionsDetails.remove(msUidKey);
}
private Vector resolvePermissions(Uid msUID,
@@ -599,8 +630,8 @@
for (int i=0; i<policyPermissions.length; i++)
{
if (policyPermissions[i].getType()
- == PolicyBasedPermission.ASSIGNED_TYPE
- || policyPermissions[i].getType()
+ == PolicyBasedPermission.ASSIGNED_TYPE
+ || policyPermissions[i].getType()
== PolicyBasedPermission.USER_ASSIGNED_TYPE)
{
PolicyBasedPermissionImpl p1 = new PolicyBasedPermissionImpl(
@@ -641,4 +672,130 @@
return resolvePermissions(msUID, protectionDomainName,
requestedPermissions, true /* add assigned permissions */);
}
+
+ private void cleanup(Uid msUID)
+ {
+ // clear the cache
+ String msUidKey = msUID.getStringValue();
+ for (Enumeration e = iGrantedPermissions.keys() ;
+ e.hasMoreElements() ;)
+ {
+ String key = (String)e.nextElement();
+ if (key.startsWith(msUidKey))
+ {
+ iGrantedPermissions.remove(key);
+ break;
+ }
+ }
+ iBlanketPermissionsDetails.remove(msUidKey);
+ }
+
+ private void updateGrantedPermissions(Uid newAppUID, Uid oldAppUID, Vector grantedPermissions)
+ {
+ // the vector containing the newGrantedPermissions
+ Vector newGrantedPermissions = new Vector();
+
+ // get the old permissions & settings
+ SecurityStorage storage = new SecurityStorage();
+ Vector oldPermissions = storage.readGrantedPermissions(oldAppUID);
+ storage.close();
+
+ // filter out the the brand new permissions
+ // (permissions which are not found among the old permissions)
+ if (oldPermissions != null)
+ {
+ int index=0;
+ while (index < grantedPermissions.size())
+ {
+ // instead of calling Vector.removeElement(p) we will do the
+ // remove manually, since the search is to be based on
+ // the permission without the settings
+ PolicyBasedPermission p = (PolicyBasedPermission)
+ grantedPermissions.elementAt(index);
+ int status = removeElement(oldPermissions, p);
+ switch (status)
+ {
+ case REMOVED:
+ case NOT_FOUND:
+ index++;
+ break;
+ default:
+ // different settings
+ UserSecuritySettings oldSettings
+ = ((PolicyBasedPermission)oldPermissions
+ .elementAt(status)).getUserSecuritySettings();
+ UserSecuritySettings newSettings
+ = p.getUserSecuritySettings();
+ if (oldSettings != null
+ && newSettings != null)
+ {
+ boolean activeSettings = false;
+ if (oldSettings.isActive()
+ || newSettings.isActive())
+ {
+ activeSettings = true;
+ }
+ newGrantedPermissions.addElement(
+ new PolicyBasedPermissionImpl(
+ p.getName(),
+ p.getTarget(),
+ p.getActionList(),
+ p.getType(),
+ new UserSecuritySettingsImpl(
+ newSettings.getName(),
+ oldSettings.getCurrentInteractionMode(),
+ newSettings.getAllowedInteractionModes(),
+ oldSettings.getBlanketPrompt(),
+ activeSettings)));
+ }
+ else
+ {
+ newGrantedPermissions.addElement(p);
+ }
+ grantedPermissions.removeElementAt(index);
+ break;
+ }
+ }
+ }
+ // write what's left from the granted permissions
+ for (int i=0; i<newGrantedPermissions.size(); i++)
+ {
+ grantedPermissions.addElement(newGrantedPermissions.elementAt(i));
+ }
+ }
+
+ private int removeElement(Vector elements, PolicyBasedPermission element)
+ {
+ PolicyBasedPermissionImpl p1 = new PolicyBasedPermissionImpl(
+ element.getName(),
+ element.getTarget(),
+ element.getActionList(),
+ null);
+ for (int i=0; i<elements.size(); i++)
+ {
+ PolicyBasedPermission tmp = (PolicyBasedPermission)elements
+ .elementAt(i);
+ PolicyBasedPermissionImpl p2 = new PolicyBasedPermissionImpl(
+ tmp.getName(),
+ tmp.getTarget(),
+ tmp.getActionList(),
+ null);
+ if (p1.equals(p2))
+ {
+ UserSecuritySettings s1 = element.getUserSecuritySettings();
+ UserSecuritySettings s2 = tmp.getUserSecuritySettings();
+ if ((s1 == null && s2 == null)
+ || (s1 != null
+ && s2 != null
+ && s1.equals(s2)))
+ {
+ // identical permissions
+ elements.removeElementAt(i);
+ return REMOVED;
+ }
+ return i;
+ }
+ }
+ return NOT_FOUND;
+ }
}
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authentication/AuthenticationModule.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authentication/AuthenticationModule.java Tue Sep 14 21:06:50 2010 +0300
@@ -266,14 +266,14 @@
* (if applicable)
* @param appJARPath the path to the JAR being authenticated
*/
- public void authenticateJar(
- StorageSession storageSession,
+ public AuthenticationCredentials[] authenticateJar(
Uid msUID,
Uid oldMSUID,
String appJARPath,
boolean drmContent)
{
AuthenticationStorageData data = null;
+ Credentials selectedCredentials = null;
try
{
Vector allAuthCredentials = (Vector)iAuthCredentials.get(msUID);
@@ -307,15 +307,15 @@
null /*validatedChainIndexes*/,
null /* jarPath*/,
iSecurityWarningsMode);
+ selectedCredentials = new Credentials(
+ data.getProtectionDomain(),
+ data.getProtectionDomainCategory(),
+ jarHash,
+ null /* root hash */,
+ -1 /* validated chain index*/,
+ null /* signing cert */);
verifyUpdate(
- new Credentials[] {new Credentials(
- data.getProtectionDomain(),
- data.getProtectionDomainCategory(),
- jarHash,
- null /* root hash */,
- -1 /* validated chain index*/,
- null /* signing cert */)
- },
+ new Credentials[] {selectedCredentials},
oldMSUID);
}
else
@@ -328,7 +328,7 @@
String jarHashValue = null;
String rootHashValue = null;
Vector validatedChainIndexes = new Vector();
- Credentials selectedCredentials = selectCredentials(jarHash, allAuthCredentials, validatedChainIndexes);
+ selectedCredentials = selectCredentials(jarHash, allAuthCredentials, validatedChainIndexes);
if (selectedCredentials == null
|| selectedCredentials.getProtectionDomainName() == null)
{
@@ -378,8 +378,6 @@
validatedChainIndexes,
iSecurityWarningsMode);
}
-
- writeAuthenticationStorageData(storageSession, msUID, data, (oldMSUID != null && oldMSUID.equals(msUID)));
}
finally
{
@@ -389,17 +387,18 @@
iSelectedAuthCredentials.put(msUID, data);
}
}
+ return new AuthenticationCredentials[] {selectedCredentials};
}
/**
*/
- public void authenticateJar(
- StorageSession storageSession,
+ public AuthenticationCredentials[] authenticateJar(
Uid uid,
Uid oldUid,
ProtectionDomain protectionDomain,
String appJARPath)
{
+ Credentials selectedCredentials = null;
if (protectionDomain == null
|| (!protectionDomain.equals(ProtectionDomain.getManufacturerDomain())
&& !protectionDomain.equals(ProtectionDomain.getOperatorDomain())
@@ -438,18 +437,20 @@
null /*validatedChainIndexes*/,
null /* jarPath*/,
iSecurityWarningsMode);
+ selectedCredentials = new Credentials(
+ data.getProtectionDomain(),
+ data.getProtectionDomainCategory(),
+ jarHash,
+ null /* root hash */,
+ -1 /* validated chain index*/,
+ null /* signing cert */);
verifyUpdate(
- new Credentials[] {new Credentials(
- data.getProtectionDomain(),
- data.getProtectionDomainCategory(),
- jarHash,
- null /* root hash */,
- -1 /* validated chain index*/,
- null /* signing cert */)
- },
+ new Credentials[] {selectedCredentials},
oldUid);
- writeAuthenticationStorageData(storageSession, uid, data, (oldUid != null && oldUid.equals(uid)));
+ iSelectedAuthCredentials.put(uid, data);
+
+ return new AuthenticationCredentials[] {selectedCredentials};
}
/**
@@ -581,6 +582,24 @@
}
/**
+ * Writes to storage all the security data related to a certain MIDlet suite
+ *
+ * @param sessionID the JavaStorage session to be used when
+ * writing the security data into storage
+ * @param msUID the UID if the MIDlet suite whose security data is
+ * being written
+ */
+ public void addSecurityData(StorageSession storageSession, Uid msUID, Uid oldMsUID)
+ {
+ Logger.log("Write authentication data to storage");
+ AuthenticationStorageData authStorageData =
+ (AuthenticationStorageData)iSelectedAuthCredentials.remove(
+ msUID);
+ writeAuthenticationStorageData(storageSession, msUID, authStorageData,
+ (oldMsUID != null && oldMsUID.equals(msUID)));
+ }
+
+ /**
* Returns the details of the certificates used for authenticating a
* MIDlet suite. This method is used at installation time.
*
@@ -661,31 +680,20 @@
* @param aMediaId the identifier of the media where the MIDlet
* suite is installed
*/
- public void setMediaId(StorageSession aStorageSession, Uid aMsUid, int aMediaId)
+ public void setMediaId(Uid aMsUid, int aMediaId)
{
// store the jar hash only if the suite was installed on a non-protected media
if (isDriveProtected(aMediaId))
{
- SecurityStorage storage = new SecurityStorage(aStorageSession);
- try
+ AuthenticationStorageData authStorageData =
+ (AuthenticationStorageData)iSelectedAuthCredentials.get(
+ aMsUid);
+ if (authStorageData != null)
{
- AuthenticationStorageData authStorageData =
- (AuthenticationStorageData)iSelectedAuthCredentials.get(
- aMsUid);
- if (authStorageData != null)
- {
- Logger.log("Suite installed on protected media -> the runtime tamper detection is disabled");
- authStorageData.setJarHashValue(null);
- storage.writeAuthenticationStorageData(aMsUid,
- authStorageData,
- true /* this is an update */);
- }
+ Logger.log("Suite installed on protected media -> the runtime tamper detection is disabled");
+ authStorageData.setJarHashValue(null);
+ iSelectedAuthCredentials.put(aMsUid, authStorageData);
}
- finally
- {
- iSelectedAuthCredentials.remove(aMsUid);
- }
-
}
}
@@ -833,13 +841,13 @@
&& authStorageData.getJarHashValue().length() > 0)
{
Logger.log(" Doing tamper detection");
- String computedJarHash = null;
+ String computedJarHash = null;
try
{
computedJarHash = _computeHash(authStorageData.getJarPath());
- }catch(AuthenticationException e)
+ }catch(AuthenticationException e)
{
- if (e.getErrorCode()
+ if (e.getErrorCode()
== AuthenticationException.JAR_NOT_FOUND)
{
Logger.logWarning(" Jar not found while trying to compute hash");
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionResolver.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionResolver.java Tue Sep 14 21:06:50 2010 +0300
@@ -203,7 +203,7 @@
// add new settings
newPermissionInstancesAndSettings.addElement(
new PermisionInstanceAndSettings(
- p.getPermissionInstance(),
+ p.getPermissionInstance(),
p.getType(),
newSettings));
}
@@ -678,11 +678,15 @@
// permission and the policy permission
String target = legacyPermission.getTarget();
if (target != null
- && target.indexOf("*") == -1
- && !target.equals(policyPermissions[i].getTarget()))
+ && !("*".equals(policyPermissions[i].getTarget()))
+ && !target.equals(policyPermissions[i].getTarget()))
{
continue;
}
+ if (target == null)
+ {
+ target = policyPermissions[i].getTarget();
+ }
// choose the action
String actionList = legacyPermission.getActionList();
if (actionList == null)
@@ -690,7 +694,7 @@
resolvedPermissions.addElement(
new PolicyBasedPermissionImpl(
policyPermissions[i].getName(),
- policyPermissions[i].getTarget(),
+ target,
policyPermissions[i].getActionList(),
policyPermissions[i].getUserSecuritySettings()));
}
@@ -702,7 +706,7 @@
resolvedPermissions.addElement(
new PolicyBasedPermissionImpl(
policyPermissions[i].getName(),
- policyPermissions[i].getTarget(),
+ target,
actionList,
policyPermissions[i].getUserSecuritySettings()));
}
@@ -735,7 +739,7 @@
{
return settings;
}
-
+
public int getType()
{
return type;
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java Tue Sep 14 21:06:50 2010 +0300
@@ -58,7 +58,7 @@
"com.nokia.mj.impl.gcf.protocol.datagram.DatagramPermissionImpl", "datagram://"));
PERMISSION_MAPPING_TABLE.put(
"javax.microedition.io.Connector.comm", new MIDPPermission(
- "com.nokia.mj.impl.gcf.protocol.comm.CommPermissionImpl", "comm://*"));
+ "com.nokia.mj.impl.gcf.protocol.comm.CommPermissionImpl", "comm:*"));
PERMISSION_MAPPING_TABLE.put(
"javax.microedition.io.PushRegistry", new MIDPPermission(
"com.nokia.mj.impl.gcf.PushRegistryPermissionImpl", "*"));
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java Tue Sep 14 21:06:50 2010 +0300
@@ -102,9 +102,6 @@
public static final int AUTHENTICATION_JAR_HASH_QUERY = 8;
public static final int AUTHENTICATION_VALID_CERTS_QUERY = 16;
- private static final int NOT_FOUND = -2;
- private static final int REMOVED = -1;
-
/**
* Constructor
*/
@@ -435,10 +432,11 @@
{
if (oldAppUID != null)
{
- updateGrantedPermissions(
- appUID,
- oldAppUID,
- grantedPermissions);
+ // remove granted permissions
+ removeGrantedPermissions(appUID);
+
+ // write granted permissions
+ writeGrantedPermissions(appUID, null, grantedPermissions);
return;
}
// put all the function group names into a vector and use it
@@ -1246,146 +1244,6 @@
{/* move on with defaults */}
}
-
- private void updateGrantedPermissions(Uid newAppUID, Uid oldAppUID, Vector grantedPermissions)
- {
- // the vector containing the newGrantedPermissions
- Vector newGrantedPermissions = new Vector();
-
- // get the old permissions & settings
- Vector oldPermissions = readGrantedPermissions(oldAppUID);
-
- // filter out the the brand new permissions
- // (permissions which are not found among the old permissions)
- if (oldPermissions != null)
- {
- int index=0;
- while (index < grantedPermissions.size())
- {
- // instead of calling Vector.removeElement(p) we will do the
- // remove manually, since the search is to be based on
- // the permission without the settings
- PolicyBasedPermission p = (PolicyBasedPermission)
- grantedPermissions.elementAt(index);
- int status = removeElement(oldPermissions, p);
- switch (status)
- {
- case NOT_FOUND:
- index++;
- break;
- case REMOVED:
- grantedPermissions.removeElementAt(index);
- break;
- default:
- // different settings
- UserSecuritySettings oldSettings
- = ((PolicyBasedPermission)oldPermissions
- .elementAt(status)).getUserSecuritySettings();
- UserSecuritySettings newSettings
- = p.getUserSecuritySettings();
- if (oldSettings != null
- && newSettings != null)
- {
- boolean activeSettings = false;
- if (oldSettings.isActive()
- || newSettings.isActive())
- {
- activeSettings = true;
- }
- newGrantedPermissions.addElement(
- new PolicyBasedPermissionImpl(
- p.getName(),
- p.getTarget(),
- p.getActionList(),
- p.getType(),
- new UserSecuritySettingsImpl(
- newSettings.getName(),
- oldSettings.getCurrentInteractionMode(),
- newSettings.getAllowedInteractionModes(),
- oldSettings.getBlanketPrompt(),
- activeSettings)));
- }
- else
- {
- newGrantedPermissions.addElement(p);
- }
- grantedPermissions.removeElementAt(index);
- break;
- }
- }
- }
- // write what's left from the granted permissions
- writeGrantedPermissions(newAppUID, null, grantedPermissions, true /* preserveSettings */);
- for (int i=0; i<newGrantedPermissions.size(); i++)
- {
- grantedPermissions.addElement(newGrantedPermissions.elementAt(i));
- }
-
- // remove what's left from the old permissions
- if (oldPermissions != null)
- {
- for (int i=0; i<oldPermissions.size(); i++)
- {
- PolicyBasedPermission p = (PolicyBasedPermission)
- oldPermissions.elementAt(i);
- StorageEntry removePermissionQuery = new StorageEntry();
- removePermissionQuery.addAttribute(new StorageAttribute(
- StorageAttribute.ID,
- oldAppUID.getStringValue()));
- removePermissionQuery.addAttribute(new StorageAttribute(
- StorageNames.CLASS,
- p.getName()));
- if (p.getTarget() != null
- && p.getTarget().length() > 0)
- {
- removePermissionQuery.addAttribute(new StorageAttribute(
- StorageNames.NAME,
- p.getTarget()));
- }
- if (p.getActionList() != null
- && p.getActionList().length() > 0)
- {
- removePermissionQuery.addAttribute(new StorageAttribute(
- StorageNames.ACTION,
- p.getActionList()));
- }
- doStorageRemove(StorageNames.MIDP_PERMISSIONS_TABLE,
- removePermissionQuery);
- // remove the setting also if not used by some other permission
- UserSecuritySettings settings =
- p.getUserSecuritySettings();
- if (settings != null)
- {
- StorageEntry permissionsQuery = new StorageEntry();
- permissionsQuery.addAttribute(new StorageAttribute(
- StorageAttribute.ID,
- newAppUID.getStringValue()));
- permissionsQuery.addAttribute(new StorageAttribute(
- StorageNames.FUNCTION_GROUP,
- settings.getName()));
- StorageEntry[] permissions = doStorageSearch(
- StorageNames.MIDP_PERMISSIONS_TABLE, permissionsQuery);
- if (permissions == null || (permissions != null
- && permissions.length == 0))
- {
- // remove the orphaned settings from settings table
- StorageEntry removeSettingsQuery = new StorageEntry();
- removeSettingsQuery.addAttribute(new StorageAttribute(
- StorageAttribute.ID,
- newAppUID.getStringValue()));
- removeSettingsQuery.addAttribute(new StorageAttribute(
- StorageNames.FUNCTION_GROUP,
- settings.getName()));
- doStorageRemove(StorageNames.MIDP_FUNC_GRP_SETTINGS_TABLE,
- removeSettingsQuery);
- }
- }
- }
- }
- // write the new permissions
- writeGrantedPermissions(newAppUID, null, newGrantedPermissions, true /* preserveSettings */);
- }
-
private AuthenticationStorageData readAuthenticationStorageData(
Uid appUID, String aAppName, String aAppVersion,
String aAppVendor, int readFilter)
@@ -1838,41 +1696,6 @@
}
return attrValue;
}
-
- private int removeElement(Vector elements, PolicyBasedPermission element)
- {
- PolicyBasedPermissionImpl p1 = new PolicyBasedPermissionImpl(
- element.getName(),
- element.getTarget(),
- element.getActionList(),
- null);
- for (int i=0; i<elements.size(); i++)
- {
- PolicyBasedPermission tmp = (PolicyBasedPermission)elements
- .elementAt(i);
- PolicyBasedPermissionImpl p2 = new PolicyBasedPermissionImpl(
- tmp.getName(),
- tmp.getTarget(),
- tmp.getActionList(),
- null);
- if (p1.equals(p2))
- {
- UserSecuritySettings s1 = element.getUserSecuritySettings();
- UserSecuritySettings s2 = tmp.getUserSecuritySettings();
- if ((s1 == null && s2 == null)
- || (s1 != null
- && s2 != null
- && s1.equals(s2)))
- {
- // identical permissions
- elements.removeElementAt(i);
- return REMOVED;
- }
- return i;
- }
- }
- return NOT_FOUND;
- }
private String encodeFunctionGroup(int type, String name)
{
--- a/javacommons/security/javaunicertstoreplugin/build/bld.inf Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/javaunicertstoreplugin/build/bld.inf Tue Sep 14 21:06:50 2010 +0300
@@ -11,16 +11,13 @@
*
* Contributors:
*
-* Description:
+* Description: Generated bld.inf -file
*
*/
PRJ_PLATFORMS
default
-PRJ_MMPFILES
-javaunicertstoreplugin.mmp
-
-#ifdef RD_JAVA_UI_QT
+PRJ_MMPFILES
+javaunicertstoreplugin_0x200213A3.mmp
#include "exports.inf"
-#endif
--- a/javacommons/security/javaunicertstoreplugin/build/javaunicertstoreplugin.mmp Wed Sep 01 12:33:18 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include <bldvariant.hrh>
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-#include <../../../../inc/project_defines.hrh>
-#include <../../../../inc/java_stdcpp_support_for_dll.hrh>
-
-target javaunicertstoreplugin.dll
-
-targettype PLUGIN
-
-uid 0x10009D8D 0x200213A3
-
-CAPABILITY CAP_ECOM_PLUGIN
-VENDORID VID_DEFAULT
-
-// Use bytepair compression to enable code paging
-PAGED
-
-userinclude ../../../../inc
-
-sourcepath ../src.s60
-
-source javacertstoreimpl.cpp
-source javacertstoretoken.cpp
-source javacertstoretokentype.cpp
-source main.cpp
-
-start resource 200213A3.rss
-target javaunicertstoreplugin.rsc
-end
-
-START RESOURCE ../data/javausermessages.rss
-HEADER
-TARGETPATH /resource/java
-LANGUAGE_IDS
-END
-
-library ctframework.lib
-library efsrv.lib
-library estor.lib
-library x509.lib
-library javacomms.lib
-LIBRARY CommonEngine.lib
-LIBRARY aknnotify.lib
-
-#if defined(WINSCW)
-deffile ./bwins/javaunicertstoreplugin.def
-#else
-deffile ./eabi/javaunicertstoreplugin.def
-#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/javaunicertstoreplugin/build/javaunicertstoreplugin.pro Tue Sep 14 21:06:50 2010 +0300
@@ -0,0 +1,60 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+include(../../../../inc/build_defines.pri)
+
+TEMPLATE=lib
+TARGET=javaunicertstoreplugin
+CONFIG += omj stl
+CONFIG -= qt
+
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_10_1_ONWARDS) {
+ CONFIG += qt hb
+ SOURCES += ../src.s60/confirmquery.cpp
+ HEADERS += ../src.s60/confirmquery.h
+}
+symbian {
+ TARGET.UID2 = 0x10009D8D
+ TARGET.UID3 = 0x200213A3
+ TARGET.TARGETTYPE=PLUGIN
+ TARGET.CAPABILITY = CAP_ECOM_PLUGIN
+ MMP_RULES += "START RESOURCE 200213A3.rss"
+ MMP_RULES += "TARGETPATH /resource/plugins"
+ MMP_RULES += "TARGET javaunicertstoreplugin.rsc"
+ MMP_RULES += "END"
+ MMP_RULES += "START RESOURCE ../data/javausermessages.rss"
+ MMP_RULES += "HEADER"
+ MMP_RULES += "TARGETPATH /resource/java"
+ MMP_RULES += "LANGUAGE_IDS"
+ MMP_RULES += "END"
+ DEPENDPATH += ../src.s60
+ INCLUDEPATH += ../src.s60 ../../../../inc
+ SOURCES += ../src.s60/javacertstoreimpl.cpp \
+ ../src.s60/javacertstoretoken.cpp \
+ ../src.s60/javacertstoretokentype.cpp \
+ ../src.s60/main.cpp
+ LIBS += -lctframework \
+ -lefsrv \
+ -lestor \
+ -lx509 \
+ -ljavacomms \
+ -lCommonEngine
+ !contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_10_1_ONWARDS) {
+ LIBS += -laknnotify
+ }
+}
+
+include(../../../../build/omj.pri)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/javaunicertstoreplugin/build/javaunicertstoreplugin_0x200213A3.mmp Tue Sep 14 21:06:50 2010 +0300
@@ -0,0 +1,162 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Generated file - do not edit manually
+*
+*/
+
+// ==============================================================================
+// Generated by qmake (2.01a) (Qt 4.6.4) on: (date)
+// This file is generated by qmake and should not be modified by the
+// user.
+// Name : javaunicertstoreplugin.mmp
+// ==============================================================================
+
+TARGET javaunicertstoreplugin.dll
+TARGETTYPE DLL
+
+UID 0x10009D8D 0x200213A3
+SECUREID 0x200213A3
+
+EPOCALLOWDLLDATA
+
+
+// Qt Macros
+MACRO UNICODE
+MACRO QT_KEYPAD_NAVIGATION
+MACRO QT_SOFTKEYS_ENABLED
+MACRO QT_USE_MATH_H_FLOATS
+MACRO RD_JAVA_SYMBIAN_TARGET
+MACRO RD_JAVA_S60_RELEASE_9_2
+MACRO RD_JAVA_S60_RELEASE_9_2_ONWARDS
+MACRO RD_JAVA_S60_RELEASE_5_0_ONWARDS
+MACRO RD_JAVA_STDCPPV5
+MACRO RD_JAVA_EPOCALLOWDLLDATA_FIX
+MACRO RD_JAVA_HTTP_EMC_ENABLED
+MACRO RD_JAVA_NGA_ENABLED
+MACRO RD_JAVA_PROXIMITY_LISTENER_ENABLED
+MACRO RD_JAVA_OPENC_BETA_PATCH
+MACRO RD_JAVA_INSTALLERUI_ENABLED
+MACRO RD_JAVA_PREWARM
+MACRO RD_JAVA_ADVANCED_TACTILE_FEEDBACK
+MACRO RD_JAVA_MIDPRMS_DB
+MACRO __SYMBIAN32__
+MACRO J9EPOC32
+
+SYSTEMINCLUDE ../../../../../../mw/qt/mkspecs/common/symbian
+SYSTEMINCLUDE ../src.s60
+SYSTEMINCLUDE ../../../../inc
+SYSTEMINCLUDE ../../inc
+SYSTEMINCLUDE ../../../inc
+SYSTEMINCLUDE /epoc32/include/stdapis/stlportv5
+SYSTEMINCLUDE /epoc32/include/mw
+SYSTEMINCLUDE .
+
+SOURCEPATH ../src.s60
+SOURCE javacertstoreimpl.cpp
+SOURCE javacertstoretoken.cpp
+SOURCE javacertstoretokentype.cpp
+SOURCE main.cpp
+
+
+LIBRARY ctframework.lib
+LIBRARY efsrv.lib
+LIBRARY estor.lib
+LIBRARY x509.lib
+LIBRARY javacomms.lib
+LIBRARY CommonEngine.lib
+LIBRARY aknnotify.lib
+LIBRARY javautils.lib
+LIBRARY libpthread.lib
+LIBRARY libstdcppv5.lib
+LIBRARY libc.lib
+LIBRARY libm.lib
+LIBRARY euser.lib
+LIBRARY libdl.lib
+LIBRARY cone.lib
+LIBRARY eikcore.lib
+LIBRARY mediaclientaudio.lib
+LIBRARY eikcoctl.lib
+LIBRARY eiksrv.lib
+LIBRARY apparc.lib
+LIBRARY avkon.lib
+LIBRARY charconv.lib
+LIBRARY ws32.lib
+LIBRARY hal.lib
+LIBRARY gdi.lib
+LIBRARY apgrfx.lib
+
+CAPABILITY all -tcb
+
+OPTION CW -wchar_t on
+OPTION ARMCC --visibility_inlines_hidden
+#if defined(ARMCC_4_0)
+OPTION ARMCC --import_all_vtbl
+#endif
+OPTION GCCE -fvisibility-inlines-hidden
+
+VERSION 10.0
+
+ARMFPU softvfp
+
+PAGED
+
+BYTEPAIRCOMPRESSTARGET
+
+USERINCLUDE .
+
+START RESOURCE 200213A3.rss
+
+TARGETPATH /resource/plugins
+
+TARGET javaunicertstoreplugin.rsc
+
+END
+
+START RESOURCE ../data/javausermessages.rss
+
+HEADER
+
+TARGETPATH /resource/java
+
+LANGUAGE_IDS
+
+END
+
+#include <platform_paths.hrh>
+
+ APP_LAYER_SYSTEMINCLUDE
+
+ OS_LAYER_LIBC_SYSTEMINCLUDE
+
+ OS_LAYER_SSL_SYSTEMINCLUDE
+
+deffile ./~/javaunicertstoreplugin.def
+
+ SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5)
+
+SYSTEMINCLUDE /epoc32/build/jrt/javabuild/inc.javah
+
+#ifdef WINSCW
+
+LIBRARY ewsd.lib
+
+#endif
+
+STDCPP
+
+#ifdef WINSCW
+DEFFILE ./bwins/javaunicertstoreplugin.def
+#elif defined EABI
+DEFFILE ./eabi/javaunicertstoreplugin.def
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/javaunicertstoreplugin/src.s60/confirmquery.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "confirmquery.h"
+#include <hbmessagebox.h>
+#include <hblabel.h>
+
+using namespace java::security;
+
+ConfirmQuery::ConfirmQuery()
+ : mAsyncToSyncCallEventLoop(0), mQueryAccepted(false)
+{
+ mAsyncToSyncCallEventLoop = new QEventLoop();
+}
+
+bool ConfirmQuery::accept(const QString& aQuery)
+{
+ HbMessageBox confirmQuery(HbMessageBox::MessageTypeQuestion);
+ confirmQuery.setDismissPolicy(HbDialog::NoDismiss);
+ confirmQuery.setTimeout(HbDialog::NoTimeout);
+ confirmQuery.setIconVisible(false);
+ confirmQuery.setText(aQuery);
+ confirmQuery.setAttribute(Qt::WA_DeleteOnClose);
+ confirmQuery.setStandardButtons(HbMessageBox::Yes | HbMessageBox::No);
+ confirmQuery.open(this,SLOT(queryDismissed(int)));
+ mAsyncToSyncCallEventLoop->exec();
+ return mQueryAccepted;
+}
+
+void ConfirmQuery::queryDismissed(int dismissAction)
+{
+ if (dismissAction == HbMessageBox::Yes) {
+ mQueryAccepted = true;
+ }
+ mAsyncToSyncCallEventLoop->exit();
+}
+
+ConfirmQuery::~ConfirmQuery()
+{
+ delete mAsyncToSyncCallEventLoop;
+}
+
+#include "moc_confirmquery.cpp"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/javaunicertstoreplugin/src.s60/confirmquery.h Tue Sep 14 21:06:50 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef CONFIRMQUERY_H
+#define CONFIRMQUERY_H
+
+#include <QEventLoop>
+
+namespace java
+{
+namespace security
+{
+
+class ConfirmQuery: public QObject
+{
+ Q_OBJECT
+
+public:
+ ConfirmQuery();
+ bool accept(const QString& aQuery);
+ virtual ~ConfirmQuery();
+
+private slots:
+ void queryDismissed(int dismissAction);
+
+private:
+ // own event loop used for "translating" asynchronous calls into
+ // synchronous calls
+ QEventLoop* mAsyncToSyncCallEventLoop;
+ // boolean for carying the user's input in between two async calls
+ bool mQueryAccepted;
+};
+
+} // end namespace security
+} // end namespace java
+
+#endif //CONFIRMQUERY_H
--- a/javacommons/security/javaunicertstoreplugin/src.s60/javacertstoreimpl.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/javaunicertstoreplugin/src.s60/javacertstoreimpl.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -20,8 +20,6 @@
#include <javausermessages.rsg>
-#include <avkon.rsg>
-#include <AknGlobalConfirmationQuery.h>
#include <stringresourcereader.h>
#include <StringLoader.h>
#include <data_caging_path_literals.hrh>
@@ -43,6 +41,12 @@
#include "s60commonutils.h"
#include "securitycommsmessagedefs.h"
+#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+#include "confirmquery.h"
+#else
+#include <avkon.rsg>
+#include <AknGlobalConfirmationQuery.h>
+#endif
//_LIT(KMIDP2TrustRoot, "J2ME MIDP2 Trust Root");
@@ -60,8 +64,11 @@
*
*/
CJavaCertStoreImpl::CJavaCertStoreImpl(CJavaCertStoreToken& aToken)
- : CActive(EPriorityNormal),mToken(aToken),mClientStatus(NULL),mState(EInitial),mQuery(0),mTempCertData(0)
+ : CActive(EPriorityNormal),mToken(aToken),mClientStatus(NULL),mState(EInitial),mTempCertData(0)
{
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+ mQuery.reset(0);
+#endif
}
/**
@@ -877,7 +884,9 @@
SetActive();
return;
}
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
delete mQuery.release();
+#endif
mState = EInitial;
TRequestStatus* pRequestStatus = &aRequestStatus;
User::RequestComplete(pRequestStatus,KErrCancel);
@@ -894,8 +903,24 @@
std::auto_ptr<CStringResourceReader> reader(CStringResourceReader::NewL(resourceFileName));
std::auto_ptr<HBufC> queryPrompt(reader->ReadResourceString(resourceId).AllocL());
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
mQuery.reset(CAknGlobalConfirmationQuery::NewL());
mQuery->ShowConfirmationQueryL(iStatus,queryPrompt->Des(),R_AVKON_SOFTKEYS_OK_CANCEL);
+#else
+ int completeStatus = KErrCancel;
+ ConfirmQuery* query = new ConfirmQuery();
+ QString queryText = QString::fromStdWString(
+ std::wstring((wchar_t*) queryPrompt->Ptr(),
+ queryPrompt->Length()));
+ if (query->accept(queryText))
+ {
+ completeStatus = KErrNone;
+ }
+ delete query; query = NULL;
+ TRequestStatus* status = &iStatus;
+ User::RequestComplete(status, completeStatus);
+#endif
+
}
/**
@@ -905,9 +930,15 @@
{
mState = EInitial;
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
delete mQuery.release();
+#endif
mState = EInitial;
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
if (EAknSoftkeyOk != aStatus)
+#else
+ if (KErrNone != aStatus)
+#endif
{
User::RequestComplete(mClientStatus,KErrCancel);
return;
@@ -922,9 +953,15 @@
{
mState = EInitial;
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
delete mQuery.release();
+#endif
mState = EInitial;
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
if (EAknSoftkeyOk != aStatus)
+#else
+ if (KErrNone != aStatus)
+#endif
{
User::RequestComplete(mClientStatus,KErrCancel);
return;
--- a/javacommons/security/javaunicertstoreplugin/src.s60/javacertstoreimpl.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/javaunicertstoreplugin/src.s60/javacertstoreimpl.h Tue Sep 14 21:06:50 2010 +0300
@@ -24,7 +24,9 @@
#include "commsclientendpoint.h"
#include "commsmessage.h"
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
class CAknGlobalConfirmationQuery;
+#endif
namespace java
{
@@ -142,7 +144,9 @@
RPointerArray<CJavaCertData> mCertsData;
TState mState;
RThread mUiThread;
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
std::auto_ptr<CAknGlobalConfirmationQuery> mQuery;
+#endif
//This class does not have ownership into this object.
CJavaCertData* mTempCertData;
--- a/javacommons/security/security.pro Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/security.pro Tue Sep 14 21:06:50 2010 +0300
@@ -15,5 +15,5 @@
#
TEMPLATE = subdirs
SUBDIRS += build/javasecurity.pro
-BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"javaunicertstoreplugin/build/bld.inf\""
+SUBDIRS += javaunicertstoreplugin/build/javaunicertstoreplugin.pro
BLD_INF_RULES.prj_extensions += "prj_extensions"
--- a/javacommons/security/src/midpauthenticationmoduleimpl.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/src/midpauthenticationmoduleimpl.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -480,7 +480,23 @@
{
if (JavaCommonUtils::isFirstBoot())
{
- ret_code = KCertAndSignatureOk;
+ // from the underlaying/openssl services point of view this
+ // is a failure. In order to behave like everything is ok,
+ // compute the root hash now so there is no need later to
+ // contact the underlaying/openssl services
+ // -> treat the last certificate from the chain as the user
+ // certificate
+ X509 *user_cert = NULL;
+ if (no_certs > 0)
+ {
+ user_cert = SecurityUtils::readCert(cert_chain[no_certs-1], strlen(cert_chain[no_certs-1]), PEM);
+ }
+ if (user_cert != NULL)
+ {
+ sprintf(root_hash,"%08lX",X509_issuer_name_hash(user_cert));
+ X509_free(user_cert);
+ ret_code = KCertAndSignatureOk;
+ }
}
}
@@ -519,7 +535,10 @@
}
// compute the root hash value if requested
- sprintf(root_hash,"%08lX",X509_issuer_name_hash(x509_ctx->current_issuer));
+ if (x509_ctx->current_issuer != NULL)
+ {
+ sprintf(root_hash,"%08lX",X509_issuer_name_hash(x509_ctx->current_issuer));
+ }
// add the '\0'
root_hash[MD5_DIGEST_LEN] = '\0';
--- a/javacommons/security/src/utils/storagehandler.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/src/utils/storagehandler.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -163,7 +163,7 @@
{
aCerts.push_back(JavaCommonUtils::wstringToInt(aValue));
}
- catch (ExceptionBase eb)
+ catch (ExceptionBase& eb)
{
WLOG1WSTR(EJavaStorage,
"Invalid cert index skipped: %s", aValue);
--- a/javacommons/security/subsystem.mk Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/subsystem.mk Tue Sep 14 21:06:50 2010 +0300
@@ -17,16 +17,14 @@
include $(JAVA_SRC_ROOT)/build/Makefile.defs
COMPONENTS = \
- build
+ build \
+ javaunicertstoreplugin/build
ifdef RD_JAVA_S60_RELEASE_5_0_IAD
SUBSYSTEMS = \
legacysupport
endif
-NONQTSUBSYSTEMS = \
- javaunicertstoreplugin/build
-
SYMBIAN_ONLY = \
javaunicertstoreplugin/build
ifdef RD_JAVA_S60_RELEASE_5_0_IAD
--- a/javacommons/security/tsrc/data/ext1/ext1.odc Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/data/ext1/ext1.odc Tue Sep 14 21:06:50 2010 +0300
@@ -1,5 +1,5 @@
[properties]
-Dcom.nokia.mj.addon.protected.ext1=com.nokia.mj.impl.,com.nokia.ext1.internal.,java.security.
-Dcom.nokia.mj.addon.restricted.ext1=com.nokia.ext1.public.,com.nokia.mj.impl.
--Dcom.nokia.mj.addon.permissions.ext1=com.nokia.ext1.public.Ext1Perm,com.nokia.mj.impl.gcf.protocol.socket.SocketPermissionImpl;javax.microedition.io.Connector.socket,com.nokia.ext1.internal.Ext1Perm;com.nokia.ext1.public.Ext1Perm,com.nokia.ext1.internal.Ext1Perm,*;
+-Dcom.nokia.mj.addon.permissions.ext1=com.nokia.ext1.public.Ext1Perm,com.nokia.mj.impl.gcf.protocol.socket.SocketPermissionImpl;javax.microedition.io.Connector.socket,com.nokia.ext1.internal.Ext1Perm;com.nokia.ext1.public.Ext1Perm,com.nokia.ext1.internal.Ext1Perm;
-Dcom.nokia.mj.addon.policies.ext1=c:\resource\java\security\extensions\ext1\policies\untrusted.ser;c:\resource\java\security\extensions\ext1\policies\trustedthirdparty.ser;
\ No newline at end of file
--- a/javacommons/security/tsrc/data/ext2/ext2.odc Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/data/ext2/ext2.odc Tue Sep 14 21:06:50 2010 +0300
@@ -1,5 +1,5 @@
[properties]
-Dcom.nokia.mj.addon.protected.ext2=com.nokia.ext2.internal.,com.nokia.ext1.public
-Dcom.nokia.mj.addon.restricted.ext2=com.nokia.ext2.public.,com.nokia.ext1.internal
--Dcom.nokia.mj.addon.permissions.ext2=com.nokia.ext2.public.Ext2Perm,com.nokia.ext1.internal.Ext1Perm;com.nokia.ext1.public.Ext1Perm,com.nokia.ext2.internal.Ext2Perm;com.nokia.ext2.public.Ext2Perm,com.nokia.ext2.internal.Ext2Perm,*
+-Dcom.nokia.mj.addon.permissions.ext2=com.nokia.ext2.public.Ext2Perm,com.nokia.ext1.internal.Ext1Perm;com.nokia.ext1.public.Ext1Perm,com.nokia.ext2.internal.Ext2Perm;com.nokia.ext2.public.Ext2Perm,com.nokia.ext2.internal.Ext2Perm
-Dcom.nokia.mj.addon.policies.ext2=c:\resource\java\security\extensions\ext2\policies\trustedthirdparty.ser
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/OMJSecurityTests.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/OMJSecurityTests.java Tue Sep 14 21:06:50 2010 +0300
@@ -196,9 +196,11 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
signingCerts = authenticationModule.getCertificatesDetails(session, appUID);
assertWithTrace(signingCerts != null
&& signingCerts.length == 1
@@ -241,9 +243,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
signingCerts = authenticationModule.getCertificatesDetails(session, appUID);
assertWithTrace(signingCerts != null
&& signingCerts.length == 1
@@ -285,9 +289,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(AuthenticationAttribute.MAIN_ATTRIBUTE_PREFIX + "1-1", new Attribute("", "MIICWDCCAcECBEhQwA0wDQYJKoZIhvcNAQEEBQAwczELMAkGA1UEBhMCZmkxEjAQBgNVBAgTCVBpcmthbm1hYTEQMA4GA1UEBxMHVGFtcGVyZTEOMAwGA1UEChMFTm9raWExDTALBgNVBAsTBEphdmExHzAdBgNVBAMMFkpQX0RldmljZV9NYW51ZmFjdHVyZXIwHhcNMDgwNjEyMDYxOTU3WhcNMTgwNjEwMDYxOTU3WjBzMQswCQYDVQQGEwJmaTESMBAGA1UECBMJUGlya2FubWFhMRAwDgYDVQQHEwdUYW1wZXJlMQ4wDAYDVQQKEwVOb2tpYTENMAsGA1UECxMESmF2YTEfMB0GA1UEAwwWSlBfRGV2aWNlX01hbnVmYWN0dXJlcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApi3ipIPj8O33/rZre1euh7Itd9d6ZVf2mvQ/tLpHEsFJe5XLOsVViMvFskhhKUzmDsRbP4J03L6827/vEDIi/1i8kJGLaoFqJYaLGFWI2Zmxlj6aJV8cfZyOjmQPWJn1IDEe1ZAWbvMSp8xibWRsCLNEGKIkxQvAr/QDK/6iS+kCAwEAATANBgkqhkiG9w0BAQQFAAOBgQCDXt6klAs6yKvdTab3D2wkdoi3Lu4YFsMgLexJOu5HhAUJ/9VYO+Q2+mjd95MRsTa5rWQ2Jjvhn57Z3z/KBOwfHbymmNtMk6Gl14H0vQRoHa31jh3mTuAy5KotDVthaDp30aOizk473NU68wY1WdP4gFk5ZhrpNea9q3st13BxIQ=="));
@@ -301,9 +307,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID2,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID2, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID2,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID2, null);
+ permissionGranter.grantJarPermissions( appUID2, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID2, null);
// 2 legacy unsigned MIDlets, install from JAD -> checkPermission succeeds
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session,appUID);
@@ -317,9 +325,11 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
signingCerts = authenticationModule.getCertificatesDetails(session, appUID);
assertWithTrace(signingCerts == null);
ac.checkPermission(new java.util.PropertyPermission("microedition.version", "read"));
@@ -331,9 +341,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes = new SecurityAttributes();
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
signingCerts = authenticationModule.getCertificatesDetails(session, appUID);
assertWithTrace(signingCerts == null);
ac.checkPermission(new java.util.PropertyPermission("microedition.version", "read"));
@@ -356,7 +368,8 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
storage.removeAuthenticationStorageData(appUID2);
permissionGranter.removeSecurityData(session,appUID2);
PermissionResolver.testClearCache();
@@ -388,9 +401,11 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
storage.removeAuthenticationStorageData(appUID2);
permissionGranter.removeSecurityData(session,appUID2);
PermissionResolver.testClearCache();
@@ -426,9 +441,11 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
storage.removeAuthenticationStorageData(appUID2);
permissionGranter.removeSecurityData(session,appUID2);
PermissionResolver.testClearCache();
@@ -454,9 +471,11 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
storage.removeAuthenticationStorageData(appUID2);
permissionGranter.removeSecurityData(session,appUID2);
PermissionResolver.testClearCache();
@@ -475,9 +494,11 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID2,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID2, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID2,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID2, appUID);
+ permissionGranter.grantJarPermissions( appUID2, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID2, null);
// update from manufacturer to operator succeeds for legacy suites
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session,appUID);
@@ -495,7 +516,8 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
storage.removeAuthenticationStorageData(appUID2);
permissionGranter.removeSecurityData(session,appUID2);
PermissionResolver.testClearCache();
@@ -525,9 +547,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
appPackageEntry = new StorageEntry();
appPackageEntry.addAttribute(new StorageAttribute(
StorageAttribute.ID,
@@ -556,9 +580,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID2,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID2, appUID, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID2,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID2, appUID);
+ permissionGranter.grantJarPermissions( appUID2, appUID, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID2, appUID);
// update from identified third party to identified third party but with different organization for signing certificate fails for MIDP3 MIDlets
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session,appUID);
@@ -573,7 +599,8 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
appPackageEntry = new StorageEntry();
appPackageEntry.addAttribute(new StorageAttribute(
StorageAttribute.ID,
@@ -623,9 +650,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
appPackageEntry = new StorageEntry();
appPackageEntry.addAttribute(new StorageAttribute(
StorageAttribute.ID,
@@ -654,9 +683,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID2,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID2, appUID, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID2,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID2, appUID);
+ permissionGranter.grantJarPermissions( appUID2, appUID, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID2, appUID);
// update from identified third party to identified third party succeeds (V1 requests P1 (Net), P2 (Messaging), P3 (Messaging), V2 requests P2 (Messaging), P4 (UserData), P5 (Net)) -> check that P1 is removed, P2 is retained (with old settings), P3 is removed, P4 and P5 are added with brand new settings
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session,appUID);
@@ -674,10 +705,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.wireless.messaging.sms.send,javax.wireless.messaging.mms.send"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
- permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
appPackageEntry = new StorageEntry();
appPackageEntry.addAttribute(new StorageAttribute(
StorageAttribute.ID,
@@ -706,9 +738,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.wireless.messaging.sms.send,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, appUID, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, appUID);
+ permissionGranter.grantJarPermissions( appUID, appUID, securityAttributes.getPermissionAttributes(), credentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, appUID);
grantedPermissions = storage.readGrantedPermissions(appUID);
MIDPPermission p1 = PermissionMappingTable.get("javax.wireless.messaging.sms.send");
MIDPPermission p2 = PermissionMappingTable.get("javax.microedition.io.Connector.file.read");
@@ -724,7 +758,7 @@
UserSecuritySettings.NO_INTERACTION_MODE,
UserSecuritySettings.ONESHOT_INTERACTION_MODE,
UserSecuritySettings.SESSION_INTERACTION_MODE})),
- new PolicyBasedPermissionImpl(p2.getName(), "*", p2.getActionList(),
+ new PolicyBasedPermissionImpl(p2.getName(), p2.getTarget(), p2.getActionList(),
new UserSecuritySettingsImpl("Read User Data Access",
UserSecuritySettings.SESSION_INTERACTION_MODE,
new int[]{UserSecuritySettings.BLANKET_INTERACTION_MODE,
@@ -780,9 +814,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.wireless.messaging.sms.send,javax.wireless.messaging.mms.send"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
assertWithTrace(checkStringArrays(blanketPermissions,
new String[] {UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.NET_ACCESS_SETTINGS),
UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.MESSAGING_SETTINGS)
@@ -814,9 +850,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.wireless.messaging.sms.send,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, appUID, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, appUID);
+ permissionGranter.grantJarPermissions( appUID, appUID, securityAttributes.getPermissionAttributes(), credentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, appUID);
assertWithTrace(checkStringArrays(blanketPermissions,
new String[] {UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.NET_ACCESS_SETTINGS),
UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.MESSAGING_SETTINGS),
@@ -839,9 +877,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.wireless.messaging.sms.send,javax.wireless.messaging.mms.send"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
assertWithTrace(checkStringArrays(blanketPermissions,
new String[] {UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.NET_ACCESS_SETTINGS),
UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.MESSAGING_SETTINGS)
@@ -872,9 +912,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.wireless.messaging.sms.send,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, appUID, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, appUID);
+ permissionGranter.grantJarPermissions( appUID, appUID, securityAttributes.getPermissionAttributes(), credentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, appUID);
assertWithTrace(checkStringArrays(blanketPermissions,
new String[] {UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.NET_ACCESS_SETTINGS),
UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.READ_USER_DATA_ACCESS_SETTINGS)
@@ -894,9 +936,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.wireless.messaging.sms.send,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, appUID, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, appUID);
+ permissionGranter.grantJarPermissions( appUID, appUID, securityAttributes.getPermissionAttributes(), credentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, appUID);
assertWithTrace(blanketPermissions == null);
// change some settings to e.g. Session and reinstall the same suite with same permissions -> check that only the settings which are not Blanket (due to being changed) are returned
storage.writeUserSecuritySettings(appUID, "Messaging", UserSecuritySettings.SESSION_INTERACTION_MODE);
@@ -913,9 +957,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.wireless.messaging.sms.send,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, appUID, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, appUID);
+ permissionGranter.grantJarPermissions( appUID, appUID, securityAttributes.getPermissionAttributes(), credentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, appUID);
assertWithTrace(checkStringArrays(blanketPermissions,
new String[] {UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.MESSAGING_SETTINGS)}));
// upgrade tests for legacy suites
@@ -948,9 +994,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.http,javax.wireless.messaging.sms.send"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
permissionGranter.getBlanketPermissions(appUID);
assertTrue(permissionGranter.getBlanketPermissionsDetails(appUID) == null);
+ permissionGranter.addSecurityData(session, appUID, null);
// getBlanketPermissionsDetails for Multimedia Read User Data -> no details
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
@@ -971,8 +1018,9 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.media.control.RecordControl,javax.microedition.io.Connector.file.read"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
assertTrue(permissionGranter.getBlanketPermissionsDetails(appUID) == null);
// getBlanketPermissionsDetails for Multimedia, Local Connectivity -> privacy details
permissionGranter.removeSecurityData(session, appUID);
@@ -994,10 +1042,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.media.control.RecordControl,javax.microedition.io.Connector.bluetooth.client"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
String blanketDetails = permissionGranter.getBlanketPermissionsDetails(appUID);
- assertTrue("qtn_java_settings_inst_query_perm_sec".equals(blanketDetails)
+ assertTrue("qtn_java_settings_inst_query_perm_sec".equals(blanketDetails)
|| "Allowing these permissions may result in compromised privacy".equals(
blanketDetails));
// getBlanketPermissionsDetails for Messaging, Multimedia -> net details
@@ -1020,10 +1069,11 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.media.control.RecordControl,javax.wireless.messaging.sms.send"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
blanketDetails = permissionGranter.getBlanketPermissionsDetails(appUID);
- assertTrue("qtn_java_settings_inst_query_perm_net".equals(blanketDetails)
+ assertTrue("qtn_java_settings_inst_query_perm_net".equals(blanketDetails)
|| "Allowing these permissions may result in compromised privacy or increased network usage costs".equals(
blanketDetails));
}
@@ -1058,6 +1108,7 @@
private void upgradeDomain(ProtectionDomain domain1, ProtectionDomain domain2, boolean expectToFail, boolean legacySuite)
{
+ AuthenticationCredentials[] credentials;
boolean success1 = false;
boolean success2 = false;
storage.removeAuthenticationStorageData(appUID);
@@ -1081,9 +1132,11 @@
StorageNames.VALUE,
(legacySuite ? "MIDP-2.0" : "MIDP-3.0")));
session.write(StorageNames.APPLICATION_PACKAGE_ATTRIBUTES_TABLE, appPackageEntry);
- authenticationModule.authenticateJar(session, appUID, null, domain1, TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar");
- permissionGranter.grantJarPermissions(session, appUID, null, domain1);
+ credentials = authenticationModule.authenticateJar(appUID, null, domain1, TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar");
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions(appUID, null, domain1);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, null);
signingCerts = authenticationModule.getCertificatesDetails(session, appUID);
success1 = (blanketPermissions == null && signingCerts == null);
ac.checkPermission(new java.util.PropertyPermission("microedition.version", "read"));
@@ -1093,7 +1146,8 @@
assertWithTrace(domainCategory.equals(domain1.getCategory()));
try
{
- authenticationModule.authenticateJar(session, appUID, appUID, domain2, TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar");
+ credentials = authenticationModule.authenticateJar(appUID, appUID, domain2, TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar");
+ authenticationModule.addSecurityData(session, appUID, appUID);
assertWithTrace(!expectToFail);
}
catch (InstallerSecurityException e)
@@ -1104,8 +1158,9 @@
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.DIFFERENT_SIGNERS, null)));
return;
}
- permissionGranter.grantJarPermissions(session, appUID,appUID, domain2);
+ permissionGranter.grantJarPermissions(appUID,appUID, domain2);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
+ permissionGranter.addSecurityData(session, appUID, appUID);
signingCerts = authenticationModule.getCertificatesDetails(session, appUID);
success2 = (blanketPermissions == null && signingCerts == null);
assertWithTrace(success1 == true && success2 == true);
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authentication/AuthenticationModuleTests.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authentication/AuthenticationModuleTests.java Tue Sep 14 21:06:50 2010 +0300
@@ -179,7 +179,8 @@
authenticationModule.removeSecurityData(session, appUID);
try
{
- authenticationModule.authenticateJar(session, appUID,null,"somethingWhichDoesNotExist", false);
+ authenticationModule.authenticateJar(appUID,null,"somethingWhichDoesNotExist", false);
+ authenticationModule.addSecurityData(session, appUID, null);
assertTrue(false);
}
catch (InstallerSecurityException e)
@@ -193,13 +194,15 @@
authenticationModule.removeSecurityData(session, appUID);
// 3. unsigned, install from JAR
authenticationModule.removeSecurityData(session, appUID);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
assertTrue(authenticationModule.getProtectionDomainCategory(session, appUID).equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN)
&& authenticationModule.getCertificatesDetails(session, appUID) == null);
authenticationModule.removeSecurityData(session, appUID);
- // 3.1. unsigned, install from JAR, no session provided to authenticateJar -> no authentication data stored to storage
+ // 3.1. unsigned, install from JAR, no session provided to addSecurityData -> no authentication data stored to storage
authenticationModule.removeSecurityData(session, appUID);
- authenticationModule.authenticateJar(null, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(null, appUID, null);
StorageEntry query = new StorageEntry();
query.addAttribute(new StorageAttribute(
StorageAttribute.ID,
@@ -231,13 +234,15 @@
credentials = authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
assertTrue(credentials != null && credentials.length == 1 && credentials[0].getProtectionDomainName().equals("UnidentifiedThirdParty")
&& authenticationModule.getCertificatesDetails(session, appUID) == null);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
assertTrue(authenticationModule.getProtectionDomainCategory(session, appUID).equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN));
authenticationModule.removeSecurityData(session, appUID);
// 5. upgrade of authentication storage data
authenticationModule.removeSecurityData(session, appUID);
storage.writeAuthenticationStorageData(appUID, new AuthenticationStorageData("UnidentifiedThirdParty", ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN, "jarHash", "rootHash", new Vector()));
- authenticationModule.authenticateJar(session, appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, appUID);
assertTrue(authenticationModule.getProtectionDomainCategory(session, appUID).equals(ApplicationInfo.UNIDENTIFIED_THIRD_PARTY_DOMAIN)
&& authenticationModule.getCertificatesDetails(session, appUID) == null);
authenticationModule.removeSecurityData(session, appUID);
@@ -272,7 +277,8 @@
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
details = (SigningCertificate[])authenticationModule.getCertificatesDetails(session, appUID);
- authenticationModule.authenticateJar(session, appUID, null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID, null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
// this empties the cache as well
authenticationModule.removeSecurityData(session, appUID);
@@ -359,7 +365,8 @@
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
try
{
- authenticationModule.authenticateJar(session, appUID, null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "modified_app.jar", false);
+ authenticationModule.authenticateJar(appUID, null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "modified_app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
assertTrue(INVALID_CERTIFICATE_SIGNATURE_MSG, false);
}
catch (InstallerSecurityException e)
@@ -552,7 +559,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.IDENTIFIED_THIRD_PARTY_DOMAIN));
// 17. Developer Certificates/Manufacturer - sign to operator party domain
@@ -566,7 +574,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.OPERATOR_DOMAIN));
// 18. Developer Certificates/Manufacturer - sign to manufacturer domain
@@ -580,7 +589,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.MANUFACTURER_DOMAIN));
// 19. Developer Certificates/Operator - sign to trusted third party domain
@@ -594,7 +604,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.IDENTIFIED_THIRD_PARTY_DOMAIN));
// 20. Developer Certificates/Operator - sign to operator party domain
@@ -608,7 +619,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.OPERATOR_DOMAIN));
// 21. Developer Certificates/Operator - sign to manufacturer domain -> still the operator domain is used
@@ -622,7 +634,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.OPERATOR_DOMAIN));
// 22. Developer Certificates/TrustedThirdParty - sign to manufacturer domain -> still the trusted third party domain is used
@@ -636,7 +649,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.IDENTIFIED_THIRD_PARTY_DOMAIN));
// 23. Developer Certificates/TrustedThirdParty - sign to operator domain -> still the trusted third party domain is used
@@ -650,7 +664,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.IDENTIFIED_THIRD_PARTY_DOMAIN));
// 24. Developer Certificates - no domain info -> fail
@@ -687,7 +702,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
domainCategory = authenticationModule.getProtectionDomainCategory(session, appUID);
assertTrue(domainCategory.equals(ApplicationInfo.IDENTIFIED_THIRD_PARTY_DOMAIN));
// 26. Developer Certificates - empty IMEI list -> failure
@@ -807,7 +823,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID, null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID, null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
SigningInfo info = authenticationModule.getSigningInfo("appName","appVersion","appVendor");
// app is unknown
assertTrue(info == null);
@@ -851,7 +868,8 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
- authenticationModule.authenticateJar(session, appUID, null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.authenticateJar(appUID, null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
info = authenticationModule.getSigningInfo("appName","appVersion","appVendor");
assertTrue(info.getProtectionDomain() != null
&& info.getProtectionDomain().getName() != null
@@ -958,7 +976,8 @@
authenticationModule.removeSecurityData(session, appUID);
try
{
- authenticationModule.authenticateJar(session, appUID, null, domain, TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar");
+ authenticationModule.authenticateJar(appUID, null, domain, TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "app.jar");
+ authenticationModule.addSecurityData(session, appUID, null);
assertTrue(!expectToFail);
}
catch (InstallerSecurityException e)
@@ -1200,7 +1219,8 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
assertTrue(true);
// PreInstallation: ocsp disabled, warning undefined, silent mode
ocspSettings = new OcspSettings(OcspSettings.OCSP_MODE_DISABLED, OcspSettings.OCSP_WARNING_UNDEFINED, true, "0", "0");
@@ -1218,7 +1238,8 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
assertTrue(true);
// PreInstallation: ocsp enabled, warning ignore, silent mode, ocsp url not set
ocspSettings = new OcspSettings(OcspSettings.OCSP_MODE_ENABLED, OcspSettings.OCSP_WARNING_IGNORE, true, "0", "0");
@@ -1236,7 +1257,8 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
assertTrue(true);
}
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/AccessControllerTests.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/AccessControllerTests.java Tue Sep 14 21:06:50 2010 +0300
@@ -47,6 +47,7 @@
public class AccessControllerTests extends TestCase implements InstallerMain
{
+ int assertTrace = 0;
// Begin j2meunit test framework setup
public void installerMain(String[] args)
{
@@ -91,6 +92,12 @@
{
}
+ private void assertWithTrace(boolean aCondition)
+ {
+ assertTrue("" + assertTrace, aCondition);
+ assertTrace++;
+ }
+
protected void testAccessControllerFactory()
{
Uid appUID1 = Uid.createUid("appUID1");
@@ -100,17 +107,17 @@
String appName = "AccessControllerTests";
// check null values
ac1 = AccessControllerFactoryImpl.getAccessController(null, null);
- assertTrue(ac1 == null);
+ assertWithTrace(ac1 == null);
AccessControllerFactoryImpl.destroyAccessController(null);
ac1 = AccessControllerFactoryImpl.getAccessController(null, "appName");
- assertTrue(ac1 == null);
+ assertWithTrace(ac1 == null);
AccessControllerFactoryImpl.destroyAccessController(null);
// check duplicates
AccessControllerFactoryImpl.destroyAccessController(appUID1);
ac1 = AccessControllerFactoryImpl.getAccessController(appUID1, appName);
ac2 = AccessControllerFactoryImpl.getAccessController(appUID1, appName);
AccessControllerFactoryImpl.destroyAccessController(appUID1);
- assertTrue(ac1 == ac2);
+ assertWithTrace(ac1 == ac2);
// check destroy
ac1 = AccessControllerFactoryImpl.getAccessController(appUID1, appName);
AccessControllerFactoryImpl.destroyAccessController(appUID1);
@@ -118,7 +125,7 @@
// call destroy two times (or calling it on a UID which does not have an instance)
AccessControllerFactoryImpl.destroyAccessController(appUID1);
AccessControllerFactoryImpl.destroyAccessController(appUID1);
- assertTrue(ac1 != ac2);
+ assertWithTrace(ac1 != ac2);
}
protected void testAccessController()
@@ -135,32 +142,32 @@
try
{
ac.checkPermission((Permission)null);
- assertTrue(false);
+ assertWithTrace(false);
}
catch (AccessControlException e)
{
- assertTrue(true);
+ assertWithTrace(true);
}
- assertTrue(ac.checkPermission((String)null) == 0);
+ assertWithTrace(ac.checkPermission((String)null) == 0);
// check permission which is not granted
PermissionResolver.testClearCache();
try
{
ac.checkPermission(new CommProtocolPermission("comm://"));
- assertTrue(false);
+ assertWithTrace(false);
}
catch (AccessControlException e)
{
- assertTrue(true);
+ assertWithTrace(true);
}
try
{
ac.checkPermission(new CommProtocolPermission("comm://"));
- assertTrue(false);
+ assertWithTrace(false);
}
catch (AccessControlException e)
{
- assertTrue(true);
+ assertWithTrace(true);
}
// check allowed permission which is granted
PermissionResolver.testClearCache();
@@ -176,11 +183,11 @@
try
{
ac.checkPermission(new FileProtocolPermission("file://myFile.txt", "read"));
- assertTrue(false);
+ assertWithTrace(false);
}
catch (AccessControlException e)
{
- assertTrue(true);
+ assertWithTrace(true);
}
storage.removeGrantedPermissions(appUID);
// check permission not allowed
@@ -202,11 +209,11 @@
try
{
ac.checkPermission(new SocketProtocolPermission("socket://:100"));
- assertTrue(false);
+ assertWithTrace(false);
}
catch (AccessControlException e)
{
- assertTrue(true);
+ assertWithTrace(true);
}
storage.removeGrantedPermissions(appUID);
// check user permission with NO as interaction mode -> security exception thrown
@@ -228,35 +235,35 @@
try
{
ac.checkPermission(new HttpProtocolPermissionImpl("http://"));
- assertTrue(false);
+ assertWithTrace(false);
}
catch (AccessControlException e)
{
- assertTrue(true);
+ assertWithTrace(true);
}
try
{
ac.checkPermission(new HttpProtocolPermission("http://"));
- assertTrue(false);
+ assertWithTrace(false);
}
catch (AccessControlException e)
{
- assertTrue(true);
+ assertWithTrace(true);
}
storage.removeGrantedPermissions(appUID);
// check the named permissions: unknown permission
- assertTrue(ac.checkPermission("unknownPermission") == 0);
+ assertWithTrace(ac.checkPermission("unknownPermission") == 0);
// check the named permissions: allowed permission
PermissionResolver.testClearCache();
grantedPermissions = new Vector();
grantedPermissions.addElement(new PolicyBasedPermissionImpl(
"com.nokia.mj.impl.gcf.protocol.socket.SocketPermissionImpl",
- "socket://",
+ "socket://*",
null,
null));
storage.removeGrantedPermissions(appUID);
storage.writeGrantedPermissions(appUID, null, grantedPermissions);
- assertTrue(ac.checkPermission("javax.microedition.io.Connector.socket") == 1);
+ assertWithTrace(ac.checkPermission("javax.microedition.io.Connector.socket") == 1);
// check the named permissions: user permission with NO interaction mode
PermissionResolver.testClearCache();
grantedPermissions = new Vector();
@@ -273,7 +280,7 @@
})));
storage.removeGrantedPermissions(appUID);
storage.writeGrantedPermissions(appUID, null, grantedPermissions);
- assertTrue(ac.checkPermission("javax.microedition.io.Connector.http") == 0);
+ assertWithTrace(ac.checkPermission("javax.microedition.io.Connector.http") == 0);
// check the named permissions: user permission with ONESHOT interaction mode
PermissionResolver.testClearCache();
grantedPermissions = new Vector();
@@ -290,7 +297,7 @@
})));
storage.removeGrantedPermissions(appUID);
storage.writeGrantedPermissions(appUID, null, grantedPermissions);
- assertTrue(ac.checkPermission("javax.microedition.io.Connector.http") == -1);
+ assertWithTrace(ac.checkPermission("javax.microedition.io.Connector.http") == -1);
// check the named permissions: user permission with BLANKET interaction mode (blanket prompt not shown yet)
PermissionResolver.testClearCache();
grantedPermissions = new Vector();
@@ -307,7 +314,7 @@
})));
storage.removeGrantedPermissions(appUID);
storage.writeGrantedPermissions(appUID, null, grantedPermissions);
- assertTrue(ac.checkPermission("javax.microedition.io.Connector.http") == -1);
+ assertWithTrace(ac.checkPermission("javax.microedition.io.Connector.http") == -1);
// check the named permissions: user permission with BLANKET interaction mode (blanket prompt shown already)
PermissionResolver.testClearCache();
grantedPermissions = new Vector();
@@ -325,7 +332,7 @@
storage.removeGrantedPermissions(appUID);
storage.writeGrantedPermissions(appUID, null, grantedPermissions);
storage.writeUserSecuritySettingsPromptFlag(appUID, "Net Access", true);
- assertTrue(ac.checkPermission("javax.microedition.io.Connector.http") == 1);
+ assertWithTrace(ac.checkPermission("javax.microedition.io.Connector.http") == 1);
// check the named permissions: user permission with SESSION interaction mode (session prompt not shown already)
PermissionResolver.testClearCache();
grantedPermissions = new Vector();
@@ -343,7 +350,7 @@
storage.removeGrantedPermissions(appUID);
storage.writeGrantedPermissions(appUID, null, grantedPermissions);
storage.writeUserSecuritySettingsPromptFlag(appUID, "Net Access", true);
- assertTrue(ac.checkPermission("javax.microedition.io.Connector.http") == -1);
+ assertWithTrace(ac.checkPermission("javax.microedition.io.Connector.http") == -1);
// check the named permissions: denied permission
PermissionResolver.testClearCache();
grantedPermissions = new Vector();
@@ -354,7 +361,7 @@
null));
storage.removeGrantedPermissions(appUID);
storage.writeGrantedPermissions(appUID, null, grantedPermissions);
- assertTrue(ac.checkPermission("javax.wireless.messaging.mms.send") == 0);
+ assertWithTrace(ac.checkPermission("javax.wireless.messaging.mms.send") == 0);
// cleanup
storage.removeGrantedPermissions(appUID);
AccessControllerFactoryImpl.destroyAccessController(appUID);
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/InteractiveAccessControllerTests.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/InteractiveAccessControllerTests.java Tue Sep 14 21:06:50 2010 +0300
@@ -626,8 +626,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
+ permissionGranter.addSecurityData(session, appUID, null);
permissionGranter.getBlanketPermissions(appUID);
ac.checkPermission(new HttpProtocolPermissionImpl("http://", "\n(choose ALLOW)"));
ac.checkPermission(new HttpProtocolPermissionImpl("http://", "\n(IF YOU SEE THIS PROMPT THE TEST FAILED)"));
@@ -659,8 +661,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, appUID, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,appUID,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, appUID);
+ permissionGranter.grantJarPermissions( appUID, appUID, securityAttributes.getPermissionAttributes(), credentials);
+ permissionGranter.addSecurityData(session, appUID, appUID);
blanketPromptShown = storage.readUserSecuritySettingsPromptFlag(appUID, "Net Access");
ac.checkPermission(new HttpProtocolPermissionImpl("http://", "\n(IF YOU SEE THIS PROMPT THE TEST FAILED)"));
storage.removeAuthenticationStorageData(appUID);
@@ -687,8 +691,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(com.nokia.mj.impl.security.midp.common.PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","javax.microedition.io.Connector.socket,javax.microedition.io.Connector.http"));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
+ permissionGranter.addSecurityData(session, appUID, null);
signingCerts = authenticationModule.getCertificatesDetails(session, appUID);
assertTrue(signingCerts != null
&& signingCerts.length == 1
@@ -725,8 +731,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), credentials);
+ permissionGranter.addSecurityData(session, appUID, null);
signingCerts = authenticationModule.getCertificatesDetails(session, appUID);
assertTrue(signingCerts == null);
ac.checkPermission(new HttpProtocolPermissionImpl("http://url", "\n(choose ALLOW)"));
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionGranterTests.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionGranterTests.java Tue Sep 14 21:06:50 2010 +0300
@@ -57,6 +57,7 @@
{
private static String TEST_DATA_DIR;
+ int assertTrace = 0;
static
{
@@ -78,6 +79,12 @@
}
}
+ private void assertWithTrace(boolean aCondition)
+ {
+ assertTrue("" + assertTrace, aCondition);
+ assertTrace++;
+ }
+
// general-purpose constants
private static final String MIDP_PROFILE_ATTRIBUTE_NAME = "MicroEdition-Profile";
private static final String MIDP3 = "MIDP-3.0";
@@ -226,12 +233,12 @@
MIDPPermission[] jadPermissions;
MIDPPermission[] jarPermissions;
MIDPPermission[] allPermissions;
- assertTrue(permissionGranter != null);
+ assertWithTrace(permissionGranter != null);
// test the null values
permissionGranter.removeSecurityData(session, appUID);
- permissionGranter.grantJarPermissions(null, null, null, (PermissionAttribute[])null);
+ permissionGranter.grantJarPermissions(null, null, (PermissionAttribute[])null, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(grantedPermissions == null);
+ assertWithTrace(grantedPermissions == null);
// populate the storage
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session, appUID);
@@ -259,9 +266,10 @@
allAttributes.put(PermissionAttribute.OPTIONAL_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_DATAGRAM_PERMISSION + COMMA + " " + MIDP2_COMM_PERMISSION));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_SOCKET_PERMISSION + COMMA + MIDP2_HTTP_PERMISSION));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Manufacturer", new String[]
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Manufacturer", new String[]
{
INTERNAL_DATAGRAM_PERMISSION, INTERNAL_COMM_PERMISSION, INTERNAL_SOCKET_PERMISSION,INTERNAL_HTTP_PERMISSION,"javax.microedition.PropertyPermission","javax.microedition.midlet.AutoStartPermission"
}),
@@ -287,9 +295,10 @@
allAttributes.put(PermissionAttribute.OPTIONAL_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_DATAGRAM_PERMISSION + COMMA + " " + MIDP2_COMM_PERMISSION));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_SOCKET_PERMISSION + COMMA + MIDP2_HTTP_PERMISSION));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("IdentifiedThirdParty",
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("IdentifiedThirdParty",
new String[] {INTERNAL_DATAGRAM_PERMISSION, INTERNAL_COMM_PERMISSION, INTERNAL_SOCKET_PERMISSION,INTERNAL_HTTP_PERMISSION}),
getAssignedPermissions("IdentifiedThirdParty")));
// 1.2 One of the requested mandatory permission is not available in the domain -> fail
@@ -314,12 +323,13 @@
allAttributes.put(PermissionAttribute.OPTIONAL_ATTRIBUTE_PREFIX + "1", new Attribute("",MIDP3_DATAGRAM_PERMISSION));
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "1", new Attribute("",MIDP3_RUNTIME_PERMISSION + " name"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
- assertTrue(INVALID_PERMISSION_VALUE_MSG, false);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_PERMISSION_VALUE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -343,9 +353,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
allAttributes.put(PermissionAttribute.OPTIONAL_ATTRIBUTE_PREFIX + "1", new Attribute("",MIDP3_RUNTIME_PERMISSION + " name"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getAssignedPermissions("IdentifiedThirdParty"), true));
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getAssignedPermissions("IdentifiedThirdParty"), true));
// 2. Legacy, signed : permissions NOT requested in JAD & permissions requested in JAR -> grant the requested permissions filled in with right
// targets/actions from the policy plus the assigned ones
storage.removeAuthenticationStorageData(appUID);
@@ -365,9 +376,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_SOCKET_PERMISSION + COMMA + MIDP2_HTTP_PERMISSION));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Operator", new String[]
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Operator", new String[]
{
INTERNAL_SOCKET_PERMISSION, INTERNAL_HTTP_PERMISSION,"javax.microedition.PropertyPermission","javax.microedition.midlet.AutoStartPermission"
}),
@@ -389,9 +401,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(grantedPermissions != null && checkGrantedPermissions(grantedPermissions, getAssignedPermissions("IdentifiedThirdParty"), true));
+ assertWithTrace(grantedPermissions != null && checkGrantedPermissions(grantedPermissions, getAssignedPermissions("IdentifiedThirdParty"), true));
// same for a domain which has one assigned permissions -> only the assigned + default permissions are granted
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session, appUID);
@@ -409,9 +422,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Operator", new String[] {"javax.microedition.PropertyPermission","javax.microedition.midlet.AutoStartPermission"}),
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("Operator", new String[] {"javax.microedition.PropertyPermission","javax.microedition.midlet.AutoStartPermission"}),
getDefaultPermissions()));
// 4. Legacy, unsigned : permissions requested in JAD & permissions requested in JAR -> ignore requested permissions and
// grant all the permissions available in the policy for untrusted MIDlets
@@ -434,9 +448,10 @@
allAttributes.put(PermissionAttribute.OPTIONAL_LEGACY_ATTRIBUTE_NAME, new Attribute("","MyOwnOptionalPermission"));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","MyOwnMandatoryPermission"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("UnidentifiedThirdParty")));
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("UnidentifiedThirdParty")));
// 5. Legacy, unsigned : permissions requested in JAD & permissions NOT requested in JAR -> ignore requested permissions and,
// grant all the permissions available in the policy for untrusted MIDlets
storage.removeAuthenticationStorageData(appUID);
@@ -455,9 +470,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("UnidentifiedThirdParty")));
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("UnidentifiedThirdParty")));
// 6. Legacy, unsigned : permissions NOT requested in JAD & permissions requested in JAR -> ignore requested permissions and
// grant all the permissions available in the policy for untrusted MIDlets
storage.removeAuthenticationStorageData(appUID);
@@ -476,9 +492,10 @@
allAttributes.put(PermissionAttribute.OPTIONAL_LEGACY_ATTRIBUTE_NAME, new Attribute("","MyOwnOptionalPermission"));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","MyOwnMandatoryPermission"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("UnidentifiedThirdParty")));
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("UnidentifiedThirdParty")));
// 7. Legacy, unsigned : permissions NOT requested in JAD & permissions NOT requested in JAR -> grant all the permissions available in the policy for untrusted MIDlets
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session, appUID);
@@ -494,9 +511,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("UnidentifiedThirdParty")));
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions("UnidentifiedThirdParty")));
// 8. MIDP3 unsigned, unknown mandatory permission in JAD file -> failure
permissionGranter.removeSecurityData(session, appUID);
try
@@ -509,11 +527,11 @@
authCredentials = new AuthenticationCredentials[1];
authCredentials[0] = new AuthenticationCredentials("UnidentifiedThirdParty", "UIDP");
permissionGranter.grantJadPermissions(appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -528,12 +546,13 @@
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "1",new Attribute("","MyMandatoryClass MyMandatoryTarget MyMandatoryAction1,MyMandatoryAction2,MyMandatoryAction3"));
securityAttributes = new SecurityAttributes();
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -555,9 +574,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(grantedPermissions != null && checkGrantedPermissions(grantedPermissions, getAssignedPermissions("UnidentifiedThirdParty"), true));
+ assertWithTrace(grantedPermissions != null && checkGrantedPermissions(grantedPermissions, getAssignedPermissions("UnidentifiedThirdParty"), true));
// 9.1. MIDP3 unsigned, P1, unknown optional P2 requested in JAD -> unknown permission is ignored, grant only P1 plus the assigned permissions
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session, appUID);
@@ -575,9 +595,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(grantedPermissions != null && checkGrantedPermissions(grantedPermissions,
+ assertWithTrace(grantedPermissions != null && checkGrantedPermissions(grantedPermissions,
new MIDPPermission[] {new MIDPPermission(INTERNAL_SOCKET_PERMISSION,"socket://")},getAssignedPermissions("UnidentifiedThirdParty")));
// 10. MIDP3 unsigned MIDlet, unknown mandatory permission in JAR file -> failure
permissionGranter.removeSecurityData(session, appUID);
@@ -588,12 +609,13 @@
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "1",new Attribute("","MyMandatoryClass MyMandatoryTarget MyMandatoryAction1,MyMandatoryAction2,MyMandatoryAction3"));
securityAttributes = new SecurityAttributes();
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -611,12 +633,13 @@
allAttributes.put(AuthenticationAttribute.SECOND_ATTRIBUTE_PREFIX + "1", new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -635,12 +658,13 @@
securityAttributes.addDescriptorAttributes(allAttributes);
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "1",new Attribute("","MyMandatoryClass MyMandatoryTarget MyMandatoryAction1,MyMandatoryAction2,MyMandatoryAction3"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -659,12 +683,13 @@
securityAttributes.addDescriptorAttributes(allAttributes);
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "1",new Attribute("","MyMandatoryClass MyMandatoryTarget MyMandatoryAction1,MyMandatoryAction2,MyMandatoryAction3"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -691,9 +716,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP3));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(grantedPermissions != null && checkGrantedPermissions(grantedPermissions,
+ assertWithTrace(grantedPermissions != null && checkGrantedPermissions(grantedPermissions,
new MIDPPermission[]
{
new MIDPPermission(INTERNAL_SOCKET_PERMISSION,"socket://50"),
@@ -725,11 +751,11 @@
authCredentials = new AuthenticationCredentials[1];
authCredentials[0] = new AuthenticationCredentials("UnidentifiedThirdParty", "UIDP");
permissionGranter.grantJadPermissions(appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
- assertTrue(INVALID_PERMISSION_VALUE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_PERMISSION_VALUE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -765,9 +791,10 @@
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "5",new Attribute("",MIDP3_DATAGRAM_PERMISSION + " datagram://12345"));
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "6",new Attribute("",MIDP3_COMM_PERMISSION + " comm:123"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(grantedPermissions != null && checkGrantedPermissions(grantedPermissions,
+ assertWithTrace(grantedPermissions != null && checkGrantedPermissions(grantedPermissions,
new MIDPPermission[]
{
new MIDPPermission(INTERNAL_SOCKET_PERMISSION,"socket://50"),
@@ -810,9 +837,10 @@
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "5",new Attribute("",MIDP3_DATAGRAM_PERMISSION + " datagram://12345"));
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "6",new Attribute("",MIDP3_COMM_PERMISSION + " comm:123"));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(grantedPermissions != null && checkGrantedPermissions(grantedPermissions,
+ assertWithTrace(grantedPermissions != null && checkGrantedPermissions(grantedPermissions,
new MIDPPermission[]
{
new MIDPPermission(INTERNAL_SOCKET_PERMISSION,"socket://50"),
@@ -827,12 +855,12 @@
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session, appUID);
blanketPermissions = permissionGranter.getBlanketPermissions(null);
- assertTrue(blanketPermissions == null);
+ assertWithTrace(blanketPermissions == null);
// 20. getBlanketPermissions - unknown appUID
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session, appUID);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
- assertTrue(blanketPermissions == null);
+ assertWithTrace(blanketPermissions == null);
// 21. getBlanketPermissions - unsigned suite
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session, appUID);
@@ -848,9 +876,10 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
- assertTrue(blanketPermissions == null);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(blanketPermissions == null);
// 22. getBlanketPermissions - one of the requested permissions does not allow Blanket
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
@@ -872,9 +901,10 @@
allAttributes.put(PermissionAttribute.OPTIONAL_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_DATAGRAM_PERMISSION + COMMA + " " + MIDP2_SMS_SEND_PERMISSION));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_SOCKET_PERMISSION + COMMA + MIDP2_HTTP_PERMISSION));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
- assertTrue(blanketPermissions == null);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(blanketPermissions == null);
// 23. getBlanketPermissions - request one permissions which is already in Blanket
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
@@ -895,9 +925,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.OPTIONAL_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_HTTP_PERMISSION));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
- assertTrue(blanketPermissions == null);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(blanketPermissions == null);
// 24. getBlanketPermissions - request Auto Invocation and Net Access -> mutually exclusive permissions
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
@@ -918,9 +949,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.OPTIONAL_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_PUSH_REGISTRY_PERMISSION + COMMA + MIDP2_HTTP_PERMISSION));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
- assertTrue(blanketPermissions == null);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(blanketPermissions == null);
// 25. getBlanketPermissions - manufacturer signed MIDlet
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
@@ -941,9 +973,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_HTTP_PERMISSION + COMMA + MIDP2_SMS_SEND_PERMISSION + COMMA + MIDP2_MMS_OPEN_PERMISSION + COMMA + MIDP2_COMM_PERMISSION));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
- assertTrue(blanketPermissions == null);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(blanketPermissions == null);
// 26. getBlanketPermissions - request Messaging, Net Access and Local connectivity. Since Messaging and Net Access have the current interaction mode set to Blanket, only Local connectivity is returned
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
@@ -964,9 +997,10 @@
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("",MIDP2_HTTP_PERMISSION + COMMA + MIDP2_SMS_SEND_PERMISSION + COMMA + MIDP2_MMS_OPEN_PERMISSION + COMMA + MIDP2_COMM_PERMISSION));
securityAttributes.addManifestAttributes(allAttributes);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
+ permissionGranter.grantJarPermissions( appUID, null, securityAttributes.getPermissionAttributes(), authCredentials);
blanketPermissions = permissionGranter.getBlanketPermissions(appUID);
- assertTrue(blanketPermissions != null && blanketPermissions.length == 1 && blanketPermissions[0].equals(UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.LOCAL_CONNECTIVITY_SETTINGS)));
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(blanketPermissions != null && blanketPermissions.length == 1 && blanketPermissions[0].equals(UserSecuritySettingsImpl.getLocalizedName(UserSecuritySettings.LOCAL_CONNECTIVITY_SETTINGS)));
permissionGranter.setPermissionsToBlanket(session, appUID);
grantedPermissions = storage.readGrantedPermissions(appUID);
for (int i=0; i<grantedPermissions.size(); i++)
@@ -977,20 +1011,22 @@
permission.getUserSecuritySettings();
if (settings != null && settings.getName() == UserSecuritySettings.LOCAL_CONNECTIVITY_SETTINGS)
{
- assertTrue(settings.getCurrentInteractionMode() == UserSecuritySettings.BLANKET_INTERACTION_MODE);
+ assertWithTrace(settings.getCurrentInteractionMode() == UserSecuritySettings.BLANKET_INTERACTION_MODE);
}
}
// grantAllPermissions - null values
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
- permissionGranter.grantJarPermissions(session, null, null, (ProtectionDomain)null);
+ permissionGranter.grantJarPermissions(null, null, (ProtectionDomain)null);
+ permissionGranter.addSecurityData(session, null, null);
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
- permissionGranter.grantJarPermissions(session, appUID, null, (ProtectionDomain)null);
+ permissionGranter.grantJarPermissions(appUID, null, (ProtectionDomain)null);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
- assertTrue(grantedPermissions == null);
+ assertWithTrace(grantedPermissions == null);
// grantAllPermissions - operator domain
grantAllPermissions(ProtectionDomain.getOperatorDomain());
// grantAllPermissions - manufacturer domain
@@ -1008,11 +1044,12 @@
{
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
- permissionGranter.grantJarPermissions(session, appUID, null, domain);
+ permissionGranter.grantJarPermissions(appUID, null, domain);
+ permissionGranter.addSecurityData(session, appUID, null);
grantedPermissions = storage.readGrantedPermissions(appUID);
permissionGranter.removeSecurityData(session, appUID);
storage.removeAuthenticationStorageData(appUID);
- assertTrue(checkGrantedPermissions(grantedPermissions, getPolicyPermissions(domain.getName())));
+ assertWithTrace(checkGrantedPermissions(grantedPermissions, getPolicyPermissions(domain.getName())));
}
private static MIDPPermission[] getPolicyPermissions(String policyName, String[] permissionNameFilter, String permissionTypeFilter)
@@ -1041,7 +1078,7 @@
&& findString(policyPerms[i].getName(), permissionNameFilter) != -1)
|| permissionNameFilter == null) && (permissionTypeFilter == null
|| (permissionTypeFilter.equals("assigned")
- && (policyPerms[i].getType() == PolicyBasedPermission.ASSIGNED_TYPE
+ && (policyPerms[i].getType() == PolicyBasedPermission.ASSIGNED_TYPE
|| policyPerms[i].getType() == PolicyBasedPermission.USER_ASSIGNED_TYPE))))
{
vPermissions.addElement(new MIDPPermission(policyPerms[i].getName(), policyPerms[i].getTarget(), policyPerms[i].getActionList()));
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/TestPermissionMappingTable.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/TestPermissionMappingTable.java Tue Sep 14 21:06:50 2010 +0300
@@ -62,7 +62,7 @@
"com.nokia.mj.impl.security.midp.authorization.DatagramProtocolPermissionImpl", "datagram://"));
TEST_PERMISSION_MAPPING_TABLE.put(
"javax.microedition.io.Connector.comm", new MIDPPermission(
- "com.nokia.mj.impl.security.midp.authorization.CommProtocolPermissionImpl", "comm://*"));
+ "com.nokia.mj.impl.security.midp.authorization.CommProtocolPermissionImpl", "comm:*"));
TEST_PERMISSION_MAPPING_TABLE.put(
"javax.microedition.io.PushRegistry", new MIDPPermission(
"javax.microedition.io.PushRegistryPermission", "*"));
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/common/SecurityDescriptorAttributesTests.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/common/SecurityDescriptorAttributesTests.java Tue Sep 14 21:06:50 2010 +0300
@@ -39,6 +39,7 @@
*/
public class SecurityDescriptorAttributesTests extends TestCase implements InstallerMain
{
+ int assertTrace = 0;
/**
* Hashtable holding all the attributes. Tests populate this hashtable
@@ -78,7 +79,7 @@
midp2PermissionTargets.put(INTERNAL_HTTPS_PERMISSION, "https://*");
midp2PermissionTargets.put(INTERNAL_SSL_PERMISSION, "ssl://*");
midp2PermissionTargets.put(INTERNAL_DATAGRAM_PERMISSION,"datagram://*");
- midp2PermissionTargets.put(INTERNAL_COMM_PERMISSION, "comm://*");
+ midp2PermissionTargets.put(INTERNAL_COMM_PERMISSION, "comm:*");
midp2PermissionTargets.put(INTERNAL_PUSH_REGISTRY_PERMISSION, "*");
}
@@ -164,7 +165,7 @@
// no attributes
allAttributes.clear();
authAttributes = securityAttributes.getAuthenticationAttributes();
- assertTrue((authAttributes == null) || (authAttributes.length == 0));
+ assertWithTrace((authAttributes == null) || (authAttributes.length == 0));
// empty certificate attribute
try
{
@@ -172,11 +173,11 @@
allAttributes.put(AuthenticationAttribute.MAIN_ATTRIBUTE_PREFIX + "1-1", new Attribute("", ""));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(EMPTY_CERTIFICATE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(EMPTY_CERTIFICATE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -189,11 +190,11 @@
allAttributes.put(AuthenticationAttribute.MAIN_ATTRIBUTE_PREFIX + "1-1", new Attribute("","?%cert"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(INVALID_CERTIFICATE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_CERTIFICATE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -204,7 +205,7 @@
allAttributes.put(AuthenticationAttribute.MAIN_ATTRIBUTE_PREFIX + "1-1", new Attribute("","cert"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(securityAttributes.getAuthenticationAttributes() == null);
+ assertWithTrace(securityAttributes.getAuthenticationAttributes() == null);
// missing certificate attribute
try
{
@@ -212,11 +213,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_LEGACY_ATTRIBUTE_NAME, new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(MISSING_CERTIFICATE_ATTRIBUTE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(MISSING_CERTIFICATE_ATTRIBUTE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_MISSING,
@@ -230,11 +231,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_LEGACY_ATTRIBUTE_NAME, new Attribute("","?signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(INVALID_CERTIFICATE_SIGNATURE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_CERTIFICATE_SIGNATURE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -249,11 +250,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_ATTRIBUTE_PREFIX + "1", new Attribute("","?signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(INVALID_CERTIFICATE_SIGNATURE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_CERTIFICATE_SIGNATURE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -268,11 +269,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_ATTRIBUTE_PREFIX + "2", new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(MISSING_CERTIFICATE_ATTRIBUTE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(MISSING_CERTIFICATE_ATTRIBUTE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_MISSING,
@@ -286,11 +287,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_ATTRIBUTE_PREFIX + "1", new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(MIDP3_ATTRIBUTE_NOT_ALLOWED_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(MIDP3_ATTRIBUTE_NOT_ALLOWED_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.INVALID_DESCRIPTOR
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -305,11 +306,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_LEGACY_ATTRIBUTE_NAME, new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(MIDP2_SIGNATURE_NOT_ALLOWED_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(MIDP2_SIGNATURE_NOT_ALLOWED_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.INVALID_DESCRIPTOR
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -326,11 +327,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_LEGACY_ATTRIBUTE_NAME, new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(MIDP2_SIGNATURE_NOT_ALLOWED_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(MIDP2_SIGNATURE_NOT_ALLOWED_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.INVALID_DESCRIPTOR
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -344,7 +345,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authAttributes = securityAttributes.getAuthenticationAttributes();
- assertTrue(authAttributes != null
+ assertWithTrace(authAttributes != null
&& authAttributes.length == 1
&& checkChainsAndSignatures(authAttributes,
new String[] {"cert1", "cert2"},
@@ -360,7 +361,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authAttributes = securityAttributes.getAuthenticationAttributes();
- assertTrue(authAttributes != null
+ assertWithTrace(authAttributes != null
&& authAttributes.length == 1
&& checkChainsAndSignatures(authAttributes,
new String[] {"cert1", "cert2"},
@@ -377,7 +378,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authAttributes = securityAttributes.getAuthenticationAttributes();
- assertTrue(authAttributes != null
+ assertWithTrace(authAttributes != null
&& authAttributes.length == 1
&& checkChainsAndSignatures(authAttributes,
new String[] {"cert1", "cert2"},
@@ -391,7 +392,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authAttributes = securityAttributes.getAuthenticationAttributes();
- assertTrue(authAttributes != null
+ assertWithTrace(authAttributes != null
&& authAttributes.length == 1
&& checkChainsAndSignatures(authAttributes,
new String[] {"cert1", "cert2"},
@@ -410,7 +411,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authAttributes = securityAttributes.getAuthenticationAttributes();
- assertTrue(authAttributes != null
+ assertWithTrace(authAttributes != null
&& authAttributes.length == 1
&& checkChainsAndSignatures(authAttributes,
new String[] {"cert11", "cert12"},
@@ -430,11 +431,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_ATTRIBUTE_PREFIX + "2" , new Attribute("","signature2"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(CERTIFICATE_WITHOUT_SIGNATURE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_CERTIFICATE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -452,11 +453,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_ATTRIBUTE_PREFIX + "1" , new Attribute("","signature1"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(INVALID_CERTIFICATE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_CERTIFICATE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -479,7 +480,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authAttributes = securityAttributes.getAuthenticationAttributes();
- assertTrue(authAttributes != null
+ assertWithTrace(authAttributes != null
&& authAttributes.length == 2
&& checkChainsAndSignatures(authAttributes,
new String[] {"cert11", "cert12", "cert21", "cert22", "cert23"},
@@ -498,18 +499,18 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
authAttributes = securityAttributes.getAuthenticationAttributes();
- assertTrue(authAttributes != null && authAttributes.length == 100);
+ assertWithTrace(authAttributes != null && authAttributes.length == 100);
for (int i=0; i<100; i++)
{
// make sure we have 10 certs in each chain and a corresponding signature
- assertTrue(authAttributes[i].getCertChain() != null
+ assertWithTrace(authAttributes[i].getCertChain() != null
&& authAttributes[i].getSignature() != null
&& authAttributes[i].getCertChain().length == 10
&& authAttributes[i].getSignature().equals("signature" + (i+1)));
// check each chain
for (int j=0; j<10; j++)
{
- assertTrue((authAttributes[i].getCertChain())[j]
+ assertWithTrace((authAttributes[i].getCertChain())[j]
.equals("cert" + (i+1) + "" + (j+1)));
}
}
@@ -526,11 +527,11 @@
allAttributes.put(PermissionAttribute.MANDATORY_LEGACY_ATTRIBUTE_NAME, new Attribute("","Perm1, Perm2"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(LEGACY_NOT_ALLOWED_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(LEGACY_NOT_ALLOWED_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.INVALID_DESCRIPTOR
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -544,11 +545,11 @@
allAttributes.put(PermissionAttribute.OPTIONAL_LEGACY_ATTRIBUTE_NAME, new Attribute("","Perm1, Perm2"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(LEGACY_NOT_ALLOWED_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(LEGACY_NOT_ALLOWED_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.INVALID_DESCRIPTOR
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -563,11 +564,11 @@
new Attribute("","PermissionClassName TargetName ActionList"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(MIDP3_ATTRIBUTE_NOT_ALLOWED_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(MIDP3_ATTRIBUTE_NOT_ALLOWED_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.INVALID_DESCRIPTOR
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -582,11 +583,11 @@
new Attribute("","PermissionClassName TargetName ActionList"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(MIDP3_ATTRIBUTE_NOT_ALLOWED_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(MIDP3_ATTRIBUTE_NOT_ALLOWED_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.INVALID_DESCRIPTOR
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -601,7 +602,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 1
&& permissionAttributes[0].isLegacyAttribute());
// MIDP2 mandatory permissions handling - invalid permission value
@@ -616,11 +617,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_LEGACY_ATTRIBUTE_NAME, new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -640,11 +641,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_LEGACY_ATTRIBUTE_NAME, new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -663,7 +664,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 2
&& checkImportance(permissionAttributes, 0, 2)
&& checkNamesAndTargets(permissionAttributes,
@@ -681,7 +682,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 1
&& checkImportance(permissionAttributes, 0, 1)
&& checkNamesAndTargets(permissionAttributes,
@@ -698,11 +699,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_LEGACY_ATTRIBUTE_NAME, new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(UNKNOWN_PERMISSION_MSG, true);
+ assertWithTrace(true);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ assertWithTrace(false);
}
// MIDP2 optional permissions handling - unknown permission value
try
@@ -716,11 +717,11 @@
allAttributes.put(AuthenticationAttribute.SECOND_LEGACY_ATTRIBUTE_NAME, new Attribute("","signature"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(UNKNOWN_PERMISSION_MSG, true);
+ assertWithTrace(true);
}
catch (InvalidAttributeException e)
{
- assertTrue(UNKNOWN_PERMISSION_MSG, false);
+ assertWithTrace(false);
}
// MIDP2 optional permissions handling - known permission value
allAttributes.clear();
@@ -734,7 +735,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 2
&& checkImportance(permissionAttributes, 2, 0)
&& checkNamesAndTargets(permissionAttributes,
@@ -756,7 +757,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 1
&& checkImportance(permissionAttributes, 1, 0)
&& checkNamesAndTargets(permissionAttributes,
@@ -777,7 +778,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 4
&& checkImportance(permissionAttributes, 2, 2)
&& checkNamesAndTargets(permissionAttributes,
@@ -797,7 +798,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 2
&& checkImportance(permissionAttributes, 1, 1)
&& checkNamesAndTargets(permissionAttributes,
@@ -811,7 +812,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 2
&& checkImportance(permissionAttributes, 1, 1)
&& checkNamesAndTargets(permissionAttributes,
@@ -825,7 +826,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 2
&& checkImportance(permissionAttributes, 1, 1)
&& checkNamesAndTargets(permissionAttributes,
@@ -841,7 +842,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 2
&& checkImportance(permissionAttributes, 1, 1)
&& checkNamesAndTargets(permissionAttributes,
@@ -855,11 +856,11 @@
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "1",new Attribute("","MyMandatoryClass MyMandatoryTarget MyMandatoryAction1 MyMandatoryAction2"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(INVALID_PERMISSION_VALUE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_PERMISSION_VALUE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -873,11 +874,11 @@
allAttributes.put(PermissionAttribute.MANDATORY_ATTRIBUTE_PREFIX + "1",new Attribute("","MyMandatoryClass MyMandatoryTarget MyMandatoryAction1 MyMandatoryAction2"));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(INVALID_PERMISSION_VALUE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(INVALID_PERMISSION_VALUE_MSG + e.getOtaStatusCode() + " " + e.getShortMessage() + "," + e.getDetailedMessage(),
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHENTICATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_HANDLING_FAILED,
@@ -890,7 +891,7 @@
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
permissionAttributes = securityAttributes.getPermissionAttributes();
- assertTrue(permissionAttributes != null
+ assertWithTrace(permissionAttributes != null
&& permissionAttributes.length == 1
&& checkImportance(permissionAttributes, 1, 0)
&& checkNamesAndTargets(permissionAttributes,
@@ -932,7 +933,7 @@
allAttributes.put(PermissionAttribute.OPTIONAL_ATTRIBUTE_PREFIX + "1",new Attribute("",className + " MyMandatoryTarget MyMandatoryAction "));
securityAttributes = new SecurityAttributes();
securityAttributes.addDescriptorAttributes(allAttributes);
- assertTrue(INVALID_PERMISSION_VALUE_MSG, false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
@@ -1110,6 +1111,13 @@
return (checkBoolArray(certsChecked) && checkBoolArray(signaturesChecked));
}
+ private void assertWithTrace(boolean aCondition)
+ {
+ assertTrue("" + assertTrace, aCondition);
+ assertTrace++;
+ }
+
+
private int findString(String str, String[] strings)
{
for (int i=0; i<strings.length; i++)
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/common/SecurityExtensionsTests.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/common/SecurityExtensionsTests.java Tue Sep 14 21:06:50 2010 +0300
@@ -48,6 +48,7 @@
public class SecurityExtensionsTests extends TestCase implements InstallerMain
{
private static String TEST_DATA_DIR;
+ int assertTrace = 0;
static
{
@@ -128,7 +129,7 @@
SecurityAttributes securityAttributes;
AuthenticationCredentials[] credentials;
// package names
- assertTrue(find(SecurityExtensionsReader.getExtProtectedPackages(), new String[] {"com.nokia.ext1.internal.", "com.nokia.ext2.internal."})
+ assertWithTrace(find(SecurityExtensionsReader.getExtProtectedPackages(), new String[] {"com.nokia.ext1.internal.", "com.nokia.ext2.internal."})
&& !find(SecurityExtensionsReader.getExtProtectedPackages(), new String[] {"com.nokia.ext1.public."})
&& !find(SecurityExtensionsReader.getExtProtectedPackages(), new String[] {"com.nokia.ext2.public."})
&& find(SecurityExtensionsReader.getExtRestrictedPackages(), new String[] {"com.nokia.ext1.public.", "com.nokia.ext2.public."})
@@ -136,10 +137,10 @@
&& !find(SecurityExtensionsReader.getExtRestrictedPackages(), new String[] {"com.nokia.ext2.internal."}));
// mappings
MIDPPermission perm = SecurityExtensionsReader.getExtPermission("com.nokia.ext1.public.Ext1Perm");
- assertTrue(perm != null && perm.getName() != null && perm.getName().equals("com.nokia.ext1.internal.Ext1Perm") && perm.getTarget() != null && perm.getTarget().equals("*")&& perm.getActionList() == null);
- assertTrue(SecurityExtensionsReader.getExtPermission("com.nokia.mj.impl.gcf.protocol.socket.SocketPermissionImpl") == null);
+ assertWithTrace(perm != null && perm.getName() != null && perm.getName().equals("com.nokia.ext1.internal.Ext1Perm") && perm.getTarget() == null && perm.getActionList() == null);
+ assertWithTrace(SecurityExtensionsReader.getExtPermission("com.nokia.mj.impl.gcf.protocol.socket.SocketPermissionImpl") == null);
perm = SecurityExtensionsReader.getExtPermission("com.nokia.ext2.public.Ext2Perm");
- assertTrue(perm != null && perm.getName() != null && perm.getName().equals("com.nokia.ext2.internal.Ext2Perm") && perm.getTarget() != null && perm.getTarget().equals("*")&& perm.getActionList() == null);
+ assertWithTrace(perm != null && perm.getName() != null && perm.getName().equals("com.nokia.ext2.internal.Ext2Perm") && perm.getTarget() == null && perm.getActionList() == null);
// policies (unsigned suite, check that ext1 perms are granted and the base permissions were not altered)
storage.removeAuthenticationStorageData(appUID);
permissionGranter.removeSecurityData(session,appUID);
@@ -153,9 +154,11 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
- assertTrue(checkGrantedPermissions(storage.readGrantedPermissions(appUID),
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions(appUID, null, securityAttributes.getPermissionAttributes(), credentials);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(checkGrantedPermissions(storage.readGrantedPermissions(appUID),
new PolicyBasedPermissionImpl[]
{
new PolicyBasedPermissionImpl("com.nokia.ext1.internal.Ext1Perm", "ext1.target1", "ext1.action1", new UserSecuritySettingsImpl("Ext1", UserSecuritySettings.ONESHOT_INTERACTION_MODE, new int[] {UserSecuritySettings.ONESHOT_INTERACTION_MODE, UserSecuritySettings.SESSION_INTERACTION_MODE, UserSecuritySettings.BLANKET_INTERACTION_MODE, UserSecuritySettings.NO_INTERACTION_MODE})),
@@ -180,11 +183,11 @@
securityAttributes.addDescriptorAttributes(allAttributes);
credentials = authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
permissionGranter.grantJadPermissions(appUID, null, securityAttributes.getPermissionAttributes(), credentials);
- assertTrue(false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -205,11 +208,11 @@
securityAttributes.addDescriptorAttributes(allAttributes);
credentials = authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
permissionGranter.grantJadPermissions(appUID, null, securityAttributes.getPermissionAttributes(), credentials);
- assertTrue(false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -230,11 +233,11 @@
securityAttributes.addDescriptorAttributes(allAttributes);
credentials = authenticationModule.authenticateJad(appUID,null,securityAttributes.getAuthenticationAttributes());
permissionGranter.grantJadPermissions(appUID, null, securityAttributes.getPermissionAttributes(), credentials);
- assertTrue(false);
+ assertWithTrace(false);
}
catch (InvalidAttributeException e)
{
- assertTrue(
+ assertWithTrace(
e.getOtaStatusCode() == OtaStatusCode.APPLICATION_AUTHORIZATION_FAILURE
&& e.getShortMessage().equals(errorMessage.get(InstallerErrorMessage.INST_CORRUPT_PKG, null))
&& e.getDetailedMessage().equals(detailedErrorMessage.get(InstallerDetailedErrorMessage.ATTR_UNSUPPORTED,
@@ -256,9 +259,11 @@
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
securityAttributes.addManifestAttributes(allAttributes);
- authenticationModule.authenticateJar(session, appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
- permissionGranter.grantJarPermissions(session, appUID, null, securityAttributes.getPermissionAttributes());
- assertTrue(checkGrantedPermissions(storage.readGrantedPermissions(appUID),
+ credentials = authenticationModule.authenticateJar(appUID,null,TEST_DATA_DIR + "security_tmp" + System.getProperty("file.separator") + "HelloWorld.jar", false);
+ authenticationModule.addSecurityData(session, appUID, null);
+ permissionGranter.grantJarPermissions(appUID, null, securityAttributes.getPermissionAttributes(), credentials);
+ permissionGranter.addSecurityData(session, appUID, null);
+ assertWithTrace(checkGrantedPermissions(storage.readGrantedPermissions(appUID),
new PolicyBasedPermissionImpl[]
{
new PolicyBasedPermissionImpl("com.nokia.ext2.internal.Ext2Perm", "ext2.target1", "ext2.action1", new UserSecuritySettingsImpl("Ext1", UserSecuritySettings.BLANKET_INTERACTION_MODE, new int[] {UserSecuritySettings.BLANKET_INTERACTION_MODE, UserSecuritySettings.NO_INTERACTION_MODE})),
@@ -269,6 +274,12 @@
}));
}
+ private void assertWithTrace(boolean aCondition)
+ {
+ assertTrue("" + assertTrace, aCondition);
+ assertTrace++;
+ }
+
private static boolean checkGrantedPermissions(Vector grantedPermissions, PolicyBasedPermissionImpl[] expectedPerms)
{
if (grantedPermissions == null)
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorageTests.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorageTests.java Tue Sep 14 21:06:50 2010 +0300
@@ -188,70 +188,6 @@
storage.removeGrantedPermissions(appUID);
readPermissions = storage.readGrantedPermissions(appUID);
assertTrue(readPermissions == null);
- // full read/write/remove cycle for update -> the old settings are retained
- storage.removeGrantedPermissions(appUID);
- grantedPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(grantedPermissions == null);
- grantedPermissions = new Vector();
- storage.writeGrantedPermissions(appUID, null, grantedPermissions);
- storage.removeGrantedPermissions(appUID);
- assertTrue(true);
- grantedPermissions.addElement(new PolicyBasedPermissionImpl(
- "permission1",
- "target1",
- "action1",
- PolicyBasedPermission.ALLOWED_TYPE));
- grantedPermissions.addElement(new PolicyBasedPermissionImpl(
- "permission2",
- "target2",
- "action2",
- PolicyBasedPermission.ASSIGNED_TYPE));
- grantedPermissions.addElement(new PolicyBasedPermissionImpl(
- "permission3",
- "target3",
- "action3",
- new UserSecuritySettingsImpl("settingsname",
- UserSecuritySettings.ONESHOT_INTERACTION_MODE,
- new int[] { UserSecuritySettings.ONESHOT_INTERACTION_MODE,
- UserSecuritySettings.SESSION_INTERACTION_MODE,
- UserSecuritySettings.BLANKET_INTERACTION_MODE,
- UserSecuritySettings.NO_INTERACTION_MODE
- })));
- storage.writeGrantedPermissions(appUID, null, grantedPermissions);
- readPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(readPermissions != null
- && readPermissions.size() == grantedPermissions.size()
- && checkGrantedPermissions(readPermissions, grantedPermissions));
- grantedPermissions2 = new Vector();
- grantedPermissions2.addElement(new PolicyBasedPermissionImpl(
- "permission1",
- "target1",
- "action1",
- PolicyBasedPermission.ALLOWED_TYPE));
- grantedPermissions2.addElement(new PolicyBasedPermissionImpl(
- "permission2",
- "target2",
- "action2",
- PolicyBasedPermission.ASSIGNED_TYPE));
- grantedPermissions2.addElement(new PolicyBasedPermissionImpl(
- "permission3",
- "target3",
- "action3",
- new UserSecuritySettingsImpl("settingsname",
- UserSecuritySettings.SESSION_INTERACTION_MODE,
- new int[] { UserSecuritySettings.ONESHOT_INTERACTION_MODE,
- UserSecuritySettings.SESSION_INTERACTION_MODE,
- UserSecuritySettings.BLANKET_INTERACTION_MODE,
- UserSecuritySettings.NO_INTERACTION_MODE
- })));
- storage.writeGrantedPermissions(appUID, appUID, grantedPermissions2);
- readPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(readPermissions != null
- && readPermissions.size() == grantedPermissions.size()
- && checkGrantedPermissions(readPermissions, grantedPermissions));
- storage.removeGrantedPermissions(appUID);
- readPermissions = storage.readGrantedPermissions(appUID);
- assertTrue(readPermissions == null);
// full read/write/remove cycle with different valid values for permissions and user settings
storage.removeGrantedPermissions(appUID);
grantedPermissions = storage.readGrantedPermissions(appUID);
--- a/javacommons/utils/javasrc/com/nokia/mj/impl/rt/SystemPropertyUtils.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/rt/SystemPropertyUtils.java Tue Sep 14 21:06:50 2010 +0300
@@ -98,7 +98,7 @@
try
{
- Class clazz = clazz = Class.forName(className);
+ Class clazz = Class.forName(className);
Object providerImpl = clazz.newInstance();
boolean isFrozen = false;
--- a/javacommons/utils/src.s60/properties.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/utils/src.s60/properties.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -103,7 +103,9 @@
JELOG2(EUtils);
// microedition.locale
- switch (User::Language()) {
+ ILOG1(EUtils, "User::Language: %d", User::Language());
+ // KDialectMask enables support for operator specific language variants
+ switch (User::Language() & KDialectMask) {
case ELangAfrikaans:
return S60CommonUtils::NativeToJavaString(*env, KMicroeditionLocaleAfrikaans);
case ELangAlbanian:
--- a/javacommons/utils/src/logger.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/utils/src/logger.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -340,14 +340,16 @@
int logFileNameLen = strlen(fileName);
TPtr8 fileNamePtr((unsigned char*)fileName, logFileNameLen, logFileNameLen);
RBuf nameBuf;
- nameBuf.Create(fileNamePtr.MaxLength());
- nameBuf.Copy(fileNamePtr);
+ int rc = nameBuf.Create(fileNamePtr.MaxLength());
+ if (rc == KErrNone)
+ {
+ nameBuf.Copy(fileNamePtr);
- TInt len = strlen(txt);
- TPtr8 ptr((unsigned char*)txt, len, len);
- RFileLogger::Write(KJavaLogDir, nameBuf, EFileLoggingModeAppendRaw, ptr);
-
- nameBuf.Close();
+ TInt len = strlen(txt);
+ TPtr8 ptr((unsigned char*)txt, len, len);
+ RFileLogger::Write(KJavaLogDir, nameBuf, EFileLoggingModeAppendRaw, ptr);
+ nameBuf.Close();
+ }
#else //J_LOG_USE_RLOGGER_ENABLED
--- a/javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60btdialog.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60btdialog.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -23,6 +23,13 @@
#include "s60btdialog.h"
#include "logger.h"
+#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+#include <hbdevicemessageboxsymbian.h>
+#include <hbpopup.h>
+#include <QtCore\qvariant.h>
+
+#define QUERY_BUF_LEN 512
+#endif
using namespace java::bluetooth;
@@ -44,7 +51,9 @@
void CS60BTDialog::ConstructL()
{
LOG(EJavaBluetooth, EInfo, "+ CS60BTDialog::ConstructL()");
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
User::LeaveIfError(mNotifier.Connect());
+#endif
LOG(EJavaBluetooth, EInfo, "- CS60BTDialog::ConstructL()");
}
@@ -57,7 +66,9 @@
{
CS60BTDialog* self = new(ELeave) CS60BTDialog;
CleanupStack::PushL(self);
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
self->ConstructL();
+#endif
return self;
}
@@ -70,8 +81,11 @@
{
JELOG2(EJavaBluetooth);
LOG(EJavaBluetooth, EInfo, "+ CS60BTDialog::~CS60BTDialog()");
+
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
DoCancel();
mNotifier.Close();
+#endif
LOG(EJavaBluetooth, EInfo, "- CS60BTDialog::~CS60BTDialog()");
}
@@ -87,13 +101,41 @@
JELOG2(EJavaBluetooth);
LOG1(EJavaBluetooth, EInfo,"+ CS60BTDialog::ShowBTQueryDialog(): aQueryType = %d", aQueryType);
+
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
mQueryParamsPckg().iMessageType = aQueryType;
mQueryParamsPckg().iNameExists = ETrue;
mQueryParamsPckg().iName.Copy(aAppName);
mNotifier.StartNotifierAndGetResponse(mStatus, KBTGenericQueryNotifierUid,
mQueryParamsPckg, mQueryResult);
+ User::WaitForRequest(mStatus);
- User::WaitForRequest(mStatus);
+#else
+ _LIT(KAppInfo,"Application %S cannot be used when Bluetooth is off Activate Bluetooth ?");
+ _LIT(KAppInfomsg,"Change 'My phone's visibility' setting to 'Show to all'? Application '%S' cannot be used when the visibility is set as 'Hidden'.");
+
+ TBuf<QUERY_BUF_LEN> queryBuf;
+ TInt err = KErrNone;
+ TBool userOpt;
+
+ queryBuf.Zero();
+ if (aQueryType == EBTIsOffJavaQuery)
+ {
+ queryBuf.Format(KAppInfo,&aAppName);
+ }
+ else if (aQueryType == EBTIsNotShownQuery)
+ {
+ queryBuf.Format(KAppInfomsg,&aAppName);
+ }
+
+ TRAP(err, userOpt = ShowBTQueryHbDialogL(queryBuf));
+ LOG1(EJavaBluetooth, EInfo," CS60BTDialog::ShowBTQueryDialog(): mQueryResult = %d", err);
+
+ if (err != KErrNone )
+ mQueryResult = EFalse;
+ else
+ mQueryResult = userOpt;
+#endif
LOG1(EJavaBluetooth, EInfo,"- CS60BTDialog::ShowBTQueryDialog(): mQueryResult = %d", mQueryResult());
return mQueryResult();
@@ -109,6 +151,42 @@
void CS60BTDialog::DoCancel()
{
LOG(EJavaBluetooth, EInfo, "+ CS60BTDialog::DoCancel()");
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
mNotifier.CancelNotifier(KBTGenericQueryNotifierUid);
+#endif
LOG(EJavaBluetooth, EInfo, "- CS60BTDialog::DoCancel()");
}
+
+#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+
+TBool CS60BTDialog::ShowBTQueryHbDialogL(const TDesC& aBufData)
+{
+ TBool result = EFalse;
+
+ CHbDeviceMessageBoxSymbian* messageBox
+ = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EQuestion);
+ CleanupStack::PushL(messageBox);
+
+ messageBox->SetTextL(aBufData);
+ messageBox->SetTimeout(HbPopup::NoTimeout);
+
+ // Read localised versions instead of hard coded values.
+ _LIT(KAllowButtonText, "Yes");
+ _LIT(KDenyButtonText, "No");
+
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KAllowButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue);
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KDenyButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::ERejectButton, ETrue);
+
+ if (messageBox->ExecL() == CHbDeviceMessageBoxSymbian::EAcceptButton)
+ result = ETrue;
+ else
+ result = EFalse;
+
+ messageBox->Close();
+ CleanupStack::PopAndDestroy(messageBox);
+
+ return result;
+}
+#endif
--- a/javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60btdialog.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60btdialog.h Tue Sep 14 21:06:50 2010 +0300
@@ -57,6 +57,11 @@
TBool ShowBTQueryDialog(const TDesC& aAppName, const TBool aInstalling,
TBTGenericQueryNoteType aQueryType);
+#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+ TBool ShowBTQueryHbDialogL(const TDesC& aBufData);
+#endif
+
+
/**
* Cancels the asynchronous request to the query list dialog.
*
@@ -72,7 +77,9 @@
private: // data
TRequestStatus mStatus;
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
RNotifier mNotifier;
+#endif
TBTGenericQueryNotiferParamsPckg mQueryParamsPckg;
TPckgBuf<TBool> mQueryResult;
};
--- a/javaextensions/bluetooth/bluetoothcommons/build/javabluetoothcommons.pro Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/bluetooth/bluetoothcommons/build/javabluetoothcommons.pro Tue Sep 14 21:06:50 2010 +0300
@@ -14,20 +14,33 @@
# Description:
#
+include(../../../../inc/build_defines.pri)
+
TEMPLATE=lib
TARGET=javabluetoothcommons
CONFIG += omj java stl
-CONFIG -= qt
-symbian {
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_5_0) {
+ CONFIG -= qt
+}
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_9_2) {
+ CONFIG -= qt
+}
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_10_1_ONWARDS) {
+ CONFIG += hb
+}
+
+
+symbian {
SOURCES += ../src/*.cpp
SOURCES += ../src.s60/*.cpp
SOURCES += ../bluetoothplatformcontrol/src/*.cpp
- SOURCES += ../bluetoothplatformcontrol/src.s60/*.cpp
+ SOURCES += ../bluetoothplatformcontrol/src.s60/*.cpp
}
LIBS += -lsdpdatabase -lbtengsettings -lbluetooth -lbtmanclient \
-lbtdevice -ljavacomms -ljavafileutils -lesock
+include(../../../../build/omj.pri)
-include(../../../../build/omj.pri)
+
--- a/javaextensions/datagram/datagram/javasrc/com/nokia/mj/impl/datagram/UDPDatagramConnectionImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/datagram/datagram/javasrc/com/nokia/mj/impl/datagram/UDPDatagramConnectionImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -134,7 +134,7 @@
/* security related stuff */
ApplicationUtils appUtils = ApplicationUtils.getInstance();
- DatagramPermissionImpl per = new DatagramPermissionImpl("datagram://");
+ DatagramPermissionImpl per = new DatagramPermissionImpl(DatagramPermissionImpl.SERVER_TARGET);
Logger.LOG(Logger.ESOCKET, Logger.EInfo,
"calling check permissions from UDPDatagramConnectionImpl");
appUtils.checkPermission(per);
@@ -171,7 +171,7 @@
{
/* security related stuff, server mode datagram connection */
ApplicationUtils appUtils = ApplicationUtils.getInstance();
- DatagramPermissionImpl per = new DatagramPermissionImpl("datagram://");
+ DatagramPermissionImpl per = new DatagramPermissionImpl(DatagramPermissionImpl.SERVER_TARGET);
Logger.LOG(Logger.ESOCKET, Logger.EInfo,
"calling check permissions from UDPDatagramConnectionImpl");
appUtils.checkPermission(per);
@@ -183,7 +183,7 @@
{
/* security related stuff, client mode datagram connection */
ApplicationUtils appUtils = ApplicationUtils.getInstance();
- DatagramPermissionImpl per = new DatagramPermissionImpl("datagram://*");
+ DatagramPermissionImpl per = new DatagramPermissionImpl(DatagramPermissionImpl.CLIENT_TARGET);
Logger.LOG(Logger.ESOCKET, Logger.EInfo,
"calling check permissions from UDPDatagramConnectionImpl");
appUtils.checkPermission(per);
--- a/javaextensions/datagram/datagram/javasrc/com/nokia/mj/impl/gcf/protocol/datagram/DatagramPermissionImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/datagram/datagram/javasrc/com/nokia/mj/impl/gcf/protocol/datagram/DatagramPermissionImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -25,6 +25,13 @@
public class DatagramPermissionImpl extends PermissionBase
{
+ /**
+ * Constants for identifying the target/uri of connection: client or server
+ */
+ public static String CLIENT_TARGET = "datagram://*";
+ public static String SERVER_TARGET = "datagram://";
+
+ private String iTarget;
/**
* Returns the question (as localized text) associated with the security
@@ -37,6 +44,7 @@
public DatagramPermissionImpl(String uri)
{
super(uri);
+ iTarget = uri;
}
public String getSecurityPromptQuestion(int aInteractionMode)
@@ -56,6 +64,10 @@
public String toString()
{
+ if (SERVER_TARGET.equals(iTarget))
+ {
+ return "javax.microedition.io.Connector.datagramreceiver";
+ }
return "javax.microedition.io.Connector.datagram";
}
@@ -63,7 +75,12 @@
{
if (p instanceof DatagramPermissionImpl)
{
- return true;
+ DatagramPermissionImpl o = (DatagramPermissionImpl)p;
+ if ((iTarget != null && iTarget.equals(o.getTarget()))
+ || (iTarget == null && o.getTarget() == null))
+ {
+ return true;
+ }
}
return false;
}
@@ -88,4 +105,8 @@
return null;
}
+ String getTarget()
+ {
+ return iTarget;
+ }
}
\ No newline at end of file
--- a/javaextensions/datagram/datagram/javasrc/com/nokia/mj/impl/gcf/protocol/datagram/PushValidatorImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/datagram/datagram/javasrc/com/nokia/mj/impl/gcf/protocol/datagram/PushValidatorImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -125,7 +125,7 @@
/* security check */
Logger.LOG(Logger.ESOCKET, Logger.EInfo,"datagram - push validator : before security check");
ApplicationUtils appUtils = ApplicationUtils.getInstance();
- DatagramPermissionImpl per = new DatagramPermissionImpl("datagram://");
+ DatagramPermissionImpl per = new DatagramPermissionImpl(DatagramPermissionImpl.SERVER_TARGET);
appUtils.checkPermission(per);
/* security check */
Logger.LOG(Logger.ESOCKET, Logger.EInfo,"datagram - push validator : after security check");
--- a/javaextensions/datagram/datagram/src.s60/apnsettings.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/datagram/datagram/src.s60/apnsettings.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -42,6 +42,7 @@
char * fret = if_indextoname(aApn,interfacename);
strcpy(ifr.ifr_name, interfacename);
ILOG1(ESOCKET, "interface name is %s",interfacename);
+ delete interfacename;
}
else
{
--- a/javaextensions/datagram/datagram/src/nativedatagramconnection.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/datagram/datagram/src/nativedatagramconnection.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -133,6 +133,7 @@
writeBuffer = new char[requiredNativeBufferLength + 1];
}
/* Copy the data to be written from java buffer to the native buffer. */
+ if (writeBuffer != NULL)
JNIArrayUtils::CopyToNative(aJni, aJavaBuffer, aOffset,
requiredNativeBufferLength, writeBuffer);
--- a/javaextensions/iapinfo/build/javaiapinfo.pro Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/iapinfo/build/javaiapinfo.pro Tue Sep 14 21:06:50 2010 +0300
@@ -24,7 +24,8 @@
SOURCES += ../src.s60/javacommdb.cpp \
../src.s60/iapinfoimpl.cpp \
../src.s60/javaapncontrol.cpp \
- ../src.s60/stringbuffer.cpp
+ ../src.s60/stringbuffer.cpp \
+ ../src.s60/iapinfosession.cpp
LIBS += -leuser -lcommsdat -lcommdb -lagentdialog -lcmmanager
}
--- a/javaextensions/iapinfo/build/javaiapinfo_0x2002DCB3.mmp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/iapinfo/build/javaiapinfo_0x2002DCB3.mmp Tue Sep 14 21:06:50 2010 +0300
@@ -67,6 +67,7 @@
SOURCE iapinfoimpl.cpp
SOURCE javaapncontrol.cpp
SOURCE stringbuffer.cpp
+SOURCE iapinfosession.cpp
LIBRARY euser.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javaextensions/iapinfo/inc.s60/iapinfosession.h Tue Sep 14 21:06:50 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: JavaCommDB class implementation
+ *
+*/
+
+#ifndef IAINFOSESSION_H
+#define IAINFOSESSION_H
+
+
+#include <commsdattypesv1_1.h>
+#include <commsdat.h>
+#include <metadatabase.h>
+#include "functionserver.h"
+#include <e32base.h>
+
+using namespace java::util;
+
+class IapInfoSession : public FunctionServer
+{
+ public: static IapInfoSession* NewL();
+
+ private:
+ IapInfoSession();
+ void ConstructL();
+
+ /**
+ * Pointer to the actual DB Session object.
+ * Initialized in the Open() function.
+ */
+ public:
+ CommsDat::CMDBSession* iDb;
+
+
+
+
+};
+
+#endif // IAINFOSESSION_H
\ No newline at end of file
--- a/javaextensions/iapinfo/inc.s60/javacommdb.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/iapinfo/inc.s60/javacommdb.h Tue Sep 14 21:06:50 2010 +0300
@@ -23,6 +23,7 @@
#include <commsdat.h>
#include <metadatabase.h>
#include "com_nokia_mid_iapinfo_CommsTable.h"
+#include "iapinfosession.h"
using namespace CommsDat;
@@ -41,6 +42,8 @@
public:
~ JavaCommDB();
+
+ JavaCommDB(IapInfoSession *aSess);
/**
* Opens the given table.
@@ -50,12 +53,12 @@
*/
void OpenL(const TDesC&);
+ static void Destroy(JavaCommDB* aObj);
/**
* Close the table and delete allocated member objects.
- * @since S60 v3.0
- * @return error code
+ * @since S60 v3.0
*/
- TInt Close();
+ void Close();
/**
* Get number of records in the current table.
@@ -133,6 +136,9 @@
* Initialized in the Open() function.
*/
CMDBRecordSet<CCDRecordBase>* iTable;
+
+public:
+ IapInfoSession* iSession;
};
#endif // JAVACOMMDB_H
--- a/javaextensions/iapinfo/javasrc.s60/com/nokia/mid/iapinfo/CommsTable.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/iapinfo/javasrc.s60/com/nokia/mid/iapinfo/CommsTable.java Tue Sep 14 21:06:50 2010 +0300
@@ -19,6 +19,7 @@
import com.nokia.mj.impl.rt.support.Finalizer;
import com.nokia.mj.impl.gcf.utils.NativeError;
+import com.nokia.mj.impl.utils.Logger;
//import com.nokia.mj.impl.vmport.VmPort;
@@ -131,13 +132,6 @@
iTableName = tableName;
- // create native peer
- iHandle = _construct();
- if (iHandle < NativeError.KErrNone)
- {
- throw new CommDBException("Native constructor failed!", ERROR_NONE,
- iHandle);
- }
// we need this so we can do some cleanup when we are garbage collected
iFinalizer = createFinalizer();
state = CREATED;
@@ -146,18 +140,20 @@
/**
* Opens the corresponding CommDB table.
*/
- public void open() throws CommDBException
+ public void open(int aNativeSessionHandle) throws CommDBException
{
- int err = _open(iHandle, iTableName);
- if (NativeError.KErrNone == err)
+ iHandle = _open(aNativeSessionHandle, iTableName);
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "iHandle ="+iHandle);
+
+ if (iHandle > 0)
{
state = OPENED;
readFieldValues();
}
else
{
- throw new CommDBException("Open failed!", ERROR_OPEN_FAILED, err);
+ throw new CommDBException("Open failed!", ERROR_OPEN_FAILED, iHandle);
}
}
@@ -185,6 +181,7 @@
{
int rec = 0;
+
rec = _findByName(iHandle, recordName);
if (rec >= 0)
{
@@ -230,6 +227,7 @@
*/
public int getRecordCount() throws CommDBException
{
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo,"+getRecordCount()");
return _getRecordCount(iHandle);
}
@@ -326,13 +324,6 @@
/* Native funcions */
/*----------------------------------------------------------------*/
/*
- * Creates native peer.
- *
- * @return handle for native peer
- */
- private static native int _construct();
-
- /*
* Destructs native peer.
*
* @param aHandle - handle for native peer
@@ -346,7 +337,7 @@
*
* @return - error code
*/
- private static native int _open(int aHandle, String tableName);
+ private static native int _open(int aSessionHandle, String tableName);
/*
* Close the actual CommDB table.
--- a/javaextensions/iapinfo/javasrc.s60/com/nokia/mid/iapinfo/IAPInfo.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/iapinfo/javasrc.s60/com/nokia/mid/iapinfo/IAPInfo.java Tue Sep 14 21:06:50 2010 +0300
@@ -34,7 +34,7 @@
* Please refer IapInfo Spec.
*/
- public static IAPInfo getIAPInfo() throws IAPInfoException
+ public synchronized static IAPInfo getIAPInfo() throws IAPInfoException
{
if (instance == null)
instance = new IAPInfoImpl();
--- a/javaextensions/iapinfo/javasrc.s60/com/nokia/mid/iapinfo/IAPInfoImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/iapinfo/javasrc.s60/com/nokia/mid/iapinfo/IAPInfoImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -35,16 +35,14 @@
class IAPInfoImpl extends IAPInfo
{
- // variable to store the network preferences
- private IAPTable iIAPTable = null;
-
+ private int iSessionHandle;
static
{
try
{
- Logger.ILOG(Logger.ESOCKET, "loading javaiapinfo");
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "loading javaiapinfo");
Jvm.loadSystemLibrary("javaiapinfo");
- Logger.ILOG(Logger.ESOCKET, "javaiapinfo loaded");
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "javaiapinfo loaded");
}
catch (Exception e)
{
@@ -57,42 +55,48 @@
*/
public IAPInfoImpl() throws IAPInfoException
{
+ iSessionHandle = _createSession();
+ if (iSessionHandle <0)
+ throw new IAPInfoException("Error: symbian os error: "+iSessionHandle);
+
+ }
+
+ /**
+ * Please refer IapInfo Spec.
+ */
+ public synchronized AccessPoint[] getAccessPoints() throws IAPInfoException
+ {
+ IAPTable iIAPTable = null;
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "+getAccessPoints() - this = "+Thread.currentThread().toString() +"hascode= " +Thread.currentThread().hashCode());
try
{
- this.iIAPTable = new IAPTable();
+ iIAPTable = new IAPTable();
}
catch (CommDBException e)
{
e.printStackTrace();
throw new IAPInfoException(e.getMessage());
}
- }
-
- /**
- * Please refer IapInfo Spec.
- */
- public AccessPoint[] getAccessPoints() throws IAPInfoException
- {
AccessPoint[] _ac = null;
try
{
- this.iIAPTable.open();
- int _nr_of_access_points = this.iIAPTable.getRecordCount();
+ iIAPTable.open(iSessionHandle);
+ int _nr_of_access_points = iIAPTable.getRecordCount();
_ac = new AccessPoint[_nr_of_access_points];
for (int i = 0; i < _nr_of_access_points; i++)
{
- AccessPoint _c = new AccessPoint(this.iIAPTable.iRecordId,
- this.iIAPTable.iRecordName, this.iIAPTable.iBearerType,
- this.iIAPTable.iServiceType);
+ AccessPoint _c = new AccessPoint(iIAPTable.iRecordId,
+ iIAPTable.iRecordName, iIAPTable.iBearerType,
+ iIAPTable.iServiceType);
_ac[i] = _c;
if (i != _nr_of_access_points - 1)
- this.iIAPTable.nextRecord();
+ iIAPTable.nextRecord();
}
- this.iIAPTable.close();
+ iIAPTable.close();
}
catch (CommDBException _exception)
{
- this.iIAPTable.close();
+ iIAPTable.close();
throw new IAPInfoException(_exception.getMessage());
}// end of catch
return _ac;
@@ -101,24 +105,35 @@
/**
* Please refer IapInfo Spec.
*/
- public AccessPoint getAccessPoint(int aID) throws IAPInfoException
+ public synchronized AccessPoint getAccessPoint(int aID) throws IAPInfoException
{
AccessPoint _ac = null;
+ IAPTable iIAPTable = null;
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "+getAccessPoint() - aID = "+aID +" this = "+Thread.currentThread().toString() +"hascode= " +Thread.currentThread().hashCode());
try
{
- this.iIAPTable.open();
- int _ret = this.iIAPTable.findById(aID);
+ iIAPTable = new IAPTable();
+ }
+ catch (CommDBException e)
+ {
+ e.printStackTrace();
+ throw new IAPInfoException(e.getMessage());
+ }
+ try
+ {
+ iIAPTable.open(iSessionHandle);
+ int _ret = iIAPTable.findById(aID);
if (_ret != IAPTable.RECORD_NOT_FOUND)
{
- _ac = new AccessPoint(this.iIAPTable.iRecordId,
- this.iIAPTable.iRecordName, this.iIAPTable.iBearerType,
- this.iIAPTable.iServiceType);
+ _ac = new AccessPoint(iIAPTable.iRecordId,
+ iIAPTable.iRecordName, iIAPTable.iBearerType,
+ iIAPTable.iServiceType);
}
- this.iIAPTable.close();
+ iIAPTable.close();
}
catch (CommDBException _exception)
{
- this.iIAPTable.close();
+ iIAPTable.close();
throw new IAPInfoException(_exception.getMessage());
}// end catch
return _ac;
@@ -127,8 +142,19 @@
/**
* Please refer IapInfo Spec.
*/
- public AccessPoint getAccessPoint(String aName) throws IAPInfoException
+ public synchronized AccessPoint getAccessPoint(String aName) throws IAPInfoException
{
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "+getAccessPoint() - aName = "+aName +" this = "+Thread.currentThread().toString() +"hascode= " +Thread.currentThread().hashCode());
+ IAPTable iIAPTable = null;
+ try
+ {
+ iIAPTable = new IAPTable();
+ }
+ catch (CommDBException e)
+ {
+ e.printStackTrace();
+ throw new IAPInfoException(e.getMessage());
+ }
if (aName == null)
{
throw new IAPInfoException("Parameter is NULL");
@@ -136,57 +162,71 @@
AccessPoint _ac = null;
try
{
- this.iIAPTable.open();
- int _ret = this.iIAPTable.findByName(aName);
+ iIAPTable.open(iSessionHandle);
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "+getAccessPoint() - aName = after iaptable.open()");
+ int _ret = iIAPTable.findByName(aName);
if (_ret != IAPTable.RECORD_NOT_FOUND)
{
- _ac = new AccessPoint(this.iIAPTable.iRecordId,
- this.iIAPTable.iRecordName, this.iIAPTable.iBearerType,
- this.iIAPTable.iServiceType);
+ _ac = new AccessPoint(iIAPTable.iRecordId,
+ iIAPTable.iRecordName, iIAPTable.iBearerType,
+ iIAPTable.iServiceType);
}
- this.iIAPTable.close();
+ iIAPTable.close();
}
catch (CommDBException _exception)
{
- this.iIAPTable.close();
+ iIAPTable.close();
throw new IAPInfoException(_exception.getMessage());
}// end catch
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "-getAccessPoint() - aName = "+aName);
return _ac;
+//return null;
}
/**
* Please refer IapInfo Spec.
*/
- public AccessPoint getLastUsedAccessPoint() throws IAPInfoException
+ public synchronized AccessPoint getLastUsedAccessPoint() throws IAPInfoException
{
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "+getLastUsedAccessPoint() " +" this = "+Thread.currentThread().toString() +"hascode= " +Thread.currentThread().hashCode());
+ IAPTable iIAPTable = null;
+ try
+ {
+ iIAPTable = new IAPTable();
+ }
+ catch (CommDBException e)
+ {
+ e.printStackTrace();
+ throw new IAPInfoException(e.getMessage());
+ }
APNControl _control = new APNControl();
int _lastIAP = _control.getLastIAP();
AccessPoint _ac = null;
int _nr_of_access_points = 0;
try
{
- this.iIAPTable.open();
- _nr_of_access_points = this.iIAPTable.getRecordCount();
+ iIAPTable.open(iSessionHandle);
+ _nr_of_access_points = iIAPTable.getRecordCount();
for (int i = 0; i < _nr_of_access_points; i++)
{
- if (this.iIAPTable.iRecordId == _lastIAP)
+ if (iIAPTable.iRecordId == _lastIAP)
{
- _ac = new AccessPoint(this.iIAPTable.iRecordId,
- this.iIAPTable.iRecordName,
- this.iIAPTable.iBearerType,
- this.iIAPTable.iServiceType);
+ _ac = new AccessPoint(iIAPTable.iRecordId,
+ iIAPTable.iRecordName,
+ iIAPTable.iBearerType,
+ iIAPTable.iServiceType);
break;
}// end if
if (i != _nr_of_access_points - 1)
{
- this.iIAPTable.nextRecord();
+ iIAPTable.nextRecord();
}
}// end for
- this.iIAPTable.close();
+ iIAPTable.close();
}
catch (CommDBException _exception)
{
- this.iIAPTable.close();
+ iIAPTable.close();
throw new IAPInfoException(_exception.getMessage());
}
return _ac;
@@ -294,16 +334,27 @@
/**
* Please refer IapInfo Spec.
*/
- public AccessPoint[] getConnectionPreferences() throws IAPInfoException
+ public synchronized AccessPoint[] getConnectionPreferences() throws IAPInfoException
{
ConnectionPreferencesTable _prefTable = null;
AccessPoint[] _ac = null;
+ IAPTable iIAPTable = null;
+ Logger.LOG(Logger.EJavaIapInfo,Logger.EInfo, "+getConnectionPreferences() " +" this = "+Thread.currentThread().toString() +"hascode= " +Thread.currentThread().hashCode());
+ try
+ {
+ iIAPTable = new IAPTable();
+ }
+ catch (CommDBException e)
+ {
+ e.printStackTrace();
+ throw new IAPInfoException(e.getMessage());
+ }
try
{
_prefTable = new ConnectionPreferencesTable();
- _prefTable.open();
+ _prefTable.open(iSessionHandle);
int recNr = _prefTable.getRecordCount();
HelperObject[] hp = new HelperObject[recNr];
@@ -336,20 +387,20 @@
}// end while
// get the AccesssPoints from IAPTable
- this.iIAPTable.open();
+ iIAPTable.open(iSessionHandle);
Vector apv = new Vector();
for (int i = 0; i < recNr; i++)
{
- // int _ret = this.iIAPTable.findById( ids[ i ] );
- int _ret = this.iIAPTable.findById(hp[i].Id);
+ // int _ret = iIAPTable.findById( ids[ i ] );
+ int _ret = iIAPTable.findById(hp[i].Id);
if (_ret != IAPTable.RECORD_NOT_FOUND)
{
- apv.addElement(new AccessPoint(this.iIAPTable.iRecordId,
- this.iIAPTable.iRecordName,
- this.iIAPTable.iBearerType,
- this.iIAPTable.iServiceType));
+ apv.addElement(new AccessPoint(iIAPTable.iRecordId,
+ iIAPTable.iRecordName,
+ iIAPTable.iBearerType,
+ iIAPTable.iServiceType));
}// end if
}// end for
@@ -359,14 +410,14 @@
_ac[i] = (AccessPoint) apv.elementAt(i);
}
- this.iIAPTable.close();
+ iIAPTable.close();
_prefTable.close();
}
catch (CommDBException e)
{
_prefTable.close();
- this.iIAPTable.close();
+ iIAPTable.close();
throw new IAPInfoException(e.getMessage());
}
return _ac;
@@ -427,4 +478,6 @@
static native String _getDestinationNetworkByName(String aName)
throws IAPInfoException;
+ private native int _createSession();
+
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javaextensions/iapinfo/src.s60/iapinfosession.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: JavaCommDB class implementation
+ *
+*/
+#include "iapinfosession.h"
+#include "fs_methodcall.h"
+
+#include "logger.h"
+
+using namespace CommsDat;
+
+IapInfoSession::IapInfoSession(): java::util::FunctionServer("MyIapServer")
+{
+ createServerToNewThread();
+
+}
+
+IapInfoSession* IapInfoSession::NewL()
+{
+ LOG(EJavaIapInfo, EInfo, "IapInfoSession + NewL()");
+ IapInfoSession* self = new(ELeave) IapInfoSession();
+ CallMethodL(self, &IapInfoSession::ConstructL,self);
+ return self;
+
+}
+
+void IapInfoSession::ConstructL()
+{
+ iDb = CMDBSession::NewL(KCDVersion1_1);
+
+}
+
--- a/javaextensions/iapinfo/src.s60/javacommdb.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/iapinfo/src.s60/javacommdb.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -24,6 +24,9 @@
#include "logger.h"
#include "javajniutils.h"
+#include "fs_methodcall.h"
+#include "com_nokia_mid_iapinfo_IAPInfoImpl.h"
+
using namespace CommsDat;
using namespace java::util;
@@ -35,49 +38,65 @@
_LIT(KFieldNameRecordId, "RecordId");
_LIT(KFieldNameName, "Name");
+JNIEXPORT jint JNICALL Java_com_nokia_mid_iapinfo_IAPInfoImpl__1createSession
+(JNIEnv *, jobject)
+{
+ IapInfoSession *sess = NULL;
+ TRAPD(err,sess = IapInfoSession::NewL(););
+ if (err!=KErrNone)
+ {
+ return err;
+ }
+ return reinterpret_cast<int>(sess);
+
+}
+
+
JNIEXPORT void JNICALL Java_com_nokia_mid_iapinfo_CommsTable__1destroy(JNIEnv* ,
jclass,
- jint aHandle)
+ jint /*aHandle*/)
{
- LOG1(ESOCKET, EInfo, "CJAVACOMMDB + destroy() handle: %D", aHandle);
- JavaCommDB* commdb = reinterpret_cast<JavaCommDB *>(aHandle);
- delete commdb;
+ LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB + destroy()");
+ // JavaCommDB* commdb = reinterpret_cast<JavaCommDB *>(aHandle);
+ // delete commdb;
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - destroy()");
}
-JNIEXPORT jint JNICALL Java_com_nokia_mid_iapinfo_CommsTable__1construct(JNIEnv* ,
- jclass)
+
+JNIEXPORT jint JNICALL Java_com_nokia_mid_iapinfo_CommsTable__1open(JNIEnv* aJni,
+ jclass, jint aSessionHandle,
+ jstring aTableName)
{
- LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB + construct()");
- JavaCommDB *cdb = new JavaCommDB();
+ LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB + open()gggggggggg");
+ IapInfoSession* session = reinterpret_cast<IapInfoSession *>(aSessionHandle);
+ JavaCommDB *cdb = new JavaCommDB(session);
+ JStringUtils table(*aJni, aTableName);
+ int err = -1;
+ TRAP(err,CallMethodL(cdb, &JavaCommDB::OpenL,table,cdb->iSession););
TInt handle = reinterpret_cast<jint>(cdb);
- LOG1(EJavaIapInfo, EInfo, "CJAVACOMMDB - construct() handle: %D", handle);
+ if (err < 0)
+ handle = err;
+ LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - open()hhhhhh");
return handle;
}
-JNIEXPORT jint JNICALL Java_com_nokia_mid_iapinfo_CommsTable__1open(JNIEnv* aJni,
- jclass, jint aHandle,
- jstring aTableName)
-{
- LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB + open()");
- JavaCommDB* commdb = reinterpret_cast<JavaCommDB *>(aHandle);
- JStringUtils table(*aJni, aTableName);
-
- //LOG1(EJavaIapInfo, EInfo, "CJAVACOMMDB opening table: %S", table );
- TRAPD(error, commdb->OpenL(table));
- LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - open()");
- return error;
-}
JNIEXPORT void JNICALL Java_com_nokia_mid_iapinfo_CommsTable__1close(JNIEnv* ,
jclass, jint aHandle)
{
LOG1(EJavaIapInfo, EInfo, "CJAVACOMMDB + close() handle: %D", aHandle);
JavaCommDB* commdb = reinterpret_cast<JavaCommDB *>(aHandle);
- TRAP_IGNORE(commdb->Close());
+ CallMethod(commdb, &JavaCommDB::Close,commdb->iSession);
+ //TRAP_IGNORE(commdb->Close());
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - close()");
}
+void JavaCommDB::Destroy(JavaCommDB* aObj)
+{
+ delete aObj;
+
+}
+
JNIEXPORT jint JNICALL Java_com_nokia_mid_iapinfo_CommsTable__1getRecordCount(JNIEnv* ,
jclass,
jint aHandle)
@@ -85,7 +104,8 @@
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB + getRecordCount()");
JavaCommDB* commdb = reinterpret_cast<JavaCommDB *>(aHandle);
TInt count = 0;
- count = commdb->GetRecordCount();
+ CallMethod(count, commdb, &JavaCommDB::GetRecordCount,commdb->iSession);
+ //count = commdb->GetRecordCount();
LOG1(EJavaIapInfo, EInfo, "CJAVACOMMDB returning value: %D", count);
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - getRecordCount()");
return count;
@@ -104,7 +124,9 @@
JStringUtils field(*aJni, aFieldName);
//LOG1(EJavaIapInfo, EInfo, "CJAVACOMMDB reading field value: %S", field );
- TRAPD(err, value = commdb->GetIntFieldValueL(field));
+
+ TRAPD(err,CallMethodL(value, commdb, &JavaCommDB::GetIntFieldValueL,field,commdb->iSession););
+ //TRAPD(err, value = commdb->GetIntFieldValueL(field));
// Put the native error code into the Java error array
jint javaError[1] =
@@ -131,7 +153,8 @@
JStringUtils field(*aJni, aFieldName);
//LOG1(EJavaIapInfo, EInfo, "CJAVACOMMDB reading field value: %S", field );
- TRAPD(err, value = commdb->GetStringFieldValueL(field));
+ TRAPD(err,CallMethodL(value, commdb, &JavaCommDB::GetStringFieldValueL,field,commdb->iSession););
+ // TRAPD(err, value = commdb->GetStringFieldValueL(field));
if (NULL != value && KErrNone == err)
{
str = S60CommonUtils::NativeToJavaString(*aJni, value->Des());
@@ -153,7 +176,9 @@
{
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB + next()");
JavaCommDB* commdb = reinterpret_cast<JavaCommDB *>(aHandle);
- TInt rec = commdb->Next();
+ TInt rec;
+ CallMethod(rec, commdb, &JavaCommDB::Next,commdb->iSession);
+ //TInt rec = commdb->Next();
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - next()");
return rec;
}
@@ -174,7 +199,8 @@
TInt recId = 0;
JavaCommDB* commdb = reinterpret_cast<JavaCommDB *>(aHandle);
- recId = commdb->FindById(aId);
+ CallMethod(recId, commdb, &JavaCommDB::FindById,aId,commdb->iSession);
+ //recId = commdb->FindById(aId);
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - findById()");
return recId;
}
@@ -189,7 +215,10 @@
JStringUtils name(*aJni, aName);
JavaCommDB* commdb = reinterpret_cast<JavaCommDB *>(aHandle);
- TRAP(recId, recId = commdb->FindByNameL(name));
+ TRAPD(err,CallMethodL(recId, commdb, &JavaCommDB::FindByNameL,name,commdb->iSession););
+ if (err < KErrNone)
+ recId = err;
+ //TRAP(recId, recId = commdb->FindByNameL(name));
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - findByName()");
return recId;
}
@@ -199,6 +228,13 @@
* ---------------------------------------------------------------------------
*/
+JavaCommDB::JavaCommDB(IapInfoSession *aSession)
+{
+ iSession = aSession;
+
+
+}
+
// ---------------------------------------------------------------------------
// Delete allocated member objects.
// -----------------------------------------------------------------------------
@@ -211,19 +247,18 @@
// ---------------------------------------------------------------------------
// Delete allocated member objects.
-// @return error code
// -----------------------------------------------------------------------------
-TInt JavaCommDB::Close()
+void JavaCommDB::Close()
{
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB + Close()");
iCurrentRecord = 0;
- delete iTable;
+ if (iTable)
+ delete iTable;
+
iTable = NULL;
- delete iDb;
- iDb = NULL;
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - Close()");
- return KErrNone;
+
}
// ---------------------------------------------------------------------------
@@ -234,7 +269,7 @@
void JavaCommDB::OpenL(const TDesC& aTableName)
{
//LOG1(EJavaIapInfo, EInfo, "CJAVACOMMDB + OpenL(): open table: %S", aTableName);
- iDb = CMDBSession::NewL(KCDVersion1_1);
+ //iDb = CMDBSession::NewL(KCDVersion1_1);
iCurrentRecord = 0;
if (0 == aTableName.Compare(KIAPTable))
@@ -259,7 +294,8 @@
"CJAVACOMMDB OpenL(): ConnectionPreferences table opened.");
}
// Load the table
- iTable->LoadL(*iDb);
+
+ iTable->LoadL(*(iSession->iDb));
LOG(EJavaIapInfo, EInfo, "CJAVACOMMDB - OpenL()");
}
--- a/javaextensions/pim/cntadapter/src.s60/cpimcontactitemadapter.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/pim/cntadapter/src.s60/cpimcontactitemadapter.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -193,12 +193,12 @@
JELOG2(EPim);
const CDesCArray& pimCategories = aItem.ItemData().Categories();
const TInt pimCategoryCount = pimCategories.Count();
- TBool* newCategoryTable = new(ELeave) TBool[pimCategoryCount];
- CleanupArrayDeletePushL(newCategoryTable);
+ CArrayFix<TInt>* newCategoryTable = new(ELeave) CArrayFixFlat<TInt> (pimCategoryCount);
+ CleanupStack::PushL(newCategoryTable);
TInt i = 0;
for (i = 0; i < pimCategoryCount; i++)
{
- newCategoryTable[i] = ETrue;
+ newCategoryTable->InsertL(TRUE,i);
}
CContactIdArray* cardCategories = aCard.GroupsJoinedLC();
@@ -220,14 +220,14 @@
}
else
{
- // old group
- newCategoryTable[pos] = EFalse;
+ // old group
+ newCategoryTable->InsertL(FALSE,pos);
}
}
// then add new categories
for (i = 0; i < pimCategoryCount; i++)
{
- if (newCategoryTable[i])
+ if (newCategoryTable->At(i))
{
TPtrC category = pimCategories[i];
iCategoryManager.AddToGroupL(id, category);
--- a/javaextensions/satsa/build/javasatsa.pro Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/satsa/build/javasatsa.pro Tue Sep 14 21:06:50 2010 +0300
@@ -14,12 +14,21 @@
# Description:
#
+include(../../../inc/build_defines.pri)
+
TARGET=javasatsa
TEMPLATE=lib
-CONFIG += omj java stl
-CONFIG -= qt
+CONFIG += omj java stl
-
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_5_0) {
+ CONFIG -= qt
+}
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_9_2) {
+ CONFIG -= qt
+}
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_10_1_ONWARDS) {
+ CONFIG += hb
+}
symbian {
@@ -30,12 +39,6 @@
../../inc \
../../../inc \
- contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_10_1_ONWARDS) {
-
- INCLUDEPATH += /epoc32/include/mw/hb/hbcore \
- /epoc32/include/mw/QtCore \
- /epoc32/include/mw/QtGui \
- }
SOURCES += ../pki/src.s60/*.cpp \
@@ -59,7 +62,6 @@
-lcertstore \
-lcharconv \
-lcms \
- -laknnotify \
-leiksrv \
-lctframework \
-lctsecdlgs \
@@ -74,15 +76,14 @@
-lestlib \
-lcryptography \
- contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_10_1_ONWARDS) {
-
- LIBS += -lHbCore\
- -lQtGui\
- -lQtCore\
- }
-
-
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_5_0) {
+ LIBS += -laknnotify \
+ }
+contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_9_2) {
+ LIBS += -laknnotify \
+ }
+
}
include(../../../build/omj.pri)
--- a/javaextensions/satsa/build/javasatsa_0x2002DCCE.mmp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/satsa/build/javasatsa_0x2002DCCE.mmp Tue Sep 14 21:06:50 2010 +0300
@@ -163,7 +163,6 @@
LIBRARY certstore.lib
LIBRARY charconv.lib
LIBRARY cms.lib
-LIBRARY aknnotify.lib
LIBRARY eiksrv.lib
LIBRARY ctframework.lib
LIBRARY ctsecdlgs.lib
@@ -177,6 +176,7 @@
LIBRARY WimClient.lib
LIBRARY estlib.lib
LIBRARY cryptography.lib
+LIBRARY aknnotify.lib
LIBRARY javautils.lib
LIBRARY libpthread.lib
LIBRARY libstdcppv5.lib
--- a/javaextensions/satsa/pki/src.s60/cstscredentialmanager.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/satsa/pki/src.s60/cstscredentialmanager.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -32,10 +32,15 @@
#include <charconv.h>
#include <pkcs10.h>
#include <secdlg.h>
+
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
#include <PKIDlg.h>
+#endif
+
#include <securityerr.h>
+
// CONSTANTS
_LIT(KSTSSymbianKeyStoreLabel, "Software key store");
_LIT(KSTSSymbianCertificateStoreLabel, "Software certificate store");
@@ -66,7 +71,12 @@
{
delete iEncodedCert;
delete iIssuerAndSerialNumber;
-
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+ if (iPKIDialog)
+ {
+ iPKIDialog->Release();
+ }
+#endif
delete iDistinguishedName;
delete iDisplayName;
delete iRequestEncoded;
@@ -529,7 +539,9 @@
//
void CSTSCredentialManager::ConstructL()
{
-
+ #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+ iPKIDialog = PKIDialogFactory::CreateNoteL();
+ #endif
User::LeaveIfError(iFileServer.Connect());
iWait = new(ELeave) CActiveSchedulerWait;
iStore = CUnifiedCertStore::NewL(iFileServer, ETrue);
@@ -614,7 +626,10 @@
{
// not found, ok to add
iState = EAddDialog;
-
+ #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+ iPKIDialog->SaveCertificate(EX509Certificate, EUserCertificate,
+ iSubject, iStatus);
+ #endif
SetActive();
return;
}
@@ -714,8 +729,9 @@
CCTCertInfo* certInfo = (*iCertInfoArray)[ 0 ];
iState = ERemoveDialog;
iHandle = certInfo->Handle();
-
-
+ #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+ iPKIDialog->DeleteCertificate(iHandle, iStatus);
+ #endif
SetActive();
}
@@ -777,8 +793,9 @@
}
iState = ECSRDialog;
iHandle = iKeyInfo->Handle();
-
-
+ #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+ iPKIDialog->CreateCSR(*iDisplayName, iHandle, iStatus);
+ #endif
SetActive();
}
@@ -1022,5 +1039,3 @@
FunctionServer::doServerSideInit();
}
-
-
--- a/javaextensions/satsa/pki/src.s60/cstscredentialmanager.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/satsa/pki/src.s60/cstscredentialmanager.h Tue Sep 14 21:06:50 2010 +0300
@@ -31,7 +31,9 @@
// FORWARD DECLARATIONS
class CCTKeyInfo;
-
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+class MPKIDialog;
+#endif
class CUnifiedCertStore;
class CUnifiedKeyStore;
class CX500DistinguishedName;
@@ -348,7 +350,11 @@
// internal error variable
TInt iError;
-
+
+#ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS
+ // PKI Dialog, owned
+ MPKIDialog* iPKIDialog;
+#endif
// The actual store, owned
CUnifiedCertStore* iStore;
--- a/javaextensions/sensor/src.s60/cnetworkfieldintensitysensor.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/sensor/src.s60/cnetworkfieldintensitysensor.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -146,15 +146,16 @@
SensorData* data = iData[ KNISensorChannel ];
TTime currentTime;
- if (data->iTimeStamps || (iBufferingPeriod > 0))
- {
- currentTime.UniversalTime();
- if (iStartTime == KErrNotFound)
+
+ if ((data->iTimeStampsIncluded) || (iBufferingPeriod > 0))
{
- iStartTime = currentTime;
+ currentTime.UniversalTime();
+ if (iStartTime == KErrNotFound)
+ {
+ iStartTime = currentTime;
+ }
}
- }
-
+
// P&S sensors are assumed to have one channel only
TInt interpretedValue = InterpretValue(aLevel);
--- a/javaextensions/sensor/src.s60/csensorbase.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaextensions/sensor/src.s60/csensorbase.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -249,14 +249,13 @@
matched = ETrue;
CSensorConditionBase *condition = iConditions[i];
iConditions.Remove(i);
- if (iSensorListener)
- {
- iSensorListener->ConditionMet(
- condition,
- condition->GetChannelId(),
- currentValue,
- javaTime);
- }
+
+ iSensorListener->ConditionMet(
+ condition,
+ condition->GetChannelId(),
+ currentValue,
+ javaTime);
+
delete condition;
}
}
@@ -264,6 +263,7 @@
// Also send all values separately if we have java side custom conditions
if (iJavaConditionEval)
{
+ if (iSensorListener != NULL)
iSensorListener->ConditionMet(0, aChannelId, currentValue, javaTime);
}
return matched;
--- a/javamanager/javacaptain/build/javacaptain.pro Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javacaptain/build/javacaptain.pro Tue Sep 14 21:06:50 2010 +0300
@@ -35,7 +35,7 @@
LIBS += -ljavacomms -ljavaipc -ljavafileutils -ljavastorage
symbian {
- LIBS += -lefsrv -lAknNotify
+ LIBS += -lefsrv
TARGET.EPOCHEAPSIZE = 0x2800 0x100000
TARGET.EPOCSTACKSIZE = 0x2000
TARGET.UID2 = 0x200211DC
--- a/javamanager/javacaptain/build/javacaptain_0x200211DC.mmp Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javacaptain/build/javacaptain_0x200211DC.mmp Tue Sep 14 21:06:50 2010 +0300
@@ -99,7 +99,6 @@
LIBRARY javafileutils.lib
LIBRARY javastorage.lib
LIBRARY efsrv.lib
-LIBRARY AknNotify.lib
LIBRARY javautils.lib
LIBRARY libpthread.lib
LIBRARY libstdcppv5.lib
--- a/javamanager/javacaptain/inc.s60/pmc.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javacaptain/inc.s60/pmc.h Tue Sep 14 21:06:50 2010 +0300
@@ -23,9 +23,6 @@
#include <map>
-#include <AknGlobalNote.h>
-
-
#include "javaoslayer.h"
#include "logger.h"
#include "scopedlocks.h"
@@ -143,13 +140,6 @@
void showErrorNote()
{
LOG(EJavaCaptain, EInfo, "Process failed to exit gracefully");
-#ifdef RD_JAVA_EXIT_ERROR_DIALOG
- //Print the dialog showing that force process kill was done.
- CAknGlobalNote* globalNote = CAknGlobalNote::NewL();
- globalNote->ShowNoteL(EAknGlobalErrorNote,
- _L("Midp process failed to exit gracefully."));
- delete globalNote;
-#endif
}
private:
--- a/javamanager/javainstaller/appinstuiplugin/src/javainstalllauncher.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/appinstuiplugin/src/javainstalllauncher.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -26,7 +26,7 @@
#include <CUIUtils.h>
#include <eikenv.h>
-#include <SisxUIData.rsg>
+#include <sisxuidata.rsg>
#include <javadomainpskeys.h>
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/GetComponentInfo.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/GetComponentInfo.java Tue Sep 14 21:06:50 2010 +0300
@@ -493,7 +493,7 @@
{
// Authenticate jar.
AuthenticationModule.getInstance().authenticateJar(
- null, suiteUid, null, iJarFilename,
+ suiteUid, null, iJarFilename,
FileUtils.isDrmProtected(iJarFilename));
}
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/Installer.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/Installer.java Tue Sep 14 21:06:50 2010 +0300
@@ -596,6 +596,8 @@
StopApplication());
// Update new application info in the following steps.
table.add(new com.nokia.mj.impl.installer.midp2.install.steps.
+ AddSecurityData());
+ table.add(new com.nokia.mj.impl.installer.midp2.install.steps.
AddToStorage());
table.add(new com.nokia.mj.impl.installer.midp2.install.steps.
RegisterPush());
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/AddSecurityData.java Tue Sep 14 21:06:50 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.installer.midp2.install.steps;
+
+import com.nokia.mj.impl.installer.exetable.ExeBall;
+import com.nokia.mj.impl.installer.exetable.ExeStep;
+import com.nokia.mj.impl.installer.utils.Log;
+import com.nokia.mj.impl.security.midp.authentication.AuthenticationModule;
+import com.nokia.mj.impl.security.midp.authorization.PermissionGranter;
+
+/**
+ * Writes application's security data into storage.
+ */
+public class AddSecurityData extends ExeStep
+{
+ public void execute(ExeBall aBall)
+ {
+ InstallBall ball = (InstallBall)aBall;
+ ball.log("Writing security data...");
+ AuthenticationModule.getInstance().addSecurityData
+ (ball.iStorageHandler.getSession(), ball.iSuite.getUid(),
+ (ball.iOldSuite != null? ball.iOldSuite.getUid(): null));
+ PermissionGranter.getInstance().addSecurityData
+ (ball.iStorageHandler.getSession(), ball.iSuite.getUid(),
+ (ball.iOldSuite != null? ball.iOldSuite.getUid(): null));
+ }
+
+ public void cancel(ExeBall aBall)
+ {
+ // nop
+ }
+}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/AuthenticateJar.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/AuthenticateJar.java Tue Sep 14 21:06:50 2010 +0300
@@ -35,12 +35,12 @@
}
ball.log("Authenticating Jar...");
- AuthenticationModule.getInstance().authenticateJar
- (ball.iStorageHandler.getSession(),
- ball.iSuite.getUid(),
- (ball.iOldSuite != null? ball.iOldSuite.getUid(): null),
- ball.iJarFilename,
- (ball.iSuite.getContentInfo() == SuiteInfo.CONTENT_INFO_DRM? true: false));
+ ball.iAuthenticationCredentials =
+ AuthenticationModule.getInstance().authenticateJar
+ (ball.iSuite.getUid(),
+ (ball.iOldSuite != null? ball.iOldSuite.getUid(): null),
+ ball.iJarFilename,
+ (ball.iSuite.getContentInfo() == SuiteInfo.CONTENT_INFO_DRM? true: false));
ball.iJarAuthenticated = true;
// Unregister OCSP listener after Jar authentication.
AuthenticationModule.getInstance().unregisterOcspEventListener(
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/CheckJarPackages.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/CheckJarPackages.java Tue Sep 14 21:06:50 2010 +0300
@@ -38,7 +38,6 @@
// the installation drive. This is needed to determine
// if tamper detection is needed.
AuthenticationModule.getInstance().setMediaId(
- ball.iStorageHandler.getSession(),
ball.iSuite.getUid(), ball.iSuite.getMediaId());
// Application package scanning must be skipped if instructed so
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/GrantJarPermissions.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/GrantJarPermissions.java Tue Sep 14 21:06:50 2010 +0300
@@ -45,9 +45,10 @@
}
ball.iSecurityAttributes.addManifestAttributes(ball.iJarAttributes);
PermissionGranter.getInstance().grantJarPermissions
- (ball.iStorageHandler.getSession(), ball.iSuite.getUid(),
+ (ball.iSuite.getUid(),
(ball.iOldSuite != null? ball.iOldSuite.getUid(): null),
- ball.iSecurityAttributes.getPermissionAttributes());
+ ball.iSecurityAttributes.getPermissionAttributes(),
+ ball.iAuthenticationCredentials);
ball.iJarPermissionsGranted = true;
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/HandleCustomAttributes.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/HandleCustomAttributes.java Tue Sep 14 21:06:50 2010 +0300
@@ -102,6 +102,11 @@
}
for (int i = 1; true; i++)
{
+ if (apps.size() < i)
+ {
+ break;
+ }
+
String attrName = "Nokia-MIDlet-Auto-Start-" + i;
String attrValue = aBall.getAttributeValue(attrName);
@@ -122,9 +127,12 @@
if (attrValue != null)
{
- if (apps.size() < i)
+ if (!aBall.attributeExistsInJar(attrName))
{
- break;
+ // The attribute is only in .jad, ignore it.
+ Log.logWarning("Attribute " + attrName +
+ " ignored because it is not in Manifest");
+ continue;
}
// Check if MIDlet has permission for Auto-start
@@ -171,10 +179,6 @@
OtaStatusCode.INVALID_JAR));
}
}
- else
- {
- break;
- }
}
}
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/AutoStartPermission.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/AutoStartPermission.java Tue Sep 14 21:06:50 2010 +0300
@@ -75,6 +75,10 @@
*/
public boolean equals(Object obj)
{
+ if (!(obj instanceof AutoStartPermission))
+ {
+ return false;
+ }
return (obj.hashCode() == hashCode());
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/rt/installer/ApplicationUtilsImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/rt/installer/ApplicationUtilsImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -173,7 +173,9 @@
{
if (iSilent)
{
- // Do not prompt the user in case of silent installation.
+ // Do not prompt the user in case of silent installation
+ // -> don't enforce security, just query the permission
+ // to see if it is not allowed
int permissionResult =
iAccessController.checkPermission(aPermission.toString());
Log.log("ApplicationUtilsImpl.checkPermission: appUid: " +
@@ -188,7 +190,8 @@
}
else
{
- // Not a silent installation, display user prompt.
+ // Not a silent installation -> enforce security (an user
+ // prompt might be displayed)
iAccessController.checkPermission(aPermission);
Log.log("ApplicationUtilsImpl.checkPermission: appUid: " +
aAppUid + ", " + aPermission.toString() + " ok");
@@ -196,15 +199,17 @@
}
else
{
- // No user prompt allowed for this permission.
+ // No user prompt allowed for this permission -> don't enforce
+ // security, just query the permission to see if it is not
+ // allowed
int permissionResult =
iAccessController.checkPermission(aPermission.toString());
Log.log("ApplicationUtilsImpl.checkPermission: appUid: " +
aAppUid + ", " + aPermission.toString() +
" result " + permissionResult);
- if (permissionResult <= 0)
+ if (permissionResult == 0)
{
- // Permission is either denied or requires user prompt.
+ // Permission is denied
throw new AccessControlException(
"Permission " + aPermission.toString() + " not allowed");
}
--- a/javamanager/javainstaller/installer/src.s60/utils/sysutil.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/src.s60/utils/sysutil.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -93,8 +93,8 @@
TUid repositoryUid = { aRepository };
CRepository* repository = CRepository::NewLC(repositoryUid);
RBuf buf;
- buf.Create(NCentralRepositoryConstants::KMaxUnicodeStringLength);
CleanupClosePushL(buf);
+ buf.CreateL(NCentralRepositoryConstants::KMaxUnicodeStringLength);
TInt err = repository->Get(aKey, buf) ;
if (KErrNone == err)
{
--- a/javamanager/javainstaller/installer/tsrc/testdata/installerengine/HelloWorld_3_midlets.jad Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javainstaller/installer/tsrc/testdata/installerengine/HelloWorld_3_midlets.jad Tue Sep 14 21:06:50 2010 +0300
@@ -9,8 +9,8 @@
Nokia-MIDlet-UID-1: 0xefef0001
Nokia-MIDlet-UID-3: 0xefef0003
Nokia-MIDlet-On-Screen-Keypad: no
-Nokia-MIDlet-Auto-Start-1: true
-Nokia-MIDlet-Auto-Start-2: false
+Nokia-MIDlet-auto-start: true
+Nokia-MIDlet-auto-start-2: false
Nokia-MIDlet-Auto-Start-3: once
MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=CE00C90A2EF00F07C210A061BD15A4EC&tID=900_success
MIDlet-Delete-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=CE00C90A2EF00F07C210A061BD15A4EC&tID=912_deletion_notification
--- a/javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingshandler.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingshandler.h Tue Sep 14 21:06:50 2010 +0300
@@ -118,12 +118,12 @@
* ApplicationInfo::OPERATOR_DOMAIN
* ApplicationInfo::UNIDENTIFIED_THIRD_PARTY_DOMAIN
*/
- const std::wstring GetSecurityDomainCategory();
+ const std::wstring GetSecurityDomainCategoryL();
/**
* Gets security domain name
*/
- const std::wstring GetSecurityDomainName();
+ const std::wstring GetSecurityDomainNameL();
/**
* Gets security warnings mode value
--- a/javamanager/javasettings/appmngrplugin/src/appmngr2midletappinfo.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javasettings/appmngrplugin/src/appmngr2midletappinfo.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -779,15 +779,15 @@
ELOG1(EJavaAppMngrPlugin, "GetAppIconL error %d", err);
}
}
-
+
CleanupStack::PopAndDestroy(&midletUids);
// security domain
CAppMngr2MidletSettingsHandler* settingsHandler
= CAppMngr2MidletSettingsHandler::NewL(*iLocalizedMIDletName, iEntry->Uid(), iResourceHandler);
CleanupStack::PushL(settingsHandler);
- iSecurityDomainCategory = settingsHandler->GetSecurityDomainCategory();
- iSecurityDomainName = settingsHandler->GetSecurityDomainName();
+ iSecurityDomainCategory = settingsHandler->GetSecurityDomainCategoryL();
+ iSecurityDomainName = settingsHandler->GetSecurityDomainNameL();
CleanupStack::PopAndDestroy(settingsHandler);
if (iSecurityDomainCategory != UNIDENTIFIED_THIRD_PARTY_DOMAIN_CATEGORY)
{
@@ -998,20 +998,20 @@
void CAppMngr2MidletAppInfo::GetAppIconL(TUid aMidletUid)
{
LOG(EJavaAppMngrPlugin, EInfo, "+ CAppMngr2MidletAppInfo::GetAppIconL");
-
+
ASSERT(!iAppBitmap);
ASSERT(!iAppMask);
-
+
RApaLsSession lsSession;
- User::LeaveIfError(lsSession.Connect());
+ User::LeaveIfError(lsSession.Connect());
CleanupClosePushL(lsSession);
CApaMaskedBitmap* apaBmp = CApaMaskedBitmap::NewLC();
-
+
TSize size = static_cast<CAppMngr2MidletRuntime&>(Runtime()).JavaRasterIconSize();
TInt err = lsSession.GetAppIcon(aMidletUid, size, *apaBmp);
if (err == KErrNone)
{
- iAppBitmap = new (ELeave) CFbsBitmap();
+ iAppBitmap = new (ELeave) CFbsBitmap();
iAppMask = new (ELeave) CFbsBitmap();
User::LeaveIfError(iAppBitmap->Duplicate(apaBmp->Handle()));
User::LeaveIfError(iAppMask->Duplicate(apaBmp->Mask()->Handle()));
@@ -1025,6 +1025,6 @@
EAknsAppIconTypeList, iAppBitmap, iAppMask);
CleanupStack::Pop(2); // iAppBitmap, iAppMask
}
-
+
LOG(EJavaAppMngrPlugin, EInfo, "- CAppMngr2MidletAppInfo::GetAppIconL");
}
--- a/javamanager/javasettings/appmngrplugin/src/appmngr2midletinfoiterator.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javasettings/appmngrplugin/src/appmngr2midletinfoiterator.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -17,7 +17,7 @@
#include <StringLoader.h> // StringLoader
-#include <SWInstCommonUI.rsg> // Resource IDs
+#include <swinstcommonui.rsg> // Resource IDs
#include <javaapplicationsettings.rsg> // Midlet resource IDs
#include <AknUtils.h> // AknTextUtils
#include <SWInstDefs.h> // KJadMimeType
--- a/javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingshandler.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingshandler.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -244,9 +244,9 @@
findEntry(queryResult, VALUE, value);
- if (value.size() > 0
+ if (value.size() > 0
&& ((value == L"no")
- || (value == L"navigationkeys")
+ || (value == L"navigationkeys")
|| (value == L"gameactions")))
{
predefined = true;
@@ -306,7 +306,7 @@
LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::SetCurrentSuiteSnapL ");
}
-const std::wstring CAppMngr2MidletSettingsHandler::GetSecurityDomainCategory()
+const std::wstring CAppMngr2MidletSettingsHandler::GetSecurityDomainCategoryL()
{
wstring securityDomainCategory = L"";
@@ -325,6 +325,7 @@
catch (JavaStorageException& aJse)
{
ELOG1(EJavaAppMngrPlugin, "SECURITY_DOMAIN_CATEGORY value read failed: %d", aJse.mStatus);
+ User::Leave(KErrLocked);
}
findEntry(queryResult, SECURITY_DOMAIN_CATEGORY, securityDomainCategory);
@@ -333,7 +334,7 @@
}
-const std::wstring CAppMngr2MidletSettingsHandler::GetSecurityDomainName()
+const std::wstring CAppMngr2MidletSettingsHandler::GetSecurityDomainNameL()
{
wstring securityDomainName = L"";
@@ -352,6 +353,7 @@
catch (JavaStorageException& aJse)
{
ELOG1(EJavaAppMngrPlugin, "SECURITY_DOMAIN value read failed: %d", aJse.mStatus);
+ User::Leave(KErrLocked);
}
findEntry(queryResult, SECURITY_DOMAIN, securityDomainName);
--- a/javaruntimes/jvmargmodifier/file/build/javajvmargsmodifierfile.pro Wed Sep 01 12:33:18 2010 +0100
+++ b/javaruntimes/jvmargmodifier/file/build/javajvmargsmodifierfile.pro Tue Sep 14 21:06:50 2010 +0300
@@ -21,8 +21,4 @@
LIBS += -ljavafileutils
-symbian {
-LIBS += -laknnotify
-}
-
include(../../../../build/omj.pri)
--- a/javaruntimes/jvmargmodifier/file/build/javajvmargsmodifierfile_0x2002DCB9.mmp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaruntimes/jvmargmodifier/file/build/javajvmargsmodifierfile_0x2002DCB9.mmp Tue Sep 14 21:06:50 2010 +0300
@@ -68,7 +68,6 @@
LIBRARY javafileutils.lib
-LIBRARY aknnotify.lib
LIBRARY javautils.lib
LIBRARY libpthread.lib
LIBRARY libstdcppv5.lib
--- a/javaruntimes/jvmargmodifier/file/src/jvmargsmodifier.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javaruntimes/jvmargmodifier/file/src/jvmargsmodifier.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description: A default empty implementation for JvmArgs modifier.
+* Description: A file argument reader implementation for JvmArgs modifier.
*
*/
@@ -23,33 +23,17 @@
#include "jvmargsfilereader.h"
#include "argsmodifier.h"
-#ifdef __SYMBIAN32__
-#include <AknGlobalNote.h>
-_LIT(KArgsTxt, "Note! Modified VM arguments used!");
-#endif
-
void logArguments(std::wstring aArg)
{
WLOG1(EJavaRuntime, " '%S'", aArg.c_str());
}
-#ifdef __SYMBIAN32__
-void showWarningDialogL()
-{
- ::CAknGlobalNote* globalNote = CAknGlobalNote::NewL();
- CleanupStack::PushL(globalNote);
- globalNote->ShowNoteL(EAknGlobalInformationNote, KArgsTxt);
- CleanupStack::PopAndDestroy(globalNote);
-}
-#endif
-
-
OS_EXPORT
void java::runtime::modifyJvmArguments(const std::wstring& aIdentifier,
std::list<std::wstring>& aJvmArgs,
std::list<std::wstring>& aApplicationAndArgs)
{
- JELOG2(EJavaRuntime);
+ PLOG(EJavaRuntime, "JVM File Argument modifier in use");
#ifdef __SYMBIAN32__
// Open the extension directory of the J9 VM.
@@ -70,9 +54,6 @@
std::for_each(aJvmArgs.begin(), aJvmArgs.end(), logArguments);
WLOG(EJavaRuntime, "new App arguments");
std::for_each(aApplicationAndArgs.begin(), aApplicationAndArgs.end(), logArguments);
-#ifdef __SYMBIAN32__
- TRAP_IGNORE(showWarningDialogL());
-#endif
}
}
--- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/utils/CmdLineArgsPermission.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/utils/CmdLineArgsPermission.java Tue Sep 14 21:06:50 2010 +0300
@@ -77,6 +77,10 @@
*/
public boolean equals(Object obj)
{
+ if (!(obj instanceof CmdLineArgsPermission))
+ {
+ return false;
+ }
return (obj.hashCode() == hashCode());
}
--- a/javatools/javacontrolpanel/controlpanel/javasrc/com/nokia/mj/impl/rt/javacontrolpanel/ApplicationUtilsImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javatools/javacontrolpanel/controlpanel/javasrc/com/nokia/mj/impl/rt/javacontrolpanel/ApplicationUtilsImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -20,6 +20,7 @@
import com.nokia.mj.impl.rt.support.ApplicationInfo;
import com.nokia.mj.impl.rt.support.ApplicationUtils;
import com.nokia.mj.impl.utils.Uid;
+import com.nokia.mj.impl.utils.Logger;
import java.security.Permission;
import java.security.AccessControlException;
@@ -39,6 +40,8 @@
public void notifyExitCmd()
{
+ Logger.ILOG(Logger.EUtils, "notifyExitCmd() - exiting");
+ System.exit(0);
}
public void checkPermission(Permission aPermission)
--- a/javatools/tckrunner/runner/javasrc/com/nokia/mj/impl/rt/tckrunner/ApplicationUtilsImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javatools/tckrunner/runner/javasrc/com/nokia/mj/impl/rt/tckrunner/ApplicationUtilsImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -20,6 +20,7 @@
import com.nokia.mj.impl.rt.support.ApplicationInfo;
import com.nokia.mj.impl.rt.support.ApplicationUtils;
import com.nokia.mj.impl.utils.Uid;
+import com.nokia.mj.impl.utils.Logger;
import java.security.Permission;
import java.security.AccessControlException;
@@ -39,6 +40,8 @@
public void notifyExitCmd()
{
+ Logger.ILOG(Logger.ETckRunner, "notifyExitCmd() - exiting");
+ System.exit(0);
}
public void checkPermission(Permission aPermission)
--- a/javauis/amms_akn/build/javaamms_0x2002DC96.mmp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/amms_akn/build/javaamms_0x2002DC96.mmp Tue Sep 14 21:06:50 2010 +0300
@@ -64,7 +64,6 @@
SYSTEMINCLUDE ../module/inc
SYSTEMINCLUDE ../src_tuner/native/external_include
SYSTEMINCLUDE ../src_tuner/native/inc
-SYSTEMINCLUDE ../../mmapi_akn/baseline/inc
SYSTEMINCLUDE ../mmacontrol/inc.emc
SYSTEMINCLUDE ../../inc
SYSTEMINCLUDE ../../../inc
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtconstrainedtext.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtconstrainedtext.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -655,53 +655,59 @@
{
case ENumeric:
{
- editor = new(ELeave)CSwtIntegerEdwin;
+ // The intEd has to be CSwtIntererEdwin*, otherwise wrong
+ // ConstrucL() method is called.
+ CSwtIntegerEdwin* intEd = new(ELeave)CSwtIntegerEdwin;
+ editor = intEd;
SetEditor(editor);
- editor->ConstructL(-KMaxTInt, KMaxTInt, iTextLimit);
- editor->SetTextLimit(iTextLimit);
- editor->SetAknEditorCase(EAknSCTNumeric);
- editor->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
- editor->SetAknEditorInputMode(EAknEditorNumericInputMode);
- editor->SetAknEditorCurrentInputMode(EAknEditorNumericInputMode);
- editor->SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
- editor->SetAknEditorFlags(EAknEditorFlagFixedCase
- | EAknEditorFlagNoT9
- | EAknEditorFlagUseSCTNumericCharmap
- | EAknEditorFlagDeliverVirtualKeyEventsToApplication
+ intEd->ConstructL(-KMaxTInt, KMaxTInt, iTextLimit);
+ intEd->SetTextLimit(iTextLimit);
+ intEd->SetAknEditorCase(EAknSCTNumeric);
+ intEd->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
+ intEd->SetAknEditorInputMode(EAknEditorNumericInputMode);
+ intEd->SetAknEditorCurrentInputMode(EAknEditorNumericInputMode);
+ intEd->SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
+ intEd->SetAknEditorFlags(EAknEditorFlagFixedCase
+ | EAknEditorFlagNoT9
+ | EAknEditorFlagUseSCTNumericCharmap
+ | EAknEditorFlagDeliverVirtualKeyEventsToApplication
#ifdef RD_JAVA_S60_RELEASE_9_2
- | EAknEditorFlagEnablePartialScreen
+ | EAknEditorFlagEnablePartialScreen
#endif // RD_JAVA_S60_RELEASE_9_2
- );
- editor->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_NUMERIC_MODE_DIALOG);
+ );
+ intEd->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_NUMERIC_MODE_DIALOG);
}
break;
case EDecimal:
{
- editor = new(ELeave) CSwtFloatingPointEdwin;
+ // The floatEd has to be CSwtFloatingPointEdwin*, otherwise wrong
+ // ConstrucL() method is called.
+ CSwtFloatingPointEdwin* floatEd = new(ELeave) CSwtFloatingPointEdwin;
+ editor = floatEd;
SetEditor(editor);
- editor->ConstructL(-KMaxTInt, KMaxTInt, iTextLimit);
- editor->SetAknEditorCase(EAknSCTNumeric);
- editor->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
- editor->SetAknEditorInputMode(EAknEditorNumericInputMode);
- editor->SetAknEditorCurrentInputMode(EAknEditorNumericInputMode);
- editor->SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
+ floatEd->ConstructL(-KMaxTInt, KMaxTInt, iTextLimit);
+ floatEd->SetAknEditorCase(EAknSCTNumeric);
+ floatEd->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
+ floatEd->SetAknEditorInputMode(EAknEditorNumericInputMode);
+ floatEd->SetAknEditorCurrentInputMode(EAknEditorNumericInputMode);
+ floatEd->SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
- editor->SetAknEditorFlags(EAknEditorFlagFixedCase
- | EAknEditorFlagNoT9
- | EAknEditorFlagUseSCTNumericCharmap
- | EAknEditorFlagDeliverVirtualKeyEventsToApplication
+ floatEd->SetAknEditorFlags(EAknEditorFlagFixedCase
+ | EAknEditorFlagNoT9
+ | EAknEditorFlagUseSCTNumericCharmap
+ | EAknEditorFlagDeliverVirtualKeyEventsToApplication
#ifdef RD_JAVA_S60_RELEASE_9_2
- | EAknEditorFlagEnablePartialScreen
+ | EAknEditorFlagEnablePartialScreen
#endif // RD_JAVA_S60_RELEASE_9_2
- );
+ );
if (iDecimalSeparator == ',')
{
- editor->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_DECIMAL_MODE_WITH_COMMA_DIALOG);
+ floatEd->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_DECIMAL_MODE_WITH_COMMA_DIALOG);
}
else
{
- editor->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_DECIMAL_MODE_DIALOG);
+ floatEd->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_DECIMAL_MODE_DIALOG);
}
}
break;
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtedwincustomdrawer.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtedwincustomdrawer.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -100,7 +100,10 @@
{
return;
}
- aParam.iGc.SetClippingRect(iClippingRect);
+ if (!iEdwin.SelectionLength())
+ {
+ aParam.iGc.SetClippingRect(iClippingRect);
+ }
iEdWinDrawer->DrawText(
aParam,
aLineInfo,
@@ -130,7 +133,10 @@
{
return;
}
- aParam.iGc.SetClippingRect(iClippingRect);
+ if (!iEdwin.SelectionLength())
+ {
+ aParam.iGc.SetClippingRect(iClippingRect);
+ }
iEdWinDrawer->DrawText(
aParam,
aLineInfo,
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttext.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttext.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -10,7 +10,7 @@
*******************************************************************************/
-#include <EIKCOCTL.rsg>
+#include <eikcoctl.rsg>
#include <AknUtils.h>
#include <eikedwin.h>
#include <AknNumEdwin.h>
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextbase.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextbase.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -12,7 +12,7 @@
#include <eikedwin.h>
#include <txtglobl.h>
-#include <EIKCOCTL.rsg>
+#include <eikcoctl.rsg>
#include <AknsUtils.h>
#include <swtlaffacade.h>
#include <AknUtils.h>
--- a/javauis/lcdui_akn/lcdui/inc/CMIDForm.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDForm.h Tue Sep 14 21:06:50 2010 +0300
@@ -592,6 +592,10 @@
TInt iTactileFeedbackDensity;
TInt iLastPointerEventType;
#endif //RD_JAVA_ADVANCED_TACTILE_FEEDBACK
+
+ // Storing index to last pointed control
+ // before Form layout is performed
+ TInt iLastPointedControl;
};
inline void CMIDForm::Dispose()
--- a/javauis/lcdui_akn/lcdui/src/CMIDCanvas.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDCanvas.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -483,7 +483,7 @@
CustomComponentControl(KComponentMainControl)->IsVisible()))
{
// Traversal check
- if ((aType == EEventKeyDown) &&
+ if ((aType == EEventKey) &&
(((aEvent.iCode == EKeyUpArrow) ||
(aEvent.iCode == EKeyDownArrow)) ||
((aEvent.iScanCode == EStdKeyUpArrow) ||
@@ -2458,7 +2458,10 @@
}
// To have the cursor on focused control
- if (iFocusedComponent != KComponentFocusedNone)
+ if ((iFocusedComponent != KComponentFocusedNone) &&
+ (iFocusedComponent < iCustomComponents.Count()) &&
+ iCustomComponents[iFocusedComponent]->
+ CustomComponentControl(KComponentMainControl)->IsVisible())
{
iCustomComponents[iFocusedComponent]->
CustomComponentControl(KComponentMainControl)->
@@ -2656,13 +2659,13 @@
iLandscape = landscape;
PostEvent(ESizeChanged, iContentSize.iWidth, iContentSize.iHeight);
-
if (IsWindowVisible() && iWndUpdate)
{
// Post forced paint to enable Canvas repaint behind
// Alert or Pop-up TextBox
PostForcedPaint();
}
+
#else
iContentSize = contentSize;
PostEvent(ESizeChanged, iContentSize.iWidth, iContentSize.iHeight);
@@ -2688,6 +2691,14 @@
// We cannot determine whether the control size actually did change or
// not, so we have to do the layout no matter what.
Layout();
+#ifdef RD_JAVA_NGA_ENABLED
+ if (IsWindowVisible() && iWndUpdate)
+ {
+ // Post forced paint to enable Canvas repaint behind
+ // Alert or Pop-up TextBox
+ PostForcedPaint();
+ }
+#endif // RD_JAVA_NGA_ENABLED
}
DEBUG("- CMIDCanvas::SizeChanged");
}
--- a/javauis/lcdui_akn/lcdui/src/CMIDEdwin.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDEdwin.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -20,7 +20,7 @@
#include <eikappui.h>
#include <coecntrl.h>
// macros for resources
-#include <EIKCOCTL.rsg>
+#include <eikcoctl.rsg>
#include <AknUtils.h>
// usied for playing error sounds when text input
--- a/javauis/lcdui_akn/lcdui/src/CMIDEdwinUtils.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDEdwinUtils.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -60,7 +60,7 @@
#include <eikappui.h>
#include <coecntrl.h>
-#include <EIKCOCTL.rsg>
+#include <eikcoctl.rsg>
#include <aknenv.h>
#include <AknUtils.h>
--- a/javauis/lcdui_akn/lcdui/src/CMIDForm.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDForm.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -2072,7 +2072,8 @@
CMIDForm::CMIDForm(MMIDEnv& aEnv, CMIDDisplayable& aDisplayable)
: iDisplayable(aDisplayable), iEnv(&aEnv), iFocused(KErrNotFound),
iInitialAlignment(MMIDItem::ELeft), iHasScrolled(EFalse),
- iLastFadeMessage(0)
+ iLastFadeMessage(0),
+ iLastPointedControl(KErrNotFound)
{
}
@@ -3378,6 +3379,12 @@
// add any additional row breaks if needed
InsertNewlinesL(NumNewLinesAfter(ci), &ci);
}
+
+ // Restore pointed control
+ if (iLastPointedControl != KErrNotFound)
+ {
+ iPointedControl = &ControlItem(iLastPointedControl);
+ }
}
/** Return true if the item is an unconstrained string item, false otherwise */
@@ -3730,6 +3737,13 @@
// CMIDForm::HandleHighlightTimer or
// in CMIDForm::HandlePhysicsPointerEventL),
// iPointedControl must be set to NULL.
+ if (iPointedControl)
+ {
+ // Store the index to last poited control. It will
+ // be restored after item are placed to new rows
+ // (see CMIDForm::AssignItemsToRowsL).
+ iLastPointedControl = ItemIndex(*iPointedControl);
+ }
iPointedControl = NULL;
for (TInt i=0; i < iRows.Count(); i++)
--- a/javauis/lcdui_akn/lcdui/src/CMIDKeyDecoder.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDKeyDecoder.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -191,8 +191,8 @@
/** */
CMIDKeyDecoder::CMIDKeyDecoder(MMIDEnv& aEnv)
- : iEnv(aEnv)
- ,iMediaKeysEnabled(EFalse)
+ : iEnv(aEnv)
+ ,iMediaKeysEnabled(EFalse)
{
DEBUG("< CMIDKeyDecoder::CMIDKeyDecoder");
DEBUG("> CMIDKeyDecoder::CMIDKeyDecoder");
@@ -222,18 +222,24 @@
TRAP(err, repository = CRepository::NewL(KCRUidMidpLcdui));
// 2 bytes in scan code
TBuf8<2> scanCodeBuffer;
- CleanupStack::PushL(repository);
- err = repository->Get(KAdditionalSelectKeyMapping,scanCodeBuffer);
- CleanupStack::PopAndDestroy(repository);
+
+ if (err == KErrNone)
+ {
+ CleanupStack::PushL(repository);
+ err = repository->Get(KAdditionalSelectKeyMapping,scanCodeBuffer);
+ CleanupStack::PopAndDestroy(repository);
+ }
if (err == KErrNone)
{
TUint8 scanCodeLeft = scanCodeBuffer[0];
TUint8 scanCodeRight = scanCodeBuffer[1];
TUint scanCode = (scanCodeLeft << 8) + scanCodeRight;
- if (scanCode != 0)
- {
- iAdditionalSelectkeyMapping = scanCode;
- }
+ iAdditionalSelectkeyMapping = scanCode;
+ }
+ else
+ {
+ // Default value is set in error situations.
+ iAdditionalSelectkeyMapping = 0;
}
CreateQwertyWatchL();
@@ -297,11 +303,13 @@
User::LeaveIfError(iSpecialKeys.Append(TMIDKey(EStdKeyDevice13,EKeyLeftDownArrow, R_MIDP_KEY_LEFT)));
User::LeaveIfError(iSpecialKeys.Append(TMIDKey(EStdKeyDelete,EKeyDelete, R_MIDP_KEY_DELETE)));
if (!iQwertyModeActive)
- { // ITU-T keys with different behaviour
+ {
+ // ITU-T keys with different behaviour
User::LeaveIfError(iSpecialKeys.Append(TMIDKey(EStdKeyBackspace, KMIDKeyClear, R_MIDP_KEY_CLEAR)));
}
else
- { // QWERTY keys with different behaviour
+ {
+ // QWERTY keys with different behaviour
User::LeaveIfError(iSpecialKeys.Append(TMIDKey(EStdKeyBackspace, EKeyBackspace, R_MIDP_KEY_BACKSPACE)));
}
@@ -557,12 +565,14 @@
iActionScanCodes = NULL;
if (!QwertyInputAvailable())
- { // if no qwerty always use default ITU-T codes
+ {
+ // if no qwerty always use default ITU-T codes
DEBUG(" CMIDKeyDecoder::LoadGameActionCodesL - use default ITU-T scan codes");
iActionScanCodes = (TInt*)&KDefaultActionScanCodes[0];
}
else
- { // if there is qwerty either use CR repository codes or default qwerty codes
+ {
+ // if there is qwerty either use CR repository codes or default qwerty codes
CRepository* repository = NULL;
TRAPD(crExists, repository = CRepository::NewL(KCRUidMidpLcdui));
@@ -573,12 +583,14 @@
}
if (iUseCRScanCodes)
- { // use CR QWERTY codes
+ {
+ // use CR QWERTY codes
DEBUG(" CMIDKeyDecoder::LoadGameActionCodesL - use central repository scan codes");
LoadCentralRepositoryCodesL(repository);
}
else
- { // use default QWERTY codes
+ {
+ // use default QWERTY codes
DEBUG(" CMIDKeyDecoder::LoadGameActionCodesL - add default qwerty scan codes");
iActionScanCodes = (TInt*)&KDefaultQwertyActionScanCodes[0];
}
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextBoxDialogControl.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextBoxDialogControl.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -20,7 +20,7 @@
#include "lcdui.hrh"
#include <lcdui.rsg>
-#include <EIKCOCTL.rsg>
+#include <eikcoctl.rsg>
#include <j2me/jdebug.h>
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextBoxQueryDialog.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextBoxQueryDialog.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -20,7 +20,7 @@
#include "lcdui.hrh"
#include <lcdui.rsg>
-#include <EIKCOCTL.rsg>
+#include <eikcoctl.rsg>
#include "CMIDEdwinUtils.h"
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextEditor.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextEditor.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -452,7 +452,7 @@
}
else
{
- iTextEdwin->OfferKeyEventL(aEvent, EEventKeyDown);
+ iTextEdwin->OfferKeyEventL(aEvent, EEventKey);
}
}
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwin.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwin.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -157,9 +157,9 @@
// Not handled, try with CEikEdwin
// Consume down and up type of keyevents
- if ((response == EKeyWasConsumed) ||
- (aType != EEventKey && aKeyEvent.iScanCode !=
- EStdKeyApplication0))
+ if ((response == EKeyWasConsumed) ||
+ (aType != EEventKey && aKeyEvent.iScanCode !=
+ EStdKeyApplication0))
{
response = EKeyWasConsumed;
}
@@ -178,8 +178,9 @@
CleanupStack::PushL(oldContent);
response = CEikEdwin::OfferKeyEventL(aKeyEvent, aType);
-
- if (response == EKeyWasConsumed) {
+
+ if (response == EKeyWasConsumed)
+ {
// Validate new content and undo if not valid.
if (!iEdwinUtils.ConstraintsValidForText(
Read(), iConstraints, EFalse))
@@ -192,14 +193,13 @@
}
}
else
- {
- // Consuming the up/down arrows, because edwin does not
- // consume them if at first/last line.
- if ((aType == EEventKey) &&
- (((aKeyEvent.iCode == EKeyUpArrow) ||
- (aKeyEvent.iCode == EKeyDownArrow)) ||
- ((aKeyEvent.iScanCode == EStdKeyUpArrow) ||
- (aKeyEvent.iScanCode == EStdKeyDownArrow))))
+ {
+ // Consuming the up/down arrows, because edwin does not
+ // consume them when using predictive text
+ if (((aKeyEvent.iCode == EKeyUpArrow) ||
+ (aKeyEvent.iCode == EKeyDownArrow)) ||
+ ((aKeyEvent.iScanCode == EStdKeyUpArrow) ||
+ (aKeyEvent.iScanCode == EStdKeyDownArrow)))
{
response = EKeyWasConsumed;
}
--- a/javauis/m2g_akn/javasrc/com/nokia/microedition/m2g/M2GSVGElement.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/m2g_akn/javasrc/com/nokia/microedition/m2g/M2GSVGElement.java Tue Sep 14 21:06:50 2010 +0300
@@ -1251,7 +1251,7 @@
/*SF*/"The element being removed or one of its decendants have non-null id."/*SF*/);
}
// The removedChildHandle handle should be same as the removableChild handle
- int removedChildHandle = removedChildHandle = _removeChild(
+ int removedChildHandle = _removeChild(
getNativeEventSourceHandle(), getNativeSVGProxyHandle(),
getHandle(), removableChild.getHandle(), iUIToolkit);
// Remove the element from the live elements
--- a/javauis/mmapi_akn/baseline/inc.nga/cmmasurfacewindow.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/inc.nga/cmmasurfacewindow.h Tue Sep 14 21:06:50 2010 +0300
@@ -168,6 +168,8 @@
public: // New methods
TBool IsVisible() const;
+ TInt PlayerState();
+ TBool IsVideoPlayer();
IMPORT_C void SetDisplay(MMMADisplay *aDisplay);
/**
--- a/javauis/mmapi_akn/baseline/inc/cmmadisplay.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/inc/cmmadisplay.h Tue Sep 14 21:06:50 2010 +0300
@@ -153,6 +153,16 @@
* Add clip region
*/
void AddClippingRegion();
+
+ /**
+ * Set whether java side had set the size or not
+ */
+ void UserRectSet();
+
+ /**
+ * Is user rect set
+ */
+ TBool IsUserRectSet();
protected: // Data
@@ -186,6 +196,11 @@
* Draw rect set from java.
*/
TRect iUserRect;
+
+ /**
+ * Is User Rect Set?
+ */
+ TBool iUserRectSet;
/**
* Not owned, obtained from lcdui components.
--- a/javauis/mmapi_akn/baseline/inc/cmmaplayer.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/inc/cmmaplayer.h Tue Sep 14 21:06:50 2010 +0300
@@ -54,7 +54,7 @@
*/
class CMMAPlayer : public CBase,
- public MMMASourceStreamListener, MMMACallStateObserver
+ public MMMASourceStreamListener, public MMMACallStateObserver
{
public:
@@ -219,8 +219,7 @@
HBufC* ContentType() const;
public: // from MMMACallStateObserver
-
- void HandleCallStateEventL(TUid aUid, TInt aKey);
+ IMPORT_C void HandleCallStateEventL(TUid aUid, TInt aKey);
public: // new methods
/**
@@ -457,7 +456,7 @@
*/
CMMADurationUpdater* iDurationUpdater;
- /**
+ /**
* Used to get the callback for Call State Events.
*/
CMMACallStateMonitor* iStateObserver;
--- a/javauis/mmapi_akn/baseline/inc/mmmacallstateobserver.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/inc/mmmacallstateobserver.h Tue Sep 14 21:06:50 2010 +0300
@@ -28,6 +28,8 @@
{
public:
+ virtual ~MMMACallStateObserver() {};
+
/**
* Handle Call state event
*
--- a/javauis/mmapi_akn/baseline/inc/mmmadisplaywindow.h Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/inc/mmmadisplaywindow.h Tue Sep 14 21:06:50 2010 +0300
@@ -163,6 +163,15 @@
{
// Empty
}
+ virtual TInt PlayerState()
+ {
+ return -1;
+ }
+
+ virtual TBool IsVideoPlayer()
+ {
+ return EFalse;
+ }
#endif
/**
--- a/javauis/mmapi_akn/baseline/javasrc.emc/com/nokia/microedition/media/ManagerImpl.java Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/javasrc.emc/com/nokia/microedition/media/ManagerImpl.java Tue Sep 14 21:06:50 2010 +0300
@@ -33,6 +33,7 @@
import com.nokia.microedition.media.tone.PlayToneImpl;
import com.nokia.microedition.volumekeys.ForegroundListener;
import com.nokia.mj.impl.rt.support.Finalizer;
+import com.nokia.mj.impl.utils.Logger;
/**
* ManagerImpl implements the functionality specified in
@@ -56,6 +57,7 @@
private final ProtocolFactory iProtocolFactory = new ProtocolFactory();
private final ForegroundListener iForegroundListener;
+ private boolean iClosed = false;
private Finalizer mFinalizer = new Finalizer()
{
public void finalizeImpl()
@@ -166,6 +168,17 @@
iPlugIns.addElement(aPlugIn);
}
+ private void checkClose() throws MediaException
+ {
+ if (iClosed)
+ {
+ MediaException me = new MediaException("MIDlet closed.");
+ Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,
+ "Trying to create player when MIDlet is destroyed ", me);
+ throw me;
+ }
+ }
+
private void doFinalize()
{
if (mFinalizer != null)
@@ -180,6 +193,7 @@
*/
synchronized final void registeredFinalize()
{
+ iClosed = true;
_dispose(sEventSourceHandle);
sEventSourceHandle = 0;
}
@@ -191,6 +205,7 @@
*/
synchronized final void release()
{
+ iClosed = true;
_release(sEventSourceHandle);
}
@@ -348,9 +363,10 @@
/**
* From PlugIn.
*/
- public InternalPlayer createPlayer(DataSource aSource)
+ public synchronized InternalPlayer createPlayer(DataSource aSource)
throws MediaException, IOException
{
+ checkClose();
InternalPlayer player = null;
if (aSource.getContentType() != null)
{
@@ -424,9 +440,10 @@
* @exception SecurityException Thrown if the caller does not
* have security permission to create the <code>Player</code>.
*/
- public Player createPlayer(String aLocator)
+ public synchronized Player createPlayer(String aLocator)
throws IOException, MediaException
{
+ checkClose();
if (aLocator == null)
{
throw new IllegalArgumentException("Locator is null.");
@@ -519,9 +536,10 @@
* @exception SecurityException Thrown if the caller does not
* have security permission to create the <code>Player</code>.
*/
- public Player createPlayer(InputStream aStream, String aType)
+ public synchronized Player createPlayer(InputStream aStream, String aType)
throws IOException, MediaException
{
+ checkClose();
if (aStream == null)
{
throw new IllegalArgumentException("InputStream is null.");
--- a/javauis/mmapi_akn/baseline/src.nga/cmmasurfacewindow.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/src.nga/cmmasurfacewindow.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -23,6 +23,9 @@
#include "cmmasurfacewindow.h"
#include "cmmaplayer.h"
+// Used for const. KMMAVideoPlayer
+#include "cmmavideoplayer.h"
+
// Used for iDisplay member
#include "mmmadisplay.h"
@@ -677,4 +680,15 @@
}
}
+TInt CMMASurfaceWindow::PlayerState()
+{
+ return iPlayer->State();
+}
+
+TBool CMMASurfaceWindow::IsVideoPlayer()
+{
+ return (iPlayer->Type()== KMMAVideoPlayer);
+}
+
+
// END OF FILE
--- a/javauis/mmapi_akn/baseline/src/cmmacanvasdisplay.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/src/cmmacanvasdisplay.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -57,6 +57,12 @@
aSourceSize.iHeight);
iSourceSize = aSourceSize;
+ // If user rect size was set or full screen was set then we need to take
+ // that into account then the actual source size
+ if(IsUserRectSet() || iFullScreen)
+ {
+ return;
+ }
TSize fullScreenSize(iCanvas->ContentSize());
TBool sourceIsBigger = (aSourceSize.iWidth > fullScreenSize.iWidth ||
--- a/javauis/mmapi_akn/baseline/src/cmmadisplay.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/src/cmmadisplay.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -21,6 +21,8 @@
#include "cmmadisplay.h"
#include "mmmadisplaywindow.h"
+// below include is added to get the enumerated player's state
+#include "cmmaplayer.h"
// Destructor (virtual by CBase)
CMMADisplay::~CMMADisplay()
@@ -31,12 +33,16 @@
// Remove clip rect if set
if (!iClipRect.IsEmpty())
{
- DEBUG("CMMADisplay::~CMMADisplay(): Removing clip rect");
+ DEBUG_INT2("CMMADisplay::~CMMADisplay(): Removing clip rect iTL = %d X %d",
+ iClipRect.iTl.iX,iClipRect.iTl.iY);
+ DEBUG_INT2("CMMADisplay::~CMMADisplay(): Removing clip rect iBr = %d X %d",
+ iClipRect.iBr.iX,iClipRect.iBr.iY);
iDirectContainer->MdcRemoveContentBounds(iClipRect);
}
// Remove this object from MDirectContainer
iDirectContainer->MdcRemoveContent(this);
+ DEBUG("~CMMADisplay() is done");
}
}
@@ -45,6 +51,7 @@
iVisible(EFalse),
iFullScreen(EFalse),
iContainerVisible(EFalse),
+ iUserRectSet(EFalse),
iIsForeground(ETrue),
iResetDrawRect(EFalse)
{
@@ -138,7 +145,18 @@
{
return;
}
-
+
+#ifdef RD_JAVA_NGA_ENABLED
+
+ if(iWindow->IsVideoPlayer() && iWindow->PlayerState() < CMMAPlayer::EPrefetched)
+ {
+ // dont snatch window from UI too early. wait till its PREFETCHED or STARTED
+ // because UI could be showing some progressive indicator for playback start and that should continue
+ // at the last possible moment
+
+ return;
+ }
+#endif
TBool refreshScreen(EFalse);
// Remove first the current clip rect if set
if (!iClipRect.IsEmpty())
@@ -155,7 +173,10 @@
if (!iClipRect.IsEmpty())
{
- DEBUG("CMMADisplay::SetClippingRegion: Adding new rect");
+ DEBUG_INT2("CMMADisplay::SetClippingRegion: Adding new rect iTL = %d X %d",
+ iClipRect.iTl.iX,iClipRect.iTl.iY);
+ DEBUG_INT2("CMMADisplay::SetClippingRegion: Adding new rect iBr = %d X %d",
+ iClipRect.iBr.iX,iClipRect.iBr.iY);
// Add new clipping rect
iDirectContainer->MdcAddContentBounds(iClipRect);
refreshScreen = ETrue;
@@ -202,6 +223,17 @@
{
return;
}
+
+#ifdef RD_JAVA_NGA_ENABLED
+
+ if(iWindow->IsVideoPlayer() && iWindow->PlayerState() < CMMAPlayer::EPrefetched)
+ {
+ // dont snatch window from UI too early. wait till its PREFETCHED or STARTED
+ // because UI could be showing some progressive indicator for playback start and that should continue
+ // at the last possible moment
+ return;
+ }
+#endif
// If visible then set a new clip rect
if (iVisible)
{
@@ -209,7 +241,10 @@
if (!iClipRect.IsEmpty())
{
- DEBUG("CMMADisplay::AddClippingRegion: Adding new rect");
+ DEBUG_INT2("CMMADisplay::AddClippingRegion: Adding new rect iTL = %d X %d",
+ iClipRect.iTl.iX,iClipRect.iTl.iY);
+ DEBUG_INT2("CMMADisplay::AddClippingRegion: Adding new rect iBr = %d X %d",
+ iClipRect.iBr.iX,iClipRect.iBr.iY);
// Add new clipping rect
iDirectContainer->MdcAddContentBounds(iClipRect);
// refresh screen
@@ -237,7 +272,7 @@
{
// user rect contains size set from java.
iUserRect.SetSize(aSize);
-
+ UserRectSet();
// Size change has no effect if fullscreen mode is on.
// New size could be used when fullscreen is turned off.
if (iContainerVisible && !iFullScreen && iWindow)
@@ -252,6 +287,17 @@
}
}
+void CMMADisplay::UserRectSet()
+{
+ if(!IsUserRectSet())
+ iUserRectSet = ETrue;
+}
+
+TBool CMMADisplay::IsUserRectSet()
+{
+ return iUserRectSet;
+}
+
// from MMMADisplay
void CMMADisplay::SetVisible(TBool aValue)
{
--- a/javauis/mmapi_akn/baseline/src/cmmaitemdisplay.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/src/cmmaitemdisplay.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -124,7 +124,10 @@
#endif
iSourceSize = aSourceSize;
-
+ if(IsUserRectSet() || iFullScreen)
+ {
+ return;
+ }
if (iWindow)
{
TRect clientRect(iUserRect.iTl, aSourceSize);
--- a/javauis/mmapi_akn/baseline/src/cmmaplayer.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/src/cmmaplayer.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -462,8 +462,11 @@
}
-void CMMAPlayer::HandleCallStateEventL(TUid aUid, TInt aKey)
+EXPORT_C void CMMAPlayer::HandleCallStateEventL(TUid aUid, TInt aKey)
{
+ (void)aUid; // Suppress warnings about unused arguments in urel builds
+ (void)aKey;
+
DEBUG("CMMAPlayer::HandleCallStateEvent +");
DEBUG_INT2( "CMMAVideoUrlPlayer::HandleCallStateEvent(TUid aUid, TInt aKey) = (%d, %d)",aUid.iUid, aKey);
--- a/javauis/mmapi_akn/baseline/src/cmmavideourlplayerclipstreamdelegate.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/src/cmmavideourlplayerclipstreamdelegate.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -70,25 +70,28 @@
if ((aEvent.iEventType == KMMFEventCategoryVideoLoadingComplete) &&
(iPlayer.iState == ERealized))
{
- // Call pause only when doing prefetch.
- // Loading complete will come also when looping.
- if (err == KErrNone)
- {
- err = iPlayer.iController.Pause();
- }
-
- // VideoLoadingComplete-event only completes prefetch sequence
- // for non-live streams.
- iPlayer.CompletePrefetch(err);
- }
+ DEBUG("MMA:CMMAVideoUrlPlayer: Clip stream: HandleEvent KMMFEventCategoryVideoLoadingComplete player State = 200");
+
+ // Call pause only when doing prefetch.
+ // Loading complete will come also when looping.
+ if (err == KErrNone)
+ {
+ err = iPlayer.iController.Pause();
+ }
+
+ // VideoLoadingComplete-event only completes prefetch sequence
+ // for non-live streams.
+ iPlayer.CompletePrefetch(err);
+ iPlayer.PrepareDisplay();
+ }
else if (aEvent.iEventType == KMMFEventCategoryVideoPrepareComplete)
{
// going to prefetch state, after Play
// KMMFEventCategoryVideoLoadingComplete event will be received
-
+ DEBUG("MMA:CMMAVideoUrlPlayer: Clip stream: HandleEvent KMMFEventCategoryVideoPrepareComplete");
if (err == KErrNone)
{
- iPlayer.PrepareDisplay();
+ //iPlayer.PrepareDisplay();
// Buffering is done only for non-live streams.
err = iPlayer.iController.Play();
--- a/javauis/mmapi_akn/baseline/src/cmmavideourlplayerlivestreamdelegate.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/baseline/src/cmmavideourlplayerlivestreamdelegate.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -151,6 +151,9 @@
if (iActiveSchedulerWait->IsStarted())
{
DEBUG("MMA:CMMAVideoUrlPlayer: Live stream: KMMFEventCategoryVideoLoadingComplete ASW Stop");
+ // calling PrepareDisplay() in the nick of time as this takes over the control of window and
+ // any UI widget can't be drawn after this call at the prescribed area for video display.
+ iPlayer.PrepareDisplay();
iActiveSchedulerWait->AsyncStop();
}
if (err != KErrNone)
@@ -166,10 +169,7 @@
// going to prefetch state, after Play
// KMMFEventCategoryVideoLoadingComplete event will be received
- if (err == KErrNone)
- {
- iPlayer.PrepareDisplay();
- }
+
// For live streams: complete prefetch.
// if activeschedulerwait is started, then
--- a/javauis/mmapi_akn/build/bwins/javamobilemedia_5_0u.def Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/build/bwins/javamobilemedia_5_0u.def Tue Sep 14 21:06:50 2010 +0300
@@ -75,4 +75,5 @@
?RefreshControl@CMMAVolumeControl@@UAEXXZ @ 74 NONAME ; void CMMAVolumeControl::RefreshControl(void)
?RefreshVolume@CMMAVolumeControl@@AAEXXZ @ 75 NONAME ; void CMMAVolumeControl::RefreshVolume(void)
?StateChanged@CMMAVolumeControl@@UAEXH@Z @ 76 NONAME ; void CMMAVolumeControl::StateChanged(int)
+ ?HandleCallStateEventL@CMMAPlayer@@UAEXVTUid@@H@Z @ 77 NONAME ; void CMMAPlayer::HandleCallStateEventL(class TUid, int)
--- a/javauis/mmapi_akn/build/bwins/javamobilemediau.def Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/build/bwins/javamobilemediau.def Tue Sep 14 21:06:50 2010 +0300
@@ -13,88 +13,89 @@
?SnapshotEncoded@CMMAVideoPlayer@@UAEPAVHBufC8@@XZ @ 12 NONAME ; class HBufC8 * CMMAVideoPlayer::SnapshotEncoded(void)
?DoOpen@CMMAMMFPlayerBase@@MAEHVTUid@@ABVTDesC8@@01VTMMFPrioritySettings@@@Z @ 13 NONAME ; int CMMAMMFPlayerBase::DoOpen(class TUid, class TDesC8 const &, class TUid, class TDesC8 const &, class TMMFPrioritySettings)
?StaticControl@CMMAPlayer@@SAPAVCMMAControl@@PAV1@H@Z @ 14 NONAME ; class CMMAControl * CMMAPlayer::StaticControl(class CMMAPlayer *, int)
- ?ChangeState@CMMAPlayer@@IAEXW4TPlayerState@1@@Z @ 15 NONAME ; void CMMAPlayer::ChangeState(enum CMMAPlayer::TPlayerState)
- ?Type@CMMAVideoPlayer@@MAEABVTDesC16@@XZ @ 16 NONAME ; class TDesC16 const & CMMAVideoPlayer::Type(void)
- ??0CMMAEMCAudioVolumeControl@@IAE@AAVCMMAEMCAudioPlayer@@@Z @ 17 NONAME ; CMMAEMCAudioVolumeControl::CMMAEMCAudioVolumeControl(class CMMAEMCAudioPlayer &)
- ??0CMMAPlayer@@IAE@XZ @ 18 NONAME ; CMMAPlayer::CMMAPlayer(void)
- ?SetChangedSurfaceParameters@CMMASurfaceWindow@@QAEXABVTSurfaceId@@ABVTRect@@ABVTVideoAspectRatio@@@Z @ 19 NONAME ; void CMMASurfaceWindow::SetChangedSurfaceParameters(class TSurfaceId const &, class TRect const &, class TVideoAspectRatio const &)
- ?PublicClassName@CMMAControl@@UBEABVTDesC16@@XZ @ 20 NONAME ; class TDesC16 const & CMMAControl::PublicClassName(void) const
- ?Controller@CMMAMMFPlayerBase@@QAEAAVRMMFController@@XZ @ 21 NONAME ; class RMMFController & CMMAMMFPlayerBase::Controller(void)
- ?PrefetchDataL@CMMAAudioPlayer@@MAEXABVTDesC8@@@Z @ 22 NONAME ; void CMMAAudioPlayer::PrefetchDataL(class TDesC8 const &)
- ?CloseL@CMMAVideoUrlPlayer@@UAEXXZ @ 23 NONAME ; void CMMAVideoUrlPlayer::CloseL(void)
- ??0CMMAVideoUrlPlayer@@IAE@PAVCMMAMMFResolver@@@Z @ 24 NONAME ; CMMAVideoUrlPlayer::CMMAVideoUrlPlayer(class CMMAMMFResolver *)
- ?SnapshotBitmap@CMMAVideoPlayer@@UAEPAVCFbsBitmap@@XZ @ 25 NONAME ; class CFbsBitmap * CMMAVideoPlayer::SnapshotBitmap(void)
- ?HandleResourceChangeL@CMMAVideoControl@@UAEXH@Z @ 26 NONAME ; void CMMAVideoControl::HandleResourceChangeL(int)
- ?SetDisplay@CMMASurfaceWindow@@QAEXPAVMMMADisplay@@@Z @ 27 NONAME ; void CMMASurfaceWindow::SetDisplay(class MMMADisplay *)
- ?SetAudioOutputPreferenceL@CMMAVolumeControl@@QAEXH@Z @ 28 NONAME ; void CMMAVolumeControl::SetAudioOutputPreferenceL(int)
- ?ReadCompletedL@CMMAEMCAudioPlayer@@UAEXHABVTDesC8@@@Z @ 29 NONAME ; void CMMAEMCAudioPlayer::ReadCompletedL(int, class TDesC8 const &)
- ?NewL@CMMAEMCAudioVolumeControl@@SAPAV1@AAVCMMAEMCAudioPlayer@@@Z @ 30 NONAME ; class CMMAEMCAudioVolumeControl * CMMAEMCAudioVolumeControl::NewL(class CMMAEMCAudioPlayer &)
- ?HandleForegroundL@CMMAVideoControl@@UAEXH@Z @ 31 NONAME ; void CMMAVideoControl::HandleForegroundL(int)
- ?HandleEvent@CMMAVideoUrlPlayer@@MAEXABVTMMFEvent@@@Z @ 32 NONAME ; void CMMAVideoUrlPlayer::HandleEvent(class TMMFEvent const &)
- ?ConstructL@CMMAVideoUrlPlayer@@IAEXABVTDesC16@@@Z @ 33 NONAME ; void CMMAVideoUrlPlayer::ConstructL(class TDesC16 const &)
- ?SetDisplayL@CMMAVideoPlayer@@UAEXPAVMMMADisplay@@@Z @ 34 NONAME ; void CMMAVideoPlayer::SetDisplayL(class MMMADisplay *)
- ?TakeSnapshotL@CMMAVideoPlayer@@UAE?AW4TEncoding@MMMASnapshot@@PAVTRequestStatus@@ABVTSize@@ABVCMMAImageSettings@@@Z @ 35 NONAME ; enum MMMASnapshot::TEncoding CMMAVideoPlayer::TakeSnapshotL(class TRequestStatus *, class TSize const &, class CMMAImageSettings const &)
- ?SnapshotReady@CMMAVideoControl@@UAEXXZ @ 36 NONAME ; void CMMAVideoControl::SnapshotReady(void)
- ?CreatePlayerL@CMMAMMFPlayerFactory@@MAEPAVCMMAPlayer@@PAVCMMFFormatSelectionParameters@@PBVTDesC16@@@Z @ 37 NONAME ; class CMMAPlayer * CMMAMMFPlayerFactory::CreatePlayerL(class CMMFFormatSelectionParameters *, class TDesC16 const *)
- ?PlayCompleteL@CMMAEMCAudioPlayer@@MAEXH@Z @ 38 NONAME ; void CMMAEMCAudioPlayer::PlayCompleteL(int)
- ?NewL@CMMAAudioVolumeControl@@SAPAV1@PAVCMMAAudioPlayer@@@Z @ 39 NONAME ; class CMMAAudioVolumeControl * CMMAAudioVolumeControl::NewL(class CMMAAudioPlayer *)
- ?PrefetchDataL@CMMAEMCAudioPlayer@@MAEXABVTDesC8@@@Z @ 40 NONAME ; void CMMAEMCAudioPlayer::PrefetchDataL(class TDesC8 const &)
- ?HandlePlaybackCompleteL@CMMAAudioPlayer@@UAEXXZ @ 41 NONAME ; void CMMAAudioPlayer::HandlePlaybackCompleteL(void)
- ?RemoveStateListener@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 42 NONAME ; void CMMAPlayer::RemoveStateListener(class MMMAPlayerStateListener *)
- ??0CMMAEMCAudioPlayer@@IAE@PAVCMMAEMCResolver@@@Z @ 43 NONAME ; CMMAEMCAudioPlayer::CMMAEMCAudioPlayer(class CMMAEMCResolver *)
- ?Players@CMMAEventSource@@QAEAAV?$RPointerArray@VCMMAPlayer@@@@XZ @ 44 NONAME ; class RPointerArray<class CMMAPlayer> & CMMAEventSource::Players(void)
- ?GetDuration@CMMAPlayer@@UAEXPA_J@Z @ 45 NONAME ; void CMMAPlayer::GetDuration(long long *)
- ?MidiClient@CMMAMIDIPlayer@@QBEPAVCMidiClientUtility@@XZ @ 46 NONAME ; class CMidiClientUtility * CMMAMIDIPlayer::MidiClient(void) const
- ??1CMMAVideoUrlPlayer@@UAE@XZ @ 47 NONAME ; CMMAVideoUrlPlayer::~CMMAVideoUrlPlayer(void)
- ?ErrorPlaybackComplete@CMMAAudioPlayer@@UAEXH@Z @ 48 NONAME ; void CMMAAudioPlayer::ErrorPlaybackComplete(int)
- ??1CMMAEMCAudioPlayer@@UAE@XZ @ 49 NONAME ; CMMAEMCAudioPlayer::~CMMAEMCAudioPlayer(void)
- ?MMFactory@CMMAEMCPlayerBase@@QAEPAVCMultimediaFactory@multimedia@@XZ @ 50 NONAME ; class multimedia::CMultimediaFactory * CMMAEMCPlayerBase::MMFactory(void)
- ??1CMMAPlayer@@UAE@XZ @ 51 NONAME ; CMMAPlayer::~CMMAPlayer(void)
- ?PreparePluginSelectionParametersL@CMMAMMFPlayerFactory@@MAEXPAVCMMAMMFResolver@@PAVCMMFFormatSelectionParameters@@@Z @ 52 NONAME ; void CMMAMMFPlayerFactory::PreparePluginSelectionParametersL(class CMMAMMFResolver *, class CMMFFormatSelectionParameters *)
- ?PostActionCompleted@CMMAPlayer@@QAEXH@Z @ 53 NONAME ; void CMMAPlayer::PostActionCompleted(int)
- ?RealizeL@CMMAVideoUrlPlayer@@UAEXXZ @ 54 NONAME ; void CMMAVideoUrlPlayer::RealizeL(void)
- ?SetPlayerListenerObjectL@CMMAVideoPlayer@@UAEXPAV_jobject@@PAUJNIEnv_@@PAVMMMAEventPoster@@@Z @ 55 NONAME ; void CMMAVideoPlayer::SetPlayerListenerObjectL(class _jobject *, struct JNIEnv_ *, class MMMAEventPoster *)
- ?RealizeL@CMMAEMCAudioPlayer@@UAEXXZ @ 56 NONAME ; void CMMAEMCAudioPlayer::RealizeL(void)
- ?ControlCount@CMMAPlayer@@QAEHXZ @ 57 NONAME ; int CMMAPlayer::ControlCount(void)
- ?DoSetLevelL@CMMAEMCAudioVolumeControl@@UAEXH@Z @ 58 NONAME ; void CMMAEMCAudioVolumeControl::DoSetLevelL(int)
- ?NewL@CMMASurfaceWindow@@SAPAV1@PAVCMMAEventSource@@PAVCMMAPlayer@@H@Z @ 59 NONAME ; class CMMASurfaceWindow * CMMASurfaceWindow::NewL(class CMMAEventSource *, class CMMAPlayer *, int)
- ?PlayCompleteL@CMMAAudioPlayer@@MAEXH@Z @ 60 NONAME ; void CMMAAudioPlayer::PlayCompleteL(int)
- ?SourceSize@CMMAVideoPlayer@@UAE?AVTSize@@XZ @ 61 NONAME ; class TSize CMMAVideoPlayer::SourceSize(void)
- ?SnapshoterL@CMMAVideoPlayer@@UAEPAVMMMASnapshot@@XZ @ 62 NONAME ; class MMMASnapshot * CMMAVideoPlayer::SnapshoterL(void)
- ?GetDuration@CMMAMMFPlayerBase@@UAEXPA_J@Z @ 63 NONAME ; void CMMAMMFPlayerBase::GetDuration(long long *)
- ?RemoveSurface@CMMASurfaceWindow@@QAEXXZ @ 64 NONAME ; void CMMASurfaceWindow::RemoveSurface(void)
- ?AddPlayerFactoryL@CMMAManager@@QAEXPAVMMMAPlayerFactory@@@Z @ 65 NONAME ; void CMMAManager::AddPlayerFactoryL(class MMMAPlayerFactory *)
- ??0CMMAVideoControl@@QAE@PAVMMMAGuiPlayer@@@Z @ 66 NONAME ; CMMAVideoControl::CMMAVideoControl(class MMMAGuiPlayer *)
- ?ClassName@CMMAVideoControl@@UBEABVTDesC16@@XZ @ 67 NONAME ; class TDesC16 const & CMMAVideoControl::ClassName(void) const
- ?SetSurfaceParameters@CMMASurfaceWindow@@QAEXABVTSurfaceId@@ABVTRect@@ABVTVideoAspectRatio@@@Z @ 68 NONAME ; void CMMASurfaceWindow::SetSurfaceParameters(class TSurfaceId const &, class TRect const &, class TVideoAspectRatio const &)
- ??1CMMAMMFPlayerFactory@@UAE@XZ @ 69 NONAME ; CMMAMMFPlayerFactory::~CMMAMMFPlayerFactory(void)
- ?SetVolumeLevelL@CMMAVolumeControl@@QAEXHH@Z @ 70 NONAME ; void CMMAVolumeControl::SetVolumeLevelL(int, int)
- ?DoGetLevelL@CMMAEMCAudioVolumeControl@@UAEHXZ @ 71 NONAME ; int CMMAEMCAudioVolumeControl::DoGetLevelL(void)
- ?ReadCompletedL@CMMAVideoPlayer@@MAEXHABVTDesC8@@@Z @ 72 NONAME ; void CMMAVideoPlayer::ReadCompletedL(int, class TDesC8 const &)
- ?Type@CMMAEMCAudioPlayer@@UAEABVTDesC16@@XZ @ 73 NONAME ; class TDesC16 const & CMMAEMCAudioPlayer::Type(void)
- ?DeallocateL@CMMAVideoUrlPlayer@@UAEXXZ @ 74 NONAME ; void CMMAVideoUrlPlayer::DeallocateL(void)
- ?GetMediaTime@CMMAVideoUrlPlayer@@UAEXPA_J@Z @ 75 NONAME ; void CMMAVideoUrlPlayer::GetMediaTime(long long *)
- ??0CMMAMMFPlayerFactory@@QAE@XZ @ 76 NONAME ; CMMAMMFPlayerFactory::CMMAMMFPlayerFactory(void)
- ?AddStateListenerL@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 77 NONAME ; void CMMAPlayer::AddStateListenerL(class MMMAPlayerStateListener *)
- ?StreamControl@CMMAEMCPlayerBase@@QAEPAVMStreamControl@multimedia@@XZ @ 78 NONAME ; class multimedia::MStreamControl * CMMAEMCPlayerBase::StreamControl(void)
- ?PrefetchFileL@CMMAAudioPlayer@@MAEXXZ @ 79 NONAME ; void CMMAAudioPlayer::PrefetchFileL(void)
- ?PrefetchL@CMMAVideoUrlPlayer@@UAEXXZ @ 80 NONAME ; void CMMAVideoUrlPlayer::PrefetchL(void)
- ?ConstructL@CMMAEMCAudioPlayer@@IAEXXZ @ 81 NONAME ; void CMMAEMCAudioPlayer::ConstructL(void)
- ?AddLevelL@CMMAVolumeControl@@QAEHXZ @ 82 NONAME ; int CMMAVolumeControl::AddLevelL(void)
- ?StartL@CMMAVideoUrlPlayer@@UAEXH@Z @ 83 NONAME ; void CMMAVideoUrlPlayer::StartL(int)
- ?Control@CMMAPlayer@@QAEPAVCMMAControl@@H@Z @ 84 NONAME ; class CMMAControl * CMMAPlayer::Control(int)
- ?PrefetchL@CMMAEMCAudioPlayer@@UAEXXZ @ 85 NONAME ; void CMMAEMCAudioPlayer::PrefetchL(void)
- ?StopL@CMMAVideoUrlPlayer@@UAEXH@Z @ 86 NONAME ; void CMMAVideoUrlPlayer::StopL(int)
- ??1CMMAVideoControl@@UAE@XZ @ 87 NONAME ; CMMAVideoControl::~CMMAVideoControl(void)
- ?HandleSwitchOnL@CMMAVideoControl@@UAEXH@Z @ 88 NONAME ; void CMMAVideoControl::HandleSwitchOnL(int)
- ?StateChanged@CMMAVolumeControl@@UAEXH@Z @ 89 NONAME ; void CMMAVolumeControl::StateChanged(int)
- ?CloseL@CMMAPlayer@@UAEXXZ @ 90 NONAME ; void CMMAPlayer::CloseL(void)
- ?RefreshControl@CMMAVolumeControl@@UAEXXZ @ 91 NONAME ; void CMMAVolumeControl::RefreshControl(void)
- ?SetAVCableConnStatus@CMMASurfaceWindow@@QAEXH@Z @ 92 NONAME ; void CMMASurfaceWindow::SetAVCableConnStatus(int)
- ?RefreshVolume@CMMAVolumeControl@@AAEXXZ @ 93 NONAME ; void CMMAVolumeControl::RefreshVolume(void)
- ?HandleActiveProfileEventL@CMMAVolumeControl@@UAEXW4TProfileEvent@@H@Z @ 94 NONAME ; void CMMAVolumeControl::HandleActiveProfileEventL(enum TProfileEvent, int)
- ??1CMMAVolumeControl@@UAE@XZ @ 95 NONAME ; CMMAVolumeControl::~CMMAVolumeControl(void)
- ??0CMMAVolumeControl@@IAE@PAVCMMAPlayer@@@Z @ 96 NONAME ; CMMAVolumeControl::CMMAVolumeControl(class CMMAPlayer *)
- ?ConstructBaseL@CMMAVolumeControl@@IAEXXZ @ 97 NONAME ; void CMMAVolumeControl::ConstructBaseL(void)
- ?ClassName@CMMAVolumeControl@@UBEABVTDesC16@@XZ @ 98 NONAME ; class TDesC16 const & CMMAVolumeControl::ClassName(void) const
+ ?StateChanged@CMMAVolumeControl@@UAEXH@Z @ 15 NONAME ; void CMMAVolumeControl::StateChanged(int)
+ ?ChangeState@CMMAPlayer@@IAEXW4TPlayerState@1@@Z @ 16 NONAME ; void CMMAPlayer::ChangeState(enum CMMAPlayer::TPlayerState)
+ ?Type@CMMAVideoPlayer@@MAEABVTDesC16@@XZ @ 17 NONAME ; class TDesC16 const & CMMAVideoPlayer::Type(void)
+ ??0CMMAEMCAudioVolumeControl@@IAE@AAVCMMAEMCAudioPlayer@@@Z @ 18 NONAME ; CMMAEMCAudioVolumeControl::CMMAEMCAudioVolumeControl(class CMMAEMCAudioPlayer &)
+ ?CloseL@CMMAPlayer@@UAEXXZ @ 19 NONAME ; void CMMAPlayer::CloseL(void)
+ ??0CMMAPlayer@@IAE@XZ @ 20 NONAME ; CMMAPlayer::CMMAPlayer(void)
+ ?SetChangedSurfaceParameters@CMMASurfaceWindow@@QAEXABVTSurfaceId@@ABVTRect@@ABVTVideoAspectRatio@@@Z @ 21 NONAME ; void CMMASurfaceWindow::SetChangedSurfaceParameters(class TSurfaceId const &, class TRect const &, class TVideoAspectRatio const &)
+ ?PublicClassName@CMMAControl@@UBEABVTDesC16@@XZ @ 22 NONAME ; class TDesC16 const & CMMAControl::PublicClassName(void) const
+ ?Controller@CMMAMMFPlayerBase@@QAEAAVRMMFController@@XZ @ 23 NONAME ; class RMMFController & CMMAMMFPlayerBase::Controller(void)
+ ?PrefetchDataL@CMMAAudioPlayer@@MAEXABVTDesC8@@@Z @ 24 NONAME ; void CMMAAudioPlayer::PrefetchDataL(class TDesC8 const &)
+ ?RefreshControl@CMMAVolumeControl@@UAEXXZ @ 25 NONAME ; void CMMAVolumeControl::RefreshControl(void)
+ ?CloseL@CMMAVideoUrlPlayer@@UAEXXZ @ 26 NONAME ; void CMMAVideoUrlPlayer::CloseL(void)
+ ??0CMMAVideoUrlPlayer@@IAE@PAVCMMAMMFResolver@@@Z @ 27 NONAME ; CMMAVideoUrlPlayer::CMMAVideoUrlPlayer(class CMMAMMFResolver *)
+ ?SnapshotBitmap@CMMAVideoPlayer@@UAEPAVCFbsBitmap@@XZ @ 28 NONAME ; class CFbsBitmap * CMMAVideoPlayer::SnapshotBitmap(void)
+ ?HandleResourceChangeL@CMMAVideoControl@@UAEXH@Z @ 29 NONAME ; void CMMAVideoControl::HandleResourceChangeL(int)
+ ?SetDisplay@CMMASurfaceWindow@@QAEXPAVMMMADisplay@@@Z @ 30 NONAME ; void CMMASurfaceWindow::SetDisplay(class MMMADisplay *)
+ ?ReadCompletedL@CMMAEMCAudioPlayer@@UAEXHABVTDesC8@@@Z @ 31 NONAME ; void CMMAEMCAudioPlayer::ReadCompletedL(int, class TDesC8 const &)
+ ?NewL@CMMAEMCAudioVolumeControl@@SAPAV1@AAVCMMAEMCAudioPlayer@@@Z @ 32 NONAME ; class CMMAEMCAudioVolumeControl * CMMAEMCAudioVolumeControl::NewL(class CMMAEMCAudioPlayer &)
+ ?SetAVCableConnStatus@CMMASurfaceWindow@@QAEXH@Z @ 33 NONAME ; void CMMASurfaceWindow::SetAVCableConnStatus(int)
+ ?HandleForegroundL@CMMAVideoControl@@UAEXH@Z @ 34 NONAME ; void CMMAVideoControl::HandleForegroundL(int)
+ ?HandleEvent@CMMAVideoUrlPlayer@@MAEXABVTMMFEvent@@@Z @ 35 NONAME ; void CMMAVideoUrlPlayer::HandleEvent(class TMMFEvent const &)
+ ?ConstructL@CMMAVideoUrlPlayer@@IAEXABVTDesC16@@@Z @ 36 NONAME ; void CMMAVideoUrlPlayer::ConstructL(class TDesC16 const &)
+ ?SetDisplayL@CMMAVideoPlayer@@UAEXPAVMMMADisplay@@@Z @ 37 NONAME ; void CMMAVideoPlayer::SetDisplayL(class MMMADisplay *)
+ ?TakeSnapshotL@CMMAVideoPlayer@@UAE?AW4TEncoding@MMMASnapshot@@PAVTRequestStatus@@ABVTSize@@ABVCMMAImageSettings@@@Z @ 38 NONAME ; enum MMMASnapshot::TEncoding CMMAVideoPlayer::TakeSnapshotL(class TRequestStatus *, class TSize const &, class CMMAImageSettings const &)
+ ?SnapshotReady@CMMAVideoControl@@UAEXXZ @ 39 NONAME ; void CMMAVideoControl::SnapshotReady(void)
+ ?CreatePlayerL@CMMAMMFPlayerFactory@@MAEPAVCMMAPlayer@@PAVCMMFFormatSelectionParameters@@PBVTDesC16@@@Z @ 40 NONAME ; class CMMAPlayer * CMMAMMFPlayerFactory::CreatePlayerL(class CMMFFormatSelectionParameters *, class TDesC16 const *)
+ ?PlayCompleteL@CMMAEMCAudioPlayer@@MAEXH@Z @ 41 NONAME ; void CMMAEMCAudioPlayer::PlayCompleteL(int)
+ ?NewL@CMMAAudioVolumeControl@@SAPAV1@PAVCMMAAudioPlayer@@@Z @ 42 NONAME ; class CMMAAudioVolumeControl * CMMAAudioVolumeControl::NewL(class CMMAAudioPlayer *)
+ ?RefreshVolume@CMMAVolumeControl@@AAEXXZ @ 43 NONAME ; void CMMAVolumeControl::RefreshVolume(void)
+ ?PrefetchDataL@CMMAEMCAudioPlayer@@MAEXABVTDesC8@@@Z @ 44 NONAME ; void CMMAEMCAudioPlayer::PrefetchDataL(class TDesC8 const &)
+ ?RemoveStateListener@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 45 NONAME ; void CMMAPlayer::RemoveStateListener(class MMMAPlayerStateListener *)
+ ?HandlePlaybackCompleteL@CMMAAudioPlayer@@UAEXXZ @ 46 NONAME ; void CMMAAudioPlayer::HandlePlaybackCompleteL(void)
+ ??0CMMAEMCAudioPlayer@@IAE@PAVCMMAEMCResolver@@@Z @ 47 NONAME ; CMMAEMCAudioPlayer::CMMAEMCAudioPlayer(class CMMAEMCResolver *)
+ ?Players@CMMAEventSource@@QAEAAV?$RPointerArray@VCMMAPlayer@@@@XZ @ 48 NONAME ; class RPointerArray<class CMMAPlayer> & CMMAEventSource::Players(void)
+ ?GetDuration@CMMAPlayer@@UAEXPA_J@Z @ 49 NONAME ; void CMMAPlayer::GetDuration(long long *)
+ ?MidiClient@CMMAMIDIPlayer@@QBEPAVCMidiClientUtility@@XZ @ 50 NONAME ; class CMidiClientUtility * CMMAMIDIPlayer::MidiClient(void) const
+ ??1CMMAVideoUrlPlayer@@UAE@XZ @ 51 NONAME ; CMMAVideoUrlPlayer::~CMMAVideoUrlPlayer(void)
+ ?ErrorPlaybackComplete@CMMAAudioPlayer@@UAEXH@Z @ 52 NONAME ; void CMMAAudioPlayer::ErrorPlaybackComplete(int)
+ ?HandleCallStateEventL@CMMAPlayer@@UAEXVTUid@@H@Z @ 53 NONAME ; void CMMAPlayer::HandleCallStateEventL(class TUid, int)
+ ??1CMMAEMCAudioPlayer@@UAE@XZ @ 54 NONAME ; CMMAEMCAudioPlayer::~CMMAEMCAudioPlayer(void)
+ ?SetAudioOutputPreferenceL@CMMAVolumeControl@@QAEXH@Z @ 55 NONAME ; void CMMAVolumeControl::SetAudioOutputPreferenceL(int)
+ ?MMFactory@CMMAEMCPlayerBase@@QAEPAVCMultimediaFactory@multimedia@@XZ @ 56 NONAME ; class multimedia::CMultimediaFactory * CMMAEMCPlayerBase::MMFactory(void)
+ ??1CMMAPlayer@@UAE@XZ @ 57 NONAME ; CMMAPlayer::~CMMAPlayer(void)
+ ?HandleActiveProfileEventL@CMMAVolumeControl@@UAEXW4TProfileEvent@@H@Z @ 58 NONAME ; void CMMAVolumeControl::HandleActiveProfileEventL(enum TProfileEvent, int)
+ ?PreparePluginSelectionParametersL@CMMAMMFPlayerFactory@@MAEXPAVCMMAMMFResolver@@PAVCMMFFormatSelectionParameters@@@Z @ 59 NONAME ; void CMMAMMFPlayerFactory::PreparePluginSelectionParametersL(class CMMAMMFResolver *, class CMMFFormatSelectionParameters *)
+ ?PostActionCompleted@CMMAPlayer@@QAEXH@Z @ 60 NONAME ; void CMMAPlayer::PostActionCompleted(int)
+ ?RealizeL@CMMAVideoUrlPlayer@@UAEXXZ @ 61 NONAME ; void CMMAVideoUrlPlayer::RealizeL(void)
+ ?SetPlayerListenerObjectL@CMMAVideoPlayer@@UAEXPAV_jobject@@PAUJNIEnv_@@PAVMMMAEventPoster@@@Z @ 62 NONAME ; void CMMAVideoPlayer::SetPlayerListenerObjectL(class _jobject *, struct JNIEnv_ *, class MMMAEventPoster *)
+ ?RealizeL@CMMAEMCAudioPlayer@@UAEXXZ @ 63 NONAME ; void CMMAEMCAudioPlayer::RealizeL(void)
+ ?ControlCount@CMMAPlayer@@QAEHXZ @ 64 NONAME ; int CMMAPlayer::ControlCount(void)
+ ?DoSetLevelL@CMMAEMCAudioVolumeControl@@UAEXH@Z @ 65 NONAME ; void CMMAEMCAudioVolumeControl::DoSetLevelL(int)
+ ?NewL@CMMASurfaceWindow@@SAPAV1@PAVCMMAEventSource@@PAVCMMAPlayer@@H@Z @ 66 NONAME ; class CMMASurfaceWindow * CMMASurfaceWindow::NewL(class CMMAEventSource *, class CMMAPlayer *, int)
+ ?PlayCompleteL@CMMAAudioPlayer@@MAEXH@Z @ 67 NONAME ; void CMMAAudioPlayer::PlayCompleteL(int)
+ ?SourceSize@CMMAVideoPlayer@@UAE?AVTSize@@XZ @ 68 NONAME ; class TSize CMMAVideoPlayer::SourceSize(void)
+ ?SnapshoterL@CMMAVideoPlayer@@UAEPAVMMMASnapshot@@XZ @ 69 NONAME ; class MMMASnapshot * CMMAVideoPlayer::SnapshoterL(void)
+ ?GetDuration@CMMAMMFPlayerBase@@UAEXPA_J@Z @ 70 NONAME ; void CMMAMMFPlayerBase::GetDuration(long long *)
+ ?RemoveSurface@CMMASurfaceWindow@@QAEXXZ @ 71 NONAME ; void CMMASurfaceWindow::RemoveSurface(void)
+ ??1CMMAVolumeControl@@UAE@XZ @ 72 NONAME ; CMMAVolumeControl::~CMMAVolumeControl(void)
+ ??0CMMAVolumeControl@@IAE@PAVCMMAPlayer@@@Z @ 73 NONAME ; CMMAVolumeControl::CMMAVolumeControl(class CMMAPlayer *)
+ ?AddPlayerFactoryL@CMMAManager@@QAEXPAVMMMAPlayerFactory@@@Z @ 74 NONAME ; void CMMAManager::AddPlayerFactoryL(class MMMAPlayerFactory *)
+ ??0CMMAVideoControl@@QAE@PAVMMMAGuiPlayer@@@Z @ 75 NONAME ; CMMAVideoControl::CMMAVideoControl(class MMMAGuiPlayer *)
+ ?ClassName@CMMAVideoControl@@UBEABVTDesC16@@XZ @ 76 NONAME ; class TDesC16 const & CMMAVideoControl::ClassName(void) const
+ ?SetSurfaceParameters@CMMASurfaceWindow@@QAEXABVTSurfaceId@@ABVTRect@@ABVTVideoAspectRatio@@@Z @ 77 NONAME ; void CMMASurfaceWindow::SetSurfaceParameters(class TSurfaceId const &, class TRect const &, class TVideoAspectRatio const &)
+ ??1CMMAMMFPlayerFactory@@UAE@XZ @ 78 NONAME ; CMMAMMFPlayerFactory::~CMMAMMFPlayerFactory(void)
+ ?SetVolumeLevelL@CMMAVolumeControl@@QAEXHH@Z @ 79 NONAME ; void CMMAVolumeControl::SetVolumeLevelL(int, int)
+ ?ReadCompletedL@CMMAVideoPlayer@@MAEXHABVTDesC8@@@Z @ 80 NONAME ; void CMMAVideoPlayer::ReadCompletedL(int, class TDesC8 const &)
+ ?DoGetLevelL@CMMAEMCAudioVolumeControl@@UAEHXZ @ 81 NONAME ; int CMMAEMCAudioVolumeControl::DoGetLevelL(void)
+ ?Type@CMMAEMCAudioPlayer@@UAEABVTDesC16@@XZ @ 82 NONAME ; class TDesC16 const & CMMAEMCAudioPlayer::Type(void)
+ ?DeallocateL@CMMAVideoUrlPlayer@@UAEXXZ @ 83 NONAME ; void CMMAVideoUrlPlayer::DeallocateL(void)
+ ?GetMediaTime@CMMAVideoUrlPlayer@@UAEXPA_J@Z @ 84 NONAME ; void CMMAVideoUrlPlayer::GetMediaTime(long long *)
+ ?AddStateListenerL@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 85 NONAME ; void CMMAPlayer::AddStateListenerL(class MMMAPlayerStateListener *)
+ ??0CMMAMMFPlayerFactory@@QAE@XZ @ 86 NONAME ; CMMAMMFPlayerFactory::CMMAMMFPlayerFactory(void)
+ ?StreamControl@CMMAEMCPlayerBase@@QAEPAVMStreamControl@multimedia@@XZ @ 87 NONAME ; class multimedia::MStreamControl * CMMAEMCPlayerBase::StreamControl(void)
+ ?PrefetchFileL@CMMAAudioPlayer@@MAEXXZ @ 88 NONAME ; void CMMAAudioPlayer::PrefetchFileL(void)
+ ?PrefetchL@CMMAVideoUrlPlayer@@UAEXXZ @ 89 NONAME ; void CMMAVideoUrlPlayer::PrefetchL(void)
+ ?ConstructL@CMMAEMCAudioPlayer@@IAEXXZ @ 90 NONAME ; void CMMAEMCAudioPlayer::ConstructL(void)
+ ?AddLevelL@CMMAVolumeControl@@QAEHXZ @ 91 NONAME ; int CMMAVolumeControl::AddLevelL(void)
+ ?StartL@CMMAVideoUrlPlayer@@UAEXH@Z @ 92 NONAME ; void CMMAVideoUrlPlayer::StartL(int)
+ ?Control@CMMAPlayer@@QAEPAVCMMAControl@@H@Z @ 93 NONAME ; class CMMAControl * CMMAPlayer::Control(int)
+ ?PrefetchL@CMMAEMCAudioPlayer@@UAEXXZ @ 94 NONAME ; void CMMAEMCAudioPlayer::PrefetchL(void)
+ ?StopL@CMMAVideoUrlPlayer@@UAEXH@Z @ 95 NONAME ; void CMMAVideoUrlPlayer::StopL(int)
+ ?ConstructBaseL@CMMAVolumeControl@@IAEXXZ @ 96 NONAME ; void CMMAVolumeControl::ConstructBaseL(void)
+ ?ClassName@CMMAVolumeControl@@UBEABVTDesC16@@XZ @ 97 NONAME ; class TDesC16 const & CMMAVolumeControl::ClassName(void) const
+ ??1CMMAVideoControl@@UAE@XZ @ 98 NONAME ; CMMAVideoControl::~CMMAVideoControl(void)
+ ?HandleSwitchOnL@CMMAVideoControl@@UAEXH@Z @ 99 NONAME ; void CMMAVideoControl::HandleSwitchOnL(int)
--- a/javauis/mmapi_akn/build/eabi/javamobilemedia_5_0u.def Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/build/eabi/javamobilemedia_5_0u.def Tue Sep 14 21:06:50 2010 +0300
@@ -11,144 +11,150 @@
_ZN10CMMAPlayer17AddStateListenerLEP23MMMAPlayerStateListener @ 10 NONAME
_ZN10CMMAPlayer19PostActionCompletedEi @ 11 NONAME
_ZN10CMMAPlayer19RemoveStateListenerEP23MMMAPlayerStateListener @ 12 NONAME
- _ZN10CMMAPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 13 NONAME
- _ZN10CMMAPlayer6CloseLEv @ 14 NONAME
- _ZN10CMMAPlayer7ControlEi @ 15 NONAME
- _ZN10CMMAPlayerC2Ev @ 16 NONAME
- _ZN10CMMAPlayerD0Ev @ 17 NONAME
- _ZN10CMMAPlayerD1Ev @ 18 NONAME
- _ZN10CMMAPlayerD2Ev @ 19 NONAME
- _ZN11CMMAManager17AddPlayerFactoryLEP17MMMAPlayerFactory @ 20 NONAME
- _ZN15CMMAAudioPlayer13PlayCompleteLEi @ 21 NONAME
- _ZN15CMMAAudioPlayer13PrefetchDataLERK6TDesC8 @ 22 NONAME
- _ZN15CMMAAudioPlayer13PrefetchFileLEv @ 23 NONAME
- _ZN15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 24 NONAME
- _ZN15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 25 NONAME
- _ZN15CMMAEventSource25SetPlayerInstanceObserverEP26MMMAPlayerInstanceObserver @ 26 NONAME
- _ZN15CMMAEventSource26StaticAddObjectFromHandleLEPS_i @ 27 NONAME
- _ZN15CMMAEventSource7PlayersEv @ 28 NONAME
- _ZN15CMMAVideoPlayer10SourceSizeEv @ 29 NONAME
- _ZN15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 30 NONAME
- _ZN15CMMAVideoPlayer11SnapshoterLEv @ 31 NONAME
- _ZN15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 32 NONAME
- _ZN15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 33 NONAME
- _ZN15CMMAVideoPlayer14SnapshotBitmapEv @ 34 NONAME
- _ZN15CMMAVideoPlayer15SnapshotEncodedEv @ 35 NONAME
- _ZN15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 36 NONAME
- _ZN15CMMAVideoPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 37 NONAME
- _ZN15CMMAVideoPlayer4TypeEv @ 38 NONAME
- _ZN16CMMAVideoControl13SnapshotReadyEv @ 39 NONAME
- _ZN16CMMAVideoControl15HandleSwitchOnLEi @ 40 NONAME
- _ZN16CMMAVideoControl17HandleForegroundLEi @ 41 NONAME
- _ZN16CMMAVideoControl21HandleResourceChangeLEi @ 42 NONAME
- _ZN16CMMAVideoControlC1EP13MMMAGuiPlayer @ 43 NONAME
- _ZN16CMMAVideoControlC2EP13MMMAGuiPlayer @ 44 NONAME
- _ZN16CMMAVideoControlD0Ev @ 45 NONAME
- _ZN16CMMAVideoControlD1Ev @ 46 NONAME
- _ZN16CMMAVideoControlD2Ev @ 47 NONAME
- _ZN17CMMAMMFPlayerBase10ControllerEv @ 48 NONAME
- _ZN17CMMAMMFPlayerBase11GetDurationEPx @ 49 NONAME
- _ZN17CMMAMMFPlayerBase6DoOpenE4TUidRK6TDesC8S0_S3_20TMMFPrioritySettings @ 50 NONAME
- _ZN17CMMAVolumeControl12StateChangedEi @ 51 NONAME
- _ZN17CMMAVolumeControl13RefreshVolumeEv @ 52 NONAME
- _ZN17CMMAVolumeControl14ConstructBaseLEv @ 53 NONAME
- _ZN17CMMAVolumeControl14RefreshControlEv @ 54 NONAME
- _ZN17CMMAVolumeControl15SetVolumeLevelLEii @ 55 NONAME
- _ZN17CMMAVolumeControl25HandleActiveProfileEventLE13TProfileEventi @ 56 NONAME
- _ZN17CMMAVolumeControl25SetAudioOutputPreferenceLEi @ 57 NONAME
- _ZN17CMMAVolumeControl9AddLevelLEv @ 58 NONAME
- _ZN17CMMAVolumeControlC2EP10CMMAPlayer @ 59 NONAME
- _ZN17CMMAVolumeControlD0Ev @ 60 NONAME
- _ZN17CMMAVolumeControlD1Ev @ 61 NONAME
- _ZN17CMMAVolumeControlD2Ev @ 62 NONAME
- _ZN18CMMAVideoUrlPlayer10ConstructLERK7TDesC16 @ 63 NONAME
- _ZN18CMMAVideoUrlPlayer11DeallocateLEv @ 64 NONAME
- _ZN18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 65 NONAME
- _ZN18CMMAVideoUrlPlayer12GetMediaTimeEPx @ 66 NONAME
- _ZN18CMMAVideoUrlPlayer5StopLEi @ 67 NONAME
- _ZN18CMMAVideoUrlPlayer6CloseLEv @ 68 NONAME
- _ZN18CMMAVideoUrlPlayer6StartLEi @ 69 NONAME
- _ZN18CMMAVideoUrlPlayer8RealizeLEv @ 70 NONAME
- _ZN18CMMAVideoUrlPlayer9PrefetchLEv @ 71 NONAME
- _ZN18CMMAVideoUrlPlayerC1EP15CMMAMMFResolver @ 72 NONAME
- _ZN18CMMAVideoUrlPlayerC2EP15CMMAMMFResolver @ 73 NONAME
- _ZN18CMMAVideoUrlPlayerD0Ev @ 74 NONAME
- _ZN18CMMAVideoUrlPlayerD1Ev @ 75 NONAME
- _ZN18CMMAVideoUrlPlayerD2Ev @ 76 NONAME
- _ZN20CMMAMMFPlayerFactory13CreatePlayerLEP29CMMFFormatSelectionParametersPK7TDesC16 @ 77 NONAME
- _ZN20CMMAMMFPlayerFactory33PreparePluginSelectionParametersLEP15CMMAMMFResolverP29CMMFFormatSelectionParameters @ 78 NONAME
- _ZN20CMMAMMFPlayerFactoryC2Ev @ 79 NONAME
- _ZN20CMMAMMFPlayerFactoryD0Ev @ 80 NONAME
- _ZN20CMMAMMFPlayerFactoryD1Ev @ 81 NONAME
- _ZN20CMMAMMFPlayerFactoryD2Ev @ 82 NONAME
- _ZN22CMMAAudioVolumeControl4NewLEP15CMMAAudioPlayer @ 83 NONAME
- _ZNK11CMMAControl15PublicClassNameEv @ 84 NONAME
- _ZNK14CMMAMIDIPlayer10MidiClientEv @ 85 NONAME
- _ZNK16CMMAVideoControl9ClassNameEv @ 86 NONAME
- _ZNK17CMMAVolumeControl9ClassNameEv @ 87 NONAME
- _ZTI10CMMAPlayer @ 88 NONAME ; #<TI>#
- _ZTI11CMMAControl @ 89 NONAME ; #<TI>#
- _ZTI14CMMAMIDIPlayer @ 90 NONAME ; #<TI>#
- _ZTI15CMMAEventSource @ 91 NONAME ; #<TI>#
- _ZTI16CMMAVideoControl @ 92 NONAME ; #<TI>#
- _ZTI17CMMAMMFPlayerBase @ 93 NONAME ; #<TI>#
- _ZTI17CMMAStreamRequest @ 94 NONAME ; #<TI>#
- _ZTI17CMMAVolumeControl @ 95 NONAME ; #<TI>#
- _ZTI18CMMAVideoUrlPlayer @ 96 NONAME ; #<TI>#
- _ZTI20CMMACallStateMonitor @ 97 NONAME ; #<TI>#
- _ZTI20CMMAMMFPlayerFactory @ 98 NONAME ; #<TI>#
- _ZTI26CPlaybackCompletedCallback @ 99 NONAME ; #<TI>#
- _ZTIN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 100 NONAME ; #<TI>#
- _ZTIN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 101 NONAME ; #<TI>#
- _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 102 NONAME ; #<TI>#
- _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 103 NONAME ; #<TI>#
- _ZTIN19CMMAStopTimeControl10CStopTimerE @ 104 NONAME ; #<TI>#
- _ZTV10CMMAPlayer @ 105 NONAME ; #<VT>#
- _ZTV11CMMAControl @ 106 NONAME ; #<VT>#
- _ZTV14CMMAMIDIPlayer @ 107 NONAME ; #<VT>#
- _ZTV15CMMAEventSource @ 108 NONAME ; #<VT>#
- _ZTV16CMMAVideoControl @ 109 NONAME ; #<VT>#
- _ZTV17CMMAMMFPlayerBase @ 110 NONAME ; #<VT>#
- _ZTV17CMMAStreamRequest @ 111 NONAME ; #<VT>#
- _ZTV17CMMAVolumeControl @ 112 NONAME ; #<VT>#
- _ZTV18CMMAVideoUrlPlayer @ 113 NONAME ; #<VT>#
- _ZTV20CMMACallStateMonitor @ 114 NONAME ; #<VT>#
- _ZTV20CMMAMMFPlayerFactory @ 115 NONAME ; #<VT>#
- _ZTV26CPlaybackCompletedCallback @ 116 NONAME ; #<VT>#
- _ZTVN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 117 NONAME ; #<VT>#
- _ZTVN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 118 NONAME ; #<VT>#
- _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 119 NONAME ; #<VT>#
- _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 120 NONAME ; #<VT>#
- _ZTVN19CMMAStopTimeControl10CStopTimerE @ 121 NONAME ; #<VT>#
- _ZThn12_N16CMMAVideoControl15HandleSwitchOnLEi @ 122 NONAME ; #<thunk>#
- _ZThn12_N16CMMAVideoControl17HandleForegroundLEi @ 123 NONAME ; #<thunk>#
- _ZThn12_N16CMMAVideoControl21HandleResourceChangeLEi @ 124 NONAME ; #<thunk>#
- _ZThn12_N17CMMAVolumeControl25HandleActiveProfileEventLE13TProfileEventi @ 125 NONAME ; #<thunk>#
- _ZThn160_N18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 126 NONAME ; #<thunk>#
- _ZThn288_N15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 127 NONAME ; #<thunk>#
- _ZThn288_N15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 128 NONAME ; #<thunk>#
- _ZThn296_N15CMMAVideoPlayer10SourceSizeEv @ 129 NONAME ; #<thunk>#
- _ZThn296_N15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 130 NONAME ; #<thunk>#
- _ZThn296_N15CMMAVideoPlayer11SnapshoterLEv @ 131 NONAME ; #<thunk>#
- _ZThn296_N15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 132 NONAME ; #<thunk>#
- _ZThn296_N18CMMAVideoUrlPlayerD0Ev @ 133 NONAME ; #<thunk>#
- _ZThn296_N18CMMAVideoUrlPlayerD1Ev @ 134 NONAME ; #<thunk>#
- _ZThn300_N15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 135 NONAME ; #<thunk>#
- _ZThn300_N15CMMAVideoPlayer14SnapshotBitmapEv @ 136 NONAME ; #<thunk>#
- _ZThn300_N15CMMAVideoPlayer15SnapshotEncodedEv @ 137 NONAME ; #<thunk>#
- _ZThn300_N18CMMAVideoUrlPlayerD0Ev @ 138 NONAME ; #<thunk>#
- _ZThn300_N18CMMAVideoUrlPlayerD1Ev @ 139 NONAME ; #<thunk>#
- _ZThn4_N10CMMAPlayerD0Ev @ 140 NONAME ; #<thunk>#
- _ZThn4_N10CMMAPlayerD1Ev @ 141 NONAME ; #<thunk>#
- _ZThn4_N15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 142 NONAME ; #<thunk>#
- _ZThn4_N18CMMAVideoUrlPlayerD0Ev @ 143 NONAME ; #<thunk>#
- _ZThn4_N18CMMAVideoUrlPlayerD1Ev @ 144 NONAME ; #<thunk>#
- _ZThn4_N20CMMAMMFPlayerFactoryD0Ev @ 145 NONAME ; #<thunk>#
- _ZThn4_N20CMMAMMFPlayerFactoryD1Ev @ 146 NONAME ; #<thunk>#
- _ZThn8_N16CMMAVideoControl13SnapshotReadyEv @ 147 NONAME ; #<thunk>#
- _ZThn8_N16CMMAVideoControlD0Ev @ 148 NONAME ; #<thunk>#
- _ZThn8_N16CMMAVideoControlD1Ev @ 149 NONAME ; #<thunk>#
- _ZThn8_N17CMMAVolumeControl12StateChangedEi @ 150 NONAME ; #<thunk>#
- _ZThn8_N17CMMAVolumeControlD0Ev @ 151 NONAME ; #<thunk>#
- _ZThn8_N17CMMAVolumeControlD1Ev @ 152 NONAME ; #<thunk>#
+ _ZN10CMMAPlayer21HandleCallStateEventLE4TUidi @ 13 NONAME
+ _ZN10CMMAPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 14 NONAME
+ _ZN10CMMAPlayer6CloseLEv @ 15 NONAME
+ _ZN10CMMAPlayer7ControlEi @ 16 NONAME
+ _ZN10CMMAPlayerC2Ev @ 17 NONAME
+ _ZN10CMMAPlayerD0Ev @ 18 NONAME
+ _ZN10CMMAPlayerD1Ev @ 19 NONAME
+ _ZN10CMMAPlayerD2Ev @ 20 NONAME
+ _ZN11CMMAManager17AddPlayerFactoryLEP17MMMAPlayerFactory @ 21 NONAME
+ _ZN15CMMAAudioPlayer13PlayCompleteLEi @ 22 NONAME
+ _ZN15CMMAAudioPlayer13PrefetchDataLERK6TDesC8 @ 23 NONAME
+ _ZN15CMMAAudioPlayer13PrefetchFileLEv @ 24 NONAME
+ _ZN15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 25 NONAME
+ _ZN15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 26 NONAME
+ _ZN15CMMAEventSource25SetPlayerInstanceObserverEP26MMMAPlayerInstanceObserver @ 27 NONAME
+ _ZN15CMMAEventSource26StaticAddObjectFromHandleLEPS_i @ 28 NONAME
+ _ZN15CMMAEventSource7PlayersEv @ 29 NONAME
+ _ZN15CMMAVideoPlayer10SourceSizeEv @ 30 NONAME
+ _ZN15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 31 NONAME
+ _ZN15CMMAVideoPlayer11SnapshoterLEv @ 32 NONAME
+ _ZN15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 33 NONAME
+ _ZN15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 34 NONAME
+ _ZN15CMMAVideoPlayer14SnapshotBitmapEv @ 35 NONAME
+ _ZN15CMMAVideoPlayer15SnapshotEncodedEv @ 36 NONAME
+ _ZN15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 37 NONAME
+ _ZN15CMMAVideoPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 38 NONAME
+ _ZN15CMMAVideoPlayer4TypeEv @ 39 NONAME
+ _ZN16CMMAVideoControl13SnapshotReadyEv @ 40 NONAME
+ _ZN16CMMAVideoControl15HandleSwitchOnLEi @ 41 NONAME
+ _ZN16CMMAVideoControl17HandleForegroundLEi @ 42 NONAME
+ _ZN16CMMAVideoControl21HandleResourceChangeLEi @ 43 NONAME
+ _ZN16CMMAVideoControlC1EP13MMMAGuiPlayer @ 44 NONAME
+ _ZN16CMMAVideoControlC2EP13MMMAGuiPlayer @ 45 NONAME
+ _ZN16CMMAVideoControlD0Ev @ 46 NONAME
+ _ZN16CMMAVideoControlD1Ev @ 47 NONAME
+ _ZN16CMMAVideoControlD2Ev @ 48 NONAME
+ _ZN17CMMAMMFPlayerBase10ControllerEv @ 49 NONAME
+ _ZN17CMMAMMFPlayerBase11GetDurationEPx @ 50 NONAME
+ _ZN17CMMAMMFPlayerBase6DoOpenE4TUidRK6TDesC8S0_S3_20TMMFPrioritySettings @ 51 NONAME
+ _ZN17CMMAVolumeControl12StateChangedEi @ 52 NONAME
+ _ZN17CMMAVolumeControl13RefreshVolumeEv @ 53 NONAME
+ _ZN17CMMAVolumeControl14ConstructBaseLEv @ 54 NONAME
+ _ZN17CMMAVolumeControl14RefreshControlEv @ 55 NONAME
+ _ZN17CMMAVolumeControl15SetVolumeLevelLEii @ 56 NONAME
+ _ZN17CMMAVolumeControl25HandleActiveProfileEventLE13TProfileEventi @ 57 NONAME
+ _ZN17CMMAVolumeControl25SetAudioOutputPreferenceLEi @ 58 NONAME
+ _ZN17CMMAVolumeControl9AddLevelLEv @ 59 NONAME
+ _ZN17CMMAVolumeControlC2EP10CMMAPlayer @ 60 NONAME
+ _ZN17CMMAVolumeControlD0Ev @ 61 NONAME
+ _ZN17CMMAVolumeControlD1Ev @ 62 NONAME
+ _ZN17CMMAVolumeControlD2Ev @ 63 NONAME
+ _ZN18CMMAVideoUrlPlayer10ConstructLERK7TDesC16 @ 64 NONAME
+ _ZN18CMMAVideoUrlPlayer11DeallocateLEv @ 65 NONAME
+ _ZN18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 66 NONAME
+ _ZN18CMMAVideoUrlPlayer12GetMediaTimeEPx @ 67 NONAME
+ _ZN18CMMAVideoUrlPlayer5StopLEi @ 68 NONAME
+ _ZN18CMMAVideoUrlPlayer6CloseLEv @ 69 NONAME
+ _ZN18CMMAVideoUrlPlayer6StartLEi @ 70 NONAME
+ _ZN18CMMAVideoUrlPlayer8RealizeLEv @ 71 NONAME
+ _ZN18CMMAVideoUrlPlayer9PrefetchLEv @ 72 NONAME
+ _ZN18CMMAVideoUrlPlayerC1EP15CMMAMMFResolver @ 73 NONAME
+ _ZN18CMMAVideoUrlPlayerC2EP15CMMAMMFResolver @ 74 NONAME
+ _ZN18CMMAVideoUrlPlayerD0Ev @ 75 NONAME
+ _ZN18CMMAVideoUrlPlayerD1Ev @ 76 NONAME
+ _ZN18CMMAVideoUrlPlayerD2Ev @ 77 NONAME
+ _ZN20CMMAMMFPlayerFactory13CreatePlayerLEP29CMMFFormatSelectionParametersPK7TDesC16 @ 78 NONAME
+ _ZN20CMMAMMFPlayerFactory33PreparePluginSelectionParametersLEP15CMMAMMFResolverP29CMMFFormatSelectionParameters @ 79 NONAME
+ _ZN20CMMAMMFPlayerFactoryC2Ev @ 80 NONAME
+ _ZN20CMMAMMFPlayerFactoryD0Ev @ 81 NONAME
+ _ZN20CMMAMMFPlayerFactoryD1Ev @ 82 NONAME
+ _ZN20CMMAMMFPlayerFactoryD2Ev @ 83 NONAME
+ _ZN22CMMAAudioVolumeControl4NewLEP15CMMAAudioPlayer @ 84 NONAME
+ _ZNK11CMMAControl15PublicClassNameEv @ 85 NONAME
+ _ZNK14CMMAMIDIPlayer10MidiClientEv @ 86 NONAME
+ _ZNK16CMMAVideoControl9ClassNameEv @ 87 NONAME
+ _ZNK17CMMAVolumeControl9ClassNameEv @ 88 NONAME
+ _ZTI10CMMAPlayer @ 89 NONAME ; #<TI>#
+ _ZTI11CMMAControl @ 90 NONAME ; #<TI>#
+ _ZTI14CMMAMIDIPlayer @ 91 NONAME ; #<TI>#
+ _ZTI15CMMAEventSource @ 92 NONAME ; #<TI>#
+ _ZTI16CMMAVideoControl @ 93 NONAME ; #<TI>#
+ _ZTI17CMMAMMFPlayerBase @ 94 NONAME ; #<TI>#
+ _ZTI17CMMAStreamRequest @ 95 NONAME ; #<TI>#
+ _ZTI17CMMAVolumeControl @ 96 NONAME ; #<TI>#
+ _ZTI18CMMAVideoUrlPlayer @ 97 NONAME ; #<TI>#
+ _ZTI20CMMACallStateMonitor @ 98 NONAME ; #<TI>#
+ _ZTI20CMMAMMFPlayerFactory @ 99 NONAME ; #<TI>#
+ _ZTI26CPlaybackCompletedCallback @ 100 NONAME ; #<TI>#
+ _ZTIN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 101 NONAME ; #<TI>#
+ _ZTIN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 102 NONAME ; #<TI>#
+ _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 103 NONAME ; #<TI>#
+ _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 104 NONAME ; #<TI>#
+ _ZTIN19CMMAStopTimeControl10CStopTimerE @ 105 NONAME ; #<TI>#
+ _ZTV10CMMAPlayer @ 106 NONAME ; #<VT>#
+ _ZTV11CMMAControl @ 107 NONAME ; #<VT>#
+ _ZTV14CMMAMIDIPlayer @ 108 NONAME ; #<VT>#
+ _ZTV15CMMAEventSource @ 109 NONAME ; #<VT>#
+ _ZTV16CMMAVideoControl @ 110 NONAME ; #<VT>#
+ _ZTV17CMMAMMFPlayerBase @ 111 NONAME ; #<VT>#
+ _ZTV17CMMAStreamRequest @ 112 NONAME ; #<VT>#
+ _ZTV17CMMAVolumeControl @ 113 NONAME ; #<VT>#
+ _ZTV18CMMAVideoUrlPlayer @ 114 NONAME ; #<VT>#
+ _ZTV20CMMACallStateMonitor @ 115 NONAME ; #<VT>#
+ _ZTV20CMMAMMFPlayerFactory @ 116 NONAME ; #<VT>#
+ _ZTV26CPlaybackCompletedCallback @ 117 NONAME ; #<VT>#
+ _ZTVN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 118 NONAME ; #<VT>#
+ _ZTVN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 119 NONAME ; #<VT>#
+ _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 120 NONAME ; #<VT>#
+ _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 121 NONAME ; #<VT>#
+ _ZTVN19CMMAStopTimeControl10CStopTimerE @ 122 NONAME ; #<VT>#
+ _ZThn12_N16CMMAVideoControl15HandleSwitchOnLEi @ 123 NONAME ; #<thunk>#
+ _ZThn12_N16CMMAVideoControl17HandleForegroundLEi @ 124 NONAME ; #<thunk>#
+ _ZThn12_N16CMMAVideoControl21HandleResourceChangeLEi @ 125 NONAME ; #<thunk>#
+ _ZThn12_N17CMMAVolumeControl25HandleActiveProfileEventLE13TProfileEventi @ 126 NONAME ; #<thunk>#
+ _ZThn160_N18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 127 NONAME ; #<thunk>#
+ _ZThn288_N15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 128 NONAME ; #<thunk>#
+ _ZThn288_N15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 129 NONAME ; #<thunk>#
+ _ZThn296_N15CMMAVideoPlayer10SourceSizeEv @ 130 NONAME ; #<thunk>#
+ _ZThn296_N15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 131 NONAME ; #<thunk>#
+ _ZThn296_N15CMMAVideoPlayer11SnapshoterLEv @ 132 NONAME ; #<thunk>#
+ _ZThn296_N15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 133 NONAME ; #<thunk>#
+ _ZThn296_N18CMMAVideoUrlPlayerD0Ev @ 134 NONAME ; #<thunk>#
+ _ZThn296_N18CMMAVideoUrlPlayerD1Ev @ 135 NONAME ; #<thunk>#
+ _ZThn300_N15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 136 NONAME ; #<thunk>#
+ _ZThn300_N15CMMAVideoPlayer14SnapshotBitmapEv @ 137 NONAME ; #<thunk>#
+ _ZThn300_N15CMMAVideoPlayer15SnapshotEncodedEv @ 138 NONAME ; #<thunk>#
+ _ZThn300_N18CMMAVideoUrlPlayerD0Ev @ 139 NONAME ; #<thunk>#
+ _ZThn300_N18CMMAVideoUrlPlayerD1Ev @ 140 NONAME ; #<thunk>#
+ _ZThn4_N10CMMAPlayerD0Ev @ 141 NONAME ; #<thunk>#
+ _ZThn4_N10CMMAPlayerD1Ev @ 142 NONAME ; #<thunk>#
+ _ZThn4_N15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 143 NONAME ; #<thunk>#
+ _ZThn4_N18CMMAVideoUrlPlayerD0Ev @ 144 NONAME ; #<thunk>#
+ _ZThn4_N18CMMAVideoUrlPlayerD1Ev @ 145 NONAME ; #<thunk>#
+ _ZThn4_N20CMMAMMFPlayerFactoryD0Ev @ 146 NONAME ; #<thunk>#
+ _ZThn4_N20CMMAMMFPlayerFactoryD1Ev @ 147 NONAME ; #<thunk>#
+ _ZThn8_N10CMMAPlayer21HandleCallStateEventLE4TUidi @ 148 NONAME ; #<thunk>#
+ _ZThn8_N10CMMAPlayerD0Ev @ 149 NONAME ; #<thunk>#
+ _ZThn8_N10CMMAPlayerD1Ev @ 150 NONAME ; #<thunk>#
+ _ZThn8_N16CMMAVideoControl13SnapshotReadyEv @ 151 NONAME ; #<thunk>#
+ _ZThn8_N16CMMAVideoControlD0Ev @ 152 NONAME ; #<thunk>#
+ _ZThn8_N16CMMAVideoControlD1Ev @ 153 NONAME ; #<thunk>#
+ _ZThn8_N17CMMAVolumeControl12StateChangedEi @ 154 NONAME ; #<thunk>#
+ _ZThn8_N17CMMAVolumeControlD0Ev @ 155 NONAME ; #<thunk>#
+ _ZThn8_N17CMMAVolumeControlD1Ev @ 156 NONAME ; #<thunk>#
+ _ZThn8_N18CMMAVideoUrlPlayerD0Ev @ 157 NONAME ; #<thunk>#
+ _ZThn8_N18CMMAVideoUrlPlayerD1Ev @ 158 NONAME ; #<thunk>#
--- a/javauis/mmapi_akn/build/eabi/javamobilemediau.def Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/build/eabi/javamobilemediau.def Tue Sep 14 21:06:50 2010 +0300
@@ -11,175 +11,183 @@
_ZN10CMMAPlayer17AddStateListenerLEP23MMMAPlayerStateListener @ 10 NONAME
_ZN10CMMAPlayer19PostActionCompletedEi @ 11 NONAME
_ZN10CMMAPlayer19RemoveStateListenerEP23MMMAPlayerStateListener @ 12 NONAME
- _ZN10CMMAPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 13 NONAME
- _ZN10CMMAPlayer6CloseLEv @ 14 NONAME
- _ZN10CMMAPlayer7ControlEi @ 15 NONAME
- _ZN10CMMAPlayerC2Ev @ 16 NONAME
- _ZN10CMMAPlayerD0Ev @ 17 NONAME
- _ZN10CMMAPlayerD1Ev @ 18 NONAME
- _ZN10CMMAPlayerD2Ev @ 19 NONAME
- _ZN11CMMAManager17AddPlayerFactoryLEP17MMMAPlayerFactory @ 20 NONAME
- _ZN15CMMAAudioPlayer13PlayCompleteLEi @ 21 NONAME
- _ZN15CMMAAudioPlayer13PrefetchDataLERK6TDesC8 @ 22 NONAME
- _ZN15CMMAAudioPlayer13PrefetchFileLEv @ 23 NONAME
- _ZN15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 24 NONAME
- _ZN15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 25 NONAME
- _ZN15CMMAEventSource25SetPlayerInstanceObserverEP26MMMAPlayerInstanceObserver @ 26 NONAME
- _ZN15CMMAEventSource26StaticAddObjectFromHandleLEPS_i @ 27 NONAME
- _ZN15CMMAEventSource7PlayersEv @ 28 NONAME
- _ZN15CMMAVideoPlayer10SourceSizeEv @ 29 NONAME
- _ZN15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 30 NONAME
- _ZN15CMMAVideoPlayer11SnapshoterLEv @ 31 NONAME
- _ZN15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 32 NONAME
- _ZN15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 33 NONAME
- _ZN15CMMAVideoPlayer14SnapshotBitmapEv @ 34 NONAME
- _ZN15CMMAVideoPlayer15SnapshotEncodedEv @ 35 NONAME
- _ZN15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 36 NONAME
- _ZN15CMMAVideoPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 37 NONAME
- _ZN15CMMAVideoPlayer4TypeEv @ 38 NONAME
- _ZN16CMMAVideoControl13SnapshotReadyEv @ 39 NONAME
- _ZN16CMMAVideoControl15HandleSwitchOnLEi @ 40 NONAME
- _ZN16CMMAVideoControl17HandleForegroundLEi @ 41 NONAME
- _ZN16CMMAVideoControl21HandleResourceChangeLEi @ 42 NONAME
- _ZN16CMMAVideoControlC1EP13MMMAGuiPlayer @ 43 NONAME
- _ZN16CMMAVideoControlC2EP13MMMAGuiPlayer @ 44 NONAME
- _ZN16CMMAVideoControlD0Ev @ 45 NONAME
- _ZN16CMMAVideoControlD1Ev @ 46 NONAME
- _ZN16CMMAVideoControlD2Ev @ 47 NONAME
- _ZN17CMMAEMCPlayerBase13StreamControlEv @ 48 NONAME
- _ZN17CMMAEMCPlayerBase9MMFactoryEv @ 49 NONAME
- _ZN17CMMAMMFPlayerBase10ControllerEv @ 50 NONAME
- _ZN17CMMAMMFPlayerBase11GetDurationEPx @ 51 NONAME
- _ZN17CMMAMMFPlayerBase6DoOpenE4TUidRK6TDesC8S0_S3_20TMMFPrioritySettings @ 52 NONAME
- _ZN17CMMASurfaceWindow10SetDisplayEP11MMMADisplay @ 53 NONAME
- _ZN17CMMASurfaceWindow13RemoveSurfaceEv @ 54 NONAME
- _ZN17CMMASurfaceWindow20SetAVCableConnStatusEi @ 55 NONAME
- _ZN17CMMASurfaceWindow20SetSurfaceParametersERK10TSurfaceIdRK5TRectRK17TVideoAspectRatio @ 56 NONAME
- _ZN17CMMASurfaceWindow27SetChangedSurfaceParametersERK10TSurfaceIdRK5TRectRK17TVideoAspectRatio @ 57 NONAME
- _ZN17CMMASurfaceWindow4NewLEP15CMMAEventSourceP10CMMAPlayeri @ 58 NONAME
- _ZN17CMMAVolumeControl12StateChangedEi @ 59 NONAME
- _ZN17CMMAVolumeControl13RefreshVolumeEv @ 60 NONAME
- _ZN17CMMAVolumeControl14ConstructBaseLEv @ 61 NONAME
- _ZN17CMMAVolumeControl14RefreshControlEv @ 62 NONAME
- _ZN17CMMAVolumeControl15SetVolumeLevelLEii @ 63 NONAME
- _ZN17CMMAVolumeControl25HandleActiveProfileEventLE13TProfileEventi @ 64 NONAME
- _ZN17CMMAVolumeControl25SetAudioOutputPreferenceLEi @ 65 NONAME
- _ZN17CMMAVolumeControl9AddLevelLEv @ 66 NONAME
- _ZN17CMMAVolumeControlC2EP10CMMAPlayer @ 67 NONAME
- _ZN17CMMAVolumeControlD0Ev @ 68 NONAME
- _ZN17CMMAVolumeControlD1Ev @ 69 NONAME
- _ZN17CMMAVolumeControlD2Ev @ 70 NONAME
- _ZN18CMMAEMCAudioPlayer10ConstructLEv @ 71 NONAME
- _ZN18CMMAEMCAudioPlayer13PlayCompleteLEi @ 72 NONAME
- _ZN18CMMAEMCAudioPlayer13PrefetchDataLERK6TDesC8 @ 73 NONAME
- _ZN18CMMAEMCAudioPlayer13PrefetchFileLEv @ 74 NONAME
- _ZN18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 75 NONAME
- _ZN18CMMAEMCAudioPlayer4TypeEv @ 76 NONAME
- _ZN18CMMAEMCAudioPlayer8RealizeLEv @ 77 NONAME
- _ZN18CMMAEMCAudioPlayer9PrefetchLEv @ 78 NONAME
- _ZN18CMMAEMCAudioPlayerC1EP15CMMAEMCResolver @ 79 NONAME
- _ZN18CMMAEMCAudioPlayerC2EP15CMMAEMCResolver @ 80 NONAME
- _ZN18CMMAEMCAudioPlayerD0Ev @ 81 NONAME
- _ZN18CMMAEMCAudioPlayerD1Ev @ 82 NONAME
- _ZN18CMMAEMCAudioPlayerD2Ev @ 83 NONAME
- _ZN18CMMAVideoUrlPlayer10ConstructLERK7TDesC16 @ 84 NONAME
- _ZN18CMMAVideoUrlPlayer11DeallocateLEv @ 85 NONAME
- _ZN18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 86 NONAME
- _ZN18CMMAVideoUrlPlayer12GetMediaTimeEPx @ 87 NONAME
- _ZN18CMMAVideoUrlPlayer5StopLEi @ 88 NONAME
- _ZN18CMMAVideoUrlPlayer6CloseLEv @ 89 NONAME
- _ZN18CMMAVideoUrlPlayer6StartLEi @ 90 NONAME
- _ZN18CMMAVideoUrlPlayer8RealizeLEv @ 91 NONAME
- _ZN18CMMAVideoUrlPlayer9PrefetchLEv @ 92 NONAME
- _ZN18CMMAVideoUrlPlayerC1EP15CMMAMMFResolver @ 93 NONAME
- _ZN18CMMAVideoUrlPlayerC2EP15CMMAMMFResolver @ 94 NONAME
- _ZN18CMMAVideoUrlPlayerD0Ev @ 95 NONAME
- _ZN18CMMAVideoUrlPlayerD1Ev @ 96 NONAME
- _ZN18CMMAVideoUrlPlayerD2Ev @ 97 NONAME
- _ZN20CMMAMMFPlayerFactory13CreatePlayerLEP29CMMFFormatSelectionParametersPK7TDesC16 @ 98 NONAME
- _ZN20CMMAMMFPlayerFactory33PreparePluginSelectionParametersLEP15CMMAMMFResolverP29CMMFFormatSelectionParameters @ 99 NONAME
- _ZN20CMMAMMFPlayerFactoryC2Ev @ 100 NONAME
- _ZN20CMMAMMFPlayerFactoryD0Ev @ 101 NONAME
- _ZN20CMMAMMFPlayerFactoryD1Ev @ 102 NONAME
- _ZN20CMMAMMFPlayerFactoryD2Ev @ 103 NONAME
- _ZN22CMMAAudioVolumeControl4NewLEP15CMMAAudioPlayer @ 104 NONAME
- _ZN25CMMAEMCAudioVolumeControl11DoGetLevelLEv @ 105 NONAME
- _ZN25CMMAEMCAudioVolumeControl11DoSetLevelLEi @ 106 NONAME
- _ZN25CMMAEMCAudioVolumeControl4NewLER18CMMAEMCAudioPlayer @ 107 NONAME
- _ZN25CMMAEMCAudioVolumeControlC1ER18CMMAEMCAudioPlayer @ 108 NONAME
- _ZN25CMMAEMCAudioVolumeControlC2ER18CMMAEMCAudioPlayer @ 109 NONAME
- _ZNK11CMMAControl15PublicClassNameEv @ 110 NONAME
- _ZNK14CMMAMIDIPlayer10MidiClientEv @ 111 NONAME
- _ZNK16CMMAVideoControl9ClassNameEv @ 112 NONAME
- _ZNK17CMMAVolumeControl9ClassNameEv @ 113 NONAME
- _ZTI10CMMAPlayer @ 114 NONAME
- _ZTI11CMMAControl @ 115 NONAME
- _ZTI14CMMAMIDIPlayer @ 116 NONAME
- _ZTI15CMMAEventSource @ 117 NONAME
- _ZTI16CMMAVideoControl @ 118 NONAME
- _ZTI17CMMAMMFPlayerBase @ 119 NONAME
- _ZTI17CMMAStreamRequest @ 120 NONAME
- _ZTI17CMMAVolumeControl @ 121 NONAME
- _ZTI18CHXMetaDataUtility @ 122 NONAME
- _ZTI18CMMAVideoUrlPlayer @ 123 NONAME
- _ZTI20CMMACallStateMonitor @ 124 NONAME
- _ZTI20CMMAMMFPlayerFactory @ 125 NONAME
- _ZTI26CPlaybackCompletedCallback @ 126 NONAME
- _ZTIN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 127 NONAME
- _ZTIN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 128 NONAME
- _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 129 NONAME
- _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 130 NONAME
- _ZTIN19CMMAStopTimeControl10CStopTimerE @ 131 NONAME
- _ZTV10CMMAPlayer @ 132 NONAME
- _ZTV11CMMAControl @ 133 NONAME
- _ZTV14CMMAMIDIPlayer @ 134 NONAME
- _ZTV15CMMAEventSource @ 135 NONAME
- _ZTV16CMMAVideoControl @ 136 NONAME
- _ZTV17CMMAMMFPlayerBase @ 137 NONAME
- _ZTV17CMMAStreamRequest @ 138 NONAME
- _ZTV17CMMAVolumeControl @ 139 NONAME
- _ZTV18CHXMetaDataUtility @ 140 NONAME
- _ZTV18CMMAVideoUrlPlayer @ 141 NONAME
- _ZTV20CMMACallStateMonitor @ 142 NONAME
- _ZTV20CMMAMMFPlayerFactory @ 143 NONAME
- _ZTV26CPlaybackCompletedCallback @ 144 NONAME
- _ZTVN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 145 NONAME
- _ZTVN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 146 NONAME
- _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 147 NONAME
- _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 148 NONAME
- _ZTVN19CMMAStopTimeControl10CStopTimerE @ 149 NONAME
- _ZThn12_N16CMMAVideoControl15HandleSwitchOnLEi @ 150 NONAME
- _ZThn12_N16CMMAVideoControl17HandleForegroundLEi @ 151 NONAME
- _ZThn12_N16CMMAVideoControl21HandleResourceChangeLEi @ 152 NONAME
- _ZThn12_N17CMMAVolumeControl25HandleActiveProfileEventLE13TProfileEventi @ 153 NONAME
- _ZThn160_N18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 154 NONAME
- _ZThn288_N15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 155 NONAME
- _ZThn288_N15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 156 NONAME
- _ZThn296_N15CMMAVideoPlayer10SourceSizeEv @ 157 NONAME
- _ZThn296_N15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 158 NONAME
- _ZThn296_N15CMMAVideoPlayer11SnapshoterLEv @ 159 NONAME
- _ZThn296_N15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 160 NONAME
- _ZThn296_N18CMMAVideoUrlPlayerD0Ev @ 161 NONAME
- _ZThn296_N18CMMAVideoUrlPlayerD1Ev @ 162 NONAME
- _ZThn300_N15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 163 NONAME
- _ZThn300_N15CMMAVideoPlayer14SnapshotBitmapEv @ 164 NONAME
- _ZThn300_N15CMMAVideoPlayer15SnapshotEncodedEv @ 165 NONAME
- _ZThn300_N18CMMAVideoUrlPlayerD0Ev @ 166 NONAME
- _ZThn300_N18CMMAVideoUrlPlayerD1Ev @ 167 NONAME
- _ZThn4_N10CMMAPlayerD0Ev @ 168 NONAME
- _ZThn4_N10CMMAPlayerD1Ev @ 169 NONAME
- _ZThn4_N15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 170 NONAME
- _ZThn4_N18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 171 NONAME
- _ZThn4_N18CMMAEMCAudioPlayerD0Ev @ 172 NONAME
- _ZThn4_N18CMMAEMCAudioPlayerD1Ev @ 173 NONAME
- _ZThn4_N18CMMAVideoUrlPlayerD0Ev @ 174 NONAME
- _ZThn4_N18CMMAVideoUrlPlayerD1Ev @ 175 NONAME
- _ZThn4_N20CMMAMMFPlayerFactoryD0Ev @ 176 NONAME
- _ZThn4_N20CMMAMMFPlayerFactoryD1Ev @ 177 NONAME
- _ZThn8_N16CMMAVideoControl13SnapshotReadyEv @ 178 NONAME
- _ZThn8_N16CMMAVideoControlD0Ev @ 179 NONAME
- _ZThn8_N16CMMAVideoControlD1Ev @ 180 NONAME
- _ZThn8_N17CMMAVolumeControl12StateChangedEi @ 181 NONAME
- _ZThn8_N17CMMAVolumeControlD0Ev @ 182 NONAME
- _ZThn8_N17CMMAVolumeControlD1Ev @ 183 NONAME
+ _ZN10CMMAPlayer21HandleCallStateEventLE4TUidi @ 13 NONAME
+ _ZN10CMMAPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 14 NONAME
+ _ZN10CMMAPlayer6CloseLEv @ 15 NONAME
+ _ZN10CMMAPlayer7ControlEi @ 16 NONAME
+ _ZN10CMMAPlayerC2Ev @ 17 NONAME
+ _ZN10CMMAPlayerD0Ev @ 18 NONAME
+ _ZN10CMMAPlayerD1Ev @ 19 NONAME
+ _ZN10CMMAPlayerD2Ev @ 20 NONAME
+ _ZN11CMMAManager17AddPlayerFactoryLEP17MMMAPlayerFactory @ 21 NONAME
+ _ZN15CMMAAudioPlayer13PlayCompleteLEi @ 22 NONAME
+ _ZN15CMMAAudioPlayer13PrefetchDataLERK6TDesC8 @ 23 NONAME
+ _ZN15CMMAAudioPlayer13PrefetchFileLEv @ 24 NONAME
+ _ZN15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 25 NONAME
+ _ZN15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 26 NONAME
+ _ZN15CMMAEventSource25SetPlayerInstanceObserverEP26MMMAPlayerInstanceObserver @ 27 NONAME
+ _ZN15CMMAEventSource26StaticAddObjectFromHandleLEPS_i @ 28 NONAME
+ _ZN15CMMAEventSource7PlayersEv @ 29 NONAME
+ _ZN15CMMAVideoPlayer10SourceSizeEv @ 30 NONAME
+ _ZN15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 31 NONAME
+ _ZN15CMMAVideoPlayer11SnapshoterLEv @ 32 NONAME
+ _ZN15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 33 NONAME
+ _ZN15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 34 NONAME
+ _ZN15CMMAVideoPlayer14SnapshotBitmapEv @ 35 NONAME
+ _ZN15CMMAVideoPlayer15SnapshotEncodedEv @ 36 NONAME
+ _ZN15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 37 NONAME
+ _ZN15CMMAVideoPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 38 NONAME
+ _ZN15CMMAVideoPlayer4TypeEv @ 39 NONAME
+ _ZN16CMMAVideoControl13SnapshotReadyEv @ 40 NONAME
+ _ZN16CMMAVideoControl15HandleSwitchOnLEi @ 41 NONAME
+ _ZN16CMMAVideoControl17HandleForegroundLEi @ 42 NONAME
+ _ZN16CMMAVideoControl21HandleResourceChangeLEi @ 43 NONAME
+ _ZN16CMMAVideoControlC1EP13MMMAGuiPlayer @ 44 NONAME
+ _ZN16CMMAVideoControlC2EP13MMMAGuiPlayer @ 45 NONAME
+ _ZN16CMMAVideoControlD0Ev @ 46 NONAME
+ _ZN16CMMAVideoControlD1Ev @ 47 NONAME
+ _ZN16CMMAVideoControlD2Ev @ 48 NONAME
+ _ZN17CMMAEMCPlayerBase13StreamControlEv @ 49 NONAME
+ _ZN17CMMAEMCPlayerBase9MMFactoryEv @ 50 NONAME
+ _ZN17CMMAMMFPlayerBase10ControllerEv @ 51 NONAME
+ _ZN17CMMAMMFPlayerBase11GetDurationEPx @ 52 NONAME
+ _ZN17CMMAMMFPlayerBase6DoOpenE4TUidRK6TDesC8S0_S3_20TMMFPrioritySettings @ 53 NONAME
+ _ZN17CMMASurfaceWindow10SetDisplayEP11MMMADisplay @ 54 NONAME
+ _ZN17CMMASurfaceWindow13RemoveSurfaceEv @ 55 NONAME
+ _ZN17CMMASurfaceWindow20SetAVCableConnStatusEi @ 56 NONAME
+ _ZN17CMMASurfaceWindow20SetSurfaceParametersERK10TSurfaceIdRK5TRectRK17TVideoAspectRatio @ 57 NONAME
+ _ZN17CMMASurfaceWindow27SetChangedSurfaceParametersERK10TSurfaceIdRK5TRectRK17TVideoAspectRatio @ 58 NONAME
+ _ZN17CMMASurfaceWindow4NewLEP15CMMAEventSourceP10CMMAPlayeri @ 59 NONAME
+ _ZN17CMMAVolumeControl12StateChangedEi @ 60 NONAME
+ _ZN17CMMAVolumeControl13RefreshVolumeEv @ 61 NONAME
+ _ZN17CMMAVolumeControl14ConstructBaseLEv @ 62 NONAME
+ _ZN17CMMAVolumeControl14RefreshControlEv @ 63 NONAME
+ _ZN17CMMAVolumeControl15SetVolumeLevelLEii @ 64 NONAME
+ _ZN17CMMAVolumeControl25HandleActiveProfileEventLE13TProfileEventi @ 65 NONAME
+ _ZN17CMMAVolumeControl25SetAudioOutputPreferenceLEi @ 66 NONAME
+ _ZN17CMMAVolumeControl9AddLevelLEv @ 67 NONAME
+ _ZN17CMMAVolumeControlC2EP10CMMAPlayer @ 68 NONAME
+ _ZN17CMMAVolumeControlD0Ev @ 69 NONAME
+ _ZN17CMMAVolumeControlD1Ev @ 70 NONAME
+ _ZN17CMMAVolumeControlD2Ev @ 71 NONAME
+ _ZN18CMMAEMCAudioPlayer10ConstructLEv @ 72 NONAME
+ _ZN18CMMAEMCAudioPlayer13PlayCompleteLEi @ 73 NONAME
+ _ZN18CMMAEMCAudioPlayer13PrefetchDataLERK6TDesC8 @ 74 NONAME
+ _ZN18CMMAEMCAudioPlayer13PrefetchFileLEv @ 75 NONAME
+ _ZN18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 76 NONAME
+ _ZN18CMMAEMCAudioPlayer4TypeEv @ 77 NONAME
+ _ZN18CMMAEMCAudioPlayer8RealizeLEv @ 78 NONAME
+ _ZN18CMMAEMCAudioPlayer9PrefetchLEv @ 79 NONAME
+ _ZN18CMMAEMCAudioPlayerC1EP15CMMAEMCResolver @ 80 NONAME
+ _ZN18CMMAEMCAudioPlayerC2EP15CMMAEMCResolver @ 81 NONAME
+ _ZN18CMMAEMCAudioPlayerD0Ev @ 82 NONAME
+ _ZN18CMMAEMCAudioPlayerD1Ev @ 83 NONAME
+ _ZN18CMMAEMCAudioPlayerD2Ev @ 84 NONAME
+ _ZN18CMMAVideoUrlPlayer10ConstructLERK7TDesC16 @ 85 NONAME
+ _ZN18CMMAVideoUrlPlayer11DeallocateLEv @ 86 NONAME
+ _ZN18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 87 NONAME
+ _ZN18CMMAVideoUrlPlayer12GetMediaTimeEPx @ 88 NONAME
+ _ZN18CMMAVideoUrlPlayer5StopLEi @ 89 NONAME
+ _ZN18CMMAVideoUrlPlayer6CloseLEv @ 90 NONAME
+ _ZN18CMMAVideoUrlPlayer6StartLEi @ 91 NONAME
+ _ZN18CMMAVideoUrlPlayer8RealizeLEv @ 92 NONAME
+ _ZN18CMMAVideoUrlPlayer9PrefetchLEv @ 93 NONAME
+ _ZN18CMMAVideoUrlPlayerC1EP15CMMAMMFResolver @ 94 NONAME
+ _ZN18CMMAVideoUrlPlayerC2EP15CMMAMMFResolver @ 95 NONAME
+ _ZN18CMMAVideoUrlPlayerD0Ev @ 96 NONAME
+ _ZN18CMMAVideoUrlPlayerD1Ev @ 97 NONAME
+ _ZN18CMMAVideoUrlPlayerD2Ev @ 98 NONAME
+ _ZN20CMMAMMFPlayerFactory13CreatePlayerLEP29CMMFFormatSelectionParametersPK7TDesC16 @ 99 NONAME
+ _ZN20CMMAMMFPlayerFactory33PreparePluginSelectionParametersLEP15CMMAMMFResolverP29CMMFFormatSelectionParameters @ 100 NONAME
+ _ZN20CMMAMMFPlayerFactoryC2Ev @ 101 NONAME
+ _ZN20CMMAMMFPlayerFactoryD0Ev @ 102 NONAME
+ _ZN20CMMAMMFPlayerFactoryD1Ev @ 103 NONAME
+ _ZN20CMMAMMFPlayerFactoryD2Ev @ 104 NONAME
+ _ZN22CMMAAudioVolumeControl4NewLEP15CMMAAudioPlayer @ 105 NONAME
+ _ZN25CMMAEMCAudioVolumeControl11DoGetLevelLEv @ 106 NONAME
+ _ZN25CMMAEMCAudioVolumeControl11DoSetLevelLEi @ 107 NONAME
+ _ZN25CMMAEMCAudioVolumeControl4NewLER18CMMAEMCAudioPlayer @ 108 NONAME
+ _ZN25CMMAEMCAudioVolumeControlC1ER18CMMAEMCAudioPlayer @ 109 NONAME
+ _ZN25CMMAEMCAudioVolumeControlC2ER18CMMAEMCAudioPlayer @ 110 NONAME
+ _ZNK11CMMAControl15PublicClassNameEv @ 111 NONAME
+ _ZNK14CMMAMIDIPlayer10MidiClientEv @ 112 NONAME
+ _ZNK16CMMAVideoControl9ClassNameEv @ 113 NONAME
+ _ZNK17CMMAVolumeControl9ClassNameEv @ 114 NONAME
+ _ZTI10CMMAPlayer @ 115 NONAME
+ _ZTI11CMMAControl @ 116 NONAME
+ _ZTI14CMMAMIDIPlayer @ 117 NONAME
+ _ZTI15CMMAEventSource @ 118 NONAME
+ _ZTI16CMMAVideoControl @ 119 NONAME
+ _ZTI17CMMAMMFPlayerBase @ 120 NONAME
+ _ZTI17CMMAStreamRequest @ 121 NONAME
+ _ZTI17CMMAVolumeControl @ 122 NONAME
+ _ZTI18CHXMetaDataUtility @ 123 NONAME
+ _ZTI18CMMAVideoUrlPlayer @ 124 NONAME
+ _ZTI20CMMACallStateMonitor @ 125 NONAME
+ _ZTI20CMMAMMFPlayerFactory @ 126 NONAME
+ _ZTI26CPlaybackCompletedCallback @ 127 NONAME
+ _ZTIN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 128 NONAME
+ _ZTIN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 129 NONAME
+ _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 130 NONAME
+ _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 131 NONAME
+ _ZTIN19CMMAStopTimeControl10CStopTimerE @ 132 NONAME
+ _ZTV10CMMAPlayer @ 133 NONAME
+ _ZTV11CMMAControl @ 134 NONAME
+ _ZTV14CMMAMIDIPlayer @ 135 NONAME
+ _ZTV15CMMAEventSource @ 136 NONAME
+ _ZTV16CMMAVideoControl @ 137 NONAME
+ _ZTV17CMMAMMFPlayerBase @ 138 NONAME
+ _ZTV17CMMAStreamRequest @ 139 NONAME
+ _ZTV17CMMAVolumeControl @ 140 NONAME
+ _ZTV18CHXMetaDataUtility @ 141 NONAME
+ _ZTV18CMMAVideoUrlPlayer @ 142 NONAME
+ _ZTV20CMMACallStateMonitor @ 143 NONAME
+ _ZTV20CMMAMMFPlayerFactory @ 144 NONAME
+ _ZTV26CPlaybackCompletedCallback @ 145 NONAME
+ _ZTVN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 146 NONAME
+ _ZTVN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 147 NONAME
+ _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 148 NONAME
+ _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 149 NONAME
+ _ZTVN19CMMAStopTimeControl10CStopTimerE @ 150 NONAME
+ _ZThn12_N16CMMAVideoControl15HandleSwitchOnLEi @ 151 NONAME
+ _ZThn12_N16CMMAVideoControl17HandleForegroundLEi @ 152 NONAME
+ _ZThn12_N16CMMAVideoControl21HandleResourceChangeLEi @ 153 NONAME
+ _ZThn12_N17CMMAVolumeControl25HandleActiveProfileEventLE13TProfileEventi @ 154 NONAME
+ _ZThn160_N18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 155 NONAME
+ _ZThn288_N15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 156 NONAME
+ _ZThn288_N15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 157 NONAME
+ _ZThn296_N15CMMAVideoPlayer10SourceSizeEv @ 158 NONAME
+ _ZThn296_N15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 159 NONAME
+ _ZThn296_N15CMMAVideoPlayer11SnapshoterLEv @ 160 NONAME
+ _ZThn296_N15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 161 NONAME
+ _ZThn296_N18CMMAVideoUrlPlayerD0Ev @ 162 NONAME
+ _ZThn296_N18CMMAVideoUrlPlayerD1Ev @ 163 NONAME
+ _ZThn300_N15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 164 NONAME
+ _ZThn300_N15CMMAVideoPlayer14SnapshotBitmapEv @ 165 NONAME
+ _ZThn300_N15CMMAVideoPlayer15SnapshotEncodedEv @ 166 NONAME
+ _ZThn300_N18CMMAVideoUrlPlayerD0Ev @ 167 NONAME
+ _ZThn300_N18CMMAVideoUrlPlayerD1Ev @ 168 NONAME
+ _ZThn4_N10CMMAPlayerD0Ev @ 169 NONAME
+ _ZThn4_N10CMMAPlayerD1Ev @ 170 NONAME
+ _ZThn4_N15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 171 NONAME
+ _ZThn4_N18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 172 NONAME
+ _ZThn4_N18CMMAEMCAudioPlayerD0Ev @ 173 NONAME
+ _ZThn4_N18CMMAEMCAudioPlayerD1Ev @ 174 NONAME
+ _ZThn4_N18CMMAVideoUrlPlayerD0Ev @ 175 NONAME
+ _ZThn4_N18CMMAVideoUrlPlayerD1Ev @ 176 NONAME
+ _ZThn4_N20CMMAMMFPlayerFactoryD0Ev @ 177 NONAME
+ _ZThn4_N20CMMAMMFPlayerFactoryD1Ev @ 178 NONAME
+ _ZThn8_N10CMMAPlayer21HandleCallStateEventLE4TUidi @ 179 NONAME
+ _ZThn8_N10CMMAPlayerD0Ev @ 180 NONAME
+ _ZThn8_N10CMMAPlayerD1Ev @ 181 NONAME
+ _ZThn8_N16CMMAVideoControl13SnapshotReadyEv @ 182 NONAME
+ _ZThn8_N16CMMAVideoControlD0Ev @ 183 NONAME
+ _ZThn8_N16CMMAVideoControlD1Ev @ 184 NONAME
+ _ZThn8_N17CMMAVolumeControl12StateChangedEi @ 185 NONAME
+ _ZThn8_N17CMMAVolumeControlD0Ev @ 186 NONAME
+ _ZThn8_N17CMMAVolumeControlD1Ev @ 187 NONAME
+ _ZThn8_N18CMMAEMCAudioPlayerD0Ev @ 188 NONAME
+ _ZThn8_N18CMMAEMCAudioPlayerD1Ev @ 189 NONAME
+ _ZThn8_N18CMMAVideoUrlPlayerD0Ev @ 190 NONAME
+ _ZThn8_N18CMMAVideoUrlPlayerD1Ev @ 191 NONAME
--- a/javauis/mmapi_akn/directcontent/src/cmmadcdisplay.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javauis/mmapi_akn/directcontent/src/cmmadcdisplay.cpp Tue Sep 14 21:06:50 2010 +0300
@@ -139,6 +139,10 @@
}
#endif
+ if(IsUserRectSet() || iFullScreen)
+ {
+ return;
+ }
if (iWindow)
{
TRect tmp(TPoint(0, 0), aSourceSize);