1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008 - 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
75 |
75 |
76 private static final String TIMEFORMAT = "com.nokia.mid.timeformat"; |
76 private static final String TIMEFORMAT = "com.nokia.mid.timeformat"; |
77 |
77 |
78 private static final String NETWORKSTATUS = "com.nokia.mid.networkstatus"; |
78 private static final String NETWORKSTATUS = "com.nokia.mid.networkstatus"; |
79 |
79 |
|
80 static final String SERVICE_PROVIDER_NAME = "com.nokia.mid.spn"; |
|
81 |
|
82 static final String OPERATOR_NAME = "com.nokia.mid.ons"; |
|
83 |
80 private static final int APP_DEFAULT_APN_NOT_SPECIFIED = -1; |
84 private static final int APP_DEFAULT_APN_NOT_SPECIFIED = -1; |
81 |
85 |
82 // Constants associated with the strings |
86 // Constants associated with the strings |
83 private static final int NETWORK_ACCESS_V = 1; |
87 private static final int NETWORK_ACCESS_V = 1; |
84 |
88 |
108 |
112 |
109 private static final int TIMEFORMAT_V = 14; |
113 private static final int TIMEFORMAT_V = 14; |
110 |
114 |
111 private static final int NETWORKSTATUS_V = 15; |
115 private static final int NETWORKSTATUS_V = 15; |
112 |
116 |
|
117 private static final int SERVICE_PROVIDER_NAME_V = 16; |
|
118 |
|
119 private static final int OPERATOR_NAME_V = 17; |
|
120 |
113 private static Hashtable iPropertyKeys; |
121 private static Hashtable iPropertyKeys; |
114 |
122 |
115 static |
123 static |
116 { |
124 { |
117 iPropertyKeys = new Hashtable(); |
125 iPropertyKeys = new Hashtable(); |
118 iPropertyKeys.put(NETWORK_ACCESS, new Integer(NETWORK_ACCESS_V)); |
126 iPropertyKeys.put(NETWORK_ACCESS, new Integer(NETWORK_ACCESS_V)); |
119 iPropertyKeys.put(BATTERY_LEVEL, new Integer(BATTERY_LEVEL_V)); |
127 iPropertyKeys.put(BATTERY_LEVEL, new Integer(BATTERY_LEVEL_V)); |
120 iPropertyKeys.put(COUNTRY_CODE, new Integer(COUNTRY_CODE_V)); |
128 iPropertyKeys.put(COUNTRY_CODE, new Integer(COUNTRY_CODE_V)); |
121 iPropertyKeys.put(IMEI, new Integer(IMEI_V)); |
129 iPropertyKeys.put(IMEI, new Integer(IMEI_V)); |
122 iPropertyKeys.put(IMSI, new Integer(IMSI_V)); |
130 iPropertyKeys.put(IMSI, new Integer(IMSI_V)); |
123 iPropertyKeys.put(NETWORK_AVAILABILITY, new Integer(NETWORK_AVAILABILITY_V)); |
131 iPropertyKeys.put(NETWORK_AVAILABILITY, new Integer(NETWORK_AVAILABILITY_V)); |
124 iPropertyKeys.put(NETWORK_ID, new Integer(NETWORK_ID_V)); |
132 iPropertyKeys.put(NETWORK_ID, new Integer(NETWORK_ID_V)); |
125 iPropertyKeys.put(NETWORK_SIGNAL, new Integer(NETWORK_SIGNAL_V)); |
133 iPropertyKeys.put(NETWORK_SIGNAL, new Integer(NETWORK_SIGNAL_V)); |
126 iPropertyKeys.put(EMAIL_RECIEVE_SETTINGS, new Integer(EMAIL_RECIEVE_SETTINGS_V)); |
134 iPropertyKeys.put(EMAIL_RECIEVE_SETTINGS, new Integer(EMAIL_RECIEVE_SETTINGS_V)); |
127 iPropertyKeys.put(EMAIL_SEND_SETTINGS, new Integer(EMAIL_SEND_SETTINGS_V)); |
135 iPropertyKeys.put(EMAIL_SEND_SETTINGS, new Integer(EMAIL_SEND_SETTINGS_V)); |
128 iPropertyKeys.put(CELLID, new Integer(CELLID_V)); |
136 iPropertyKeys.put(CELLID, new Integer(CELLID_V)); |
129 iPropertyKeys.put(MSISDN, new Integer(MSISDN_V)); |
137 iPropertyKeys.put(MSISDN, new Integer(MSISDN_V)); |
130 iPropertyKeys.put(DATEFORMAT, new Integer(DATEFORMAT_V)); |
138 iPropertyKeys.put(DATEFORMAT, new Integer(DATEFORMAT_V)); |
131 iPropertyKeys.put(TIMEFORMAT, new Integer(TIMEFORMAT_V)); |
139 iPropertyKeys.put(TIMEFORMAT, new Integer(TIMEFORMAT_V)); |
132 iPropertyKeys.put(NETWORKSTATUS, new Integer(NETWORKSTATUS_V)); |
140 iPropertyKeys.put(NETWORKSTATUS, new Integer(NETWORKSTATUS_V)); |
|
141 iPropertyKeys.put(SERVICE_PROVIDER_NAME, new Integer(SERVICE_PROVIDER_NAME_V)); |
|
142 iPropertyKeys.put(OPERATOR_NAME, new Integer(OPERATOR_NAME_V)); |
133 } |
143 } |
134 |
144 |
135 public String getProperty(String aKey) |
145 public String getProperty(String aKey) |
136 { |
146 { |
137 // enforce security |
147 // enforce security |