javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoProperties.java
--- a/javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoProperties.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoProperties.java Fri Jul 09 16:35:45 2010 +0300
@@ -51,7 +51,7 @@
private static final String BATTERY_LEVEL = "com.nokia.mid.batterylevel";
- private static final String COUNTRY_CODE = "com.nokia.mid.countrycode";
+ static final String COUNTRY_CODE = "com.nokia.mid.countrycode";
private static final String IMEI = "com.nokia.mid.imei";
@@ -59,7 +59,7 @@
private static final String NETWORK_AVAILABILITY = "com.nokia.mid.networkavailability";
- private static final String NETWORK_ID = "com.nokia.mid.networkid";
+ static final String NETWORK_ID = "com.nokia.mid.networkid";
private static final String NETWORK_SIGNAL = "com.nokia.mid.networksignal";
@@ -140,6 +140,9 @@
int value = ((Integer)iPropertyKeys.get(aKey)).intValue();
Uid appSuiteUid;
+ int apId = APP_DEFAULT_APN_NOT_SPECIFIED; // access point id
+ int apType = APP_DEFAULT_APN_NOT_SPECIFIED; // MIDlet access point type, can be SNAP or IAP
+
ConnectionManager CmInstance = null;
String result = null;
// Only network access seems to have another way to handle it.
@@ -160,29 +163,25 @@
AccessPoint apn = CmInstance.getApplicationDefault(appSuiteUid);
if (apn != null)
{
- if (apn.getType() == AccessPoint.NAP_IAP) // IAP ID
+ apId = apn.getNapId();
+ apType = apn.getType();
+
+
+ if ((apType!=AccessPoint.NAP_SNAP) && (apType!=AccessPoint.NAP_IAP))
{
- result = _getPropertyApn(NETWORK_ACCESS_V, apn.getNapId());
+ apType = APP_DEFAULT_APN_NOT_SPECIFIED;
+ apId = APP_DEFAULT_APN_NOT_SPECIFIED;
}
- else
- {
- result = _getPropertyApn(NETWORK_ACCESS_V, APP_DEFAULT_APN_NOT_SPECIFIED);
- }
+
}
- else
- {
- result = _getPropertyApn(NETWORK_ACCESS_V, APP_DEFAULT_APN_NOT_SPECIFIED);
- }
+
}
- else
- {
- result = _getPropertyApn(NETWORK_ACCESS_V, APP_DEFAULT_APN_NOT_SPECIFIED);
- }
+ result = _getPropertyApn(NETWORK_ACCESS_V, apId,apType);
}
catch (Exception e)
{
Logger.LOG(Logger.ESOCKET, Logger.EInfo,"MobilInfoProperties :: getSuiteUid exception ");
- result = _getPropertyApn(NETWORK_ACCESS_V, APP_DEFAULT_APN_NOT_SPECIFIED);
+ result = _getPropertyApn(NETWORK_ACCESS_V, apId,apType);
}
return result;
}
@@ -202,6 +201,6 @@
}
private native String _getProperty(int value);
- private static native String _getPropertyApn(int property, int aAppDefaultApn);
+ private static native String _getPropertyApn(int property, int aAppDefaultApn, int apType);
}
\ No newline at end of file