diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 2a47b42c6b335..56a0104a6f336 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -148,7 +148,7 @@ public final class Settings { @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_WIFI_SETTINGS = "android.settings.WIFI_SETTINGS"; - + /** * Activity Action: Show settings to allow configuration of a static IP * address for Wi-Fi. @@ -305,7 +305,7 @@ public final class Settings { @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_QUICK_LAUNCH_SETTINGS = "android.settings.QUICK_LAUNCH_SETTINGS"; - + /** * Activity Action: Show settings to manage installed applications. *
@@ -319,7 +319,7 @@ public final class Settings { @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS = "android.settings.MANAGE_APPLICATIONS_SETTINGS"; - + /** * Activity Action: Show settings for system update functionality. *
@@ -329,7 +329,7 @@ public final class Settings { * Input: Nothing. *
* Output: Nothing. - * + * * @hide */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) @@ -349,7 +349,7 @@ public final class Settings { @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_SYNC_SETTINGS = "android.settings.SYNC_SETTINGS"; - + /** * Activity Action: Show settings for selecting the network operator. *
@@ -404,7 +404,7 @@ public final class Settings {
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_MEMORY_CARD_SETTINGS =
"android.settings.MEMORY_CARD_SETTINGS";
-
+
// End of Intent actions for Settings
private static final String JID_RESOURCE_PREFIX = "android";
@@ -495,7 +495,7 @@ public final class Settings {
public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
private static volatile NameValueCache mNameValueCache = null;
-
+
private static final HashSet
@@ -1115,12 +1115,12 @@ public final class Settings {
* Note: This is a one-off setting that will be removed in the future
* when there is profile support. For this reason, it is kept hidden
* from the public APIs.
- *
+ *
* @hide
*/
- public static final String NOTIFICATIONS_USE_RING_VOLUME =
+ public static final String NOTIFICATIONS_USE_RING_VOLUME =
"notifications_use_ring_volume";
-
+
/**
* The mapping of stream type (integer) to its setting.
*/
@@ -1188,7 +1188,7 @@ public final class Settings {
* feature converts two spaces to a "." and space.
*/
public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate";
-
+
/**
* Setting to showing password characters in text editors. 1 = On, 0 = Off
*/
@@ -1270,13 +1270,13 @@ public final class Settings {
* boolean (1 or 0).
*/
public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled";
-
+
/**
* Whether the haptic feedback (long presses, ...) are enabled. The value is
* boolean (1 or 0).
*/
public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
-
+
// Settings moved to Settings.Secure
/**
@@ -1321,7 +1321,7 @@ public final class Settings {
*/
@Deprecated
public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
-
+
/**
* @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED}
* instead
@@ -1334,7 +1334,7 @@ public final class Settings {
*/
@Deprecated
public static final String LOGGING_ID = Secure.LOGGING_ID;
-
+
/**
* @deprecated Use {@link android.provider.Settings.Secure#NETWORK_PREFERENCE} instead
*/
@@ -1374,7 +1374,7 @@ public final class Settings {
*/
@Deprecated
public static final String USB_MASS_STORAGE_ENABLED = Secure.USB_MASS_STORAGE_ENABLED;
-
+
/**
* @deprecated Use {@link android.provider.Settings.Secure#USE_GOOGLE_MAIL} instead
*/
@@ -1412,7 +1412,7 @@ public final class Settings {
@Deprecated
public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
-
+
/**
* @deprecated Use {@link android.provider.Settings.Secure#WIFI_NUM_OPEN_NETWORKS_KEPT}
* instead
@@ -1448,7 +1448,7 @@ public final class Settings {
@Deprecated
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS;
-
+
/**
* @deprecated Use
* {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead
@@ -1824,19 +1824,19 @@ public final class Settings {
* Whether the device has been provisioned (0 = false, 1 = true)
*/
public static final String DEVICE_PROVISIONED = "device_provisioned";
-
+
/**
* List of input methods that are currently enabled. This is a string
* containing the IDs of all enabled input methods, each ID separated
* by ':'.
*/
public static final String ENABLED_INPUT_METHODS = "enabled_input_methods";
-
+
/**
* Host name and port for a user-selected proxy.
*/
public static final String HTTP_PROXY = "http_proxy";
-
+
/**
* Whether the package installer should allow installation of apps downloaded from
* sources other than the Android Market (vending machine).
@@ -1845,12 +1845,12 @@ public final class Settings {
* 0 = only allow installing from the Android Market
*/
public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
-
+
/**
* Comma-separated list of location providers that activities may access.
*/
public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
-
+
/**
* The Logging ID (a unique 64-bit value) as a hex string.
* Used as a pseudonymous identifier for logging.
@@ -1872,19 +1872,19 @@ public final class Settings {
* connectivity service should touch this.
*/
public static final String NETWORK_PREFERENCE = "network_preference";
-
- /**
+
+ /**
*/
public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
-
- /**
+
+ /**
*/
public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
-
- /**
+
+ /**
*/
public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
-
+
/**
* Settings classname to launch when Settings is clicked from All
* Applications. Needed because of user testing between the old
@@ -1892,18 +1892,18 @@ public final class Settings {
*/
// TODO: 881807
public static final String SETTINGS_CLASSNAME = "settings_classname";
-
+
/**
* USB Mass Storage Enabled
*/
public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
-
+
/**
* If this setting is set (to anything), then all references
* to Gmail on the device must change to Google Mail.
*/
public static final String USE_GOOGLE_MAIL = "use_google_mail";
-
+
/**
* If accessibility is enabled.
*/
@@ -1926,64 +1926,64 @@ public final class Settings {
*/
public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
"wifi_networks_available_notification_on";
-
+
/**
* Delay (in seconds) before repeating the Wi-Fi networks available notification.
* Connecting to a network will reset the timer.
*/
public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
"wifi_networks_available_repeat_delay";
-
+
/**
* The number of radio channels that are allowed in the local
* 802.11 regulatory domain.
* @hide
*/
public static final String WIFI_NUM_ALLOWED_CHANNELS = "wifi_num_allowed_channels";
-
+
/**
* When the number of open networks exceeds this number, the
* least-recently-used excess networks will be removed.
*/
public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
-
+
/**
* Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this.
*/
public static final String WIFI_ON = "wifi_on";
-
+
/**
* The acceptable packet loss percentage (range 0 - 100) before trying
* another AP on the same network.
*/
public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
"wifi_watchdog_acceptable_packet_loss_percentage";
-
+
/**
* The number of access points required for a network in order for the
* watchdog to monitor it.
*/
public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
-
+
/**
* The delay between background checks.
*/
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
"wifi_watchdog_background_check_delay_ms";
-
+
/**
* Whether the Wi-Fi watchdog is enabled for background checking even
* after it thinks the user has connected to a good access point.
*/
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
"wifi_watchdog_background_check_enabled";
-
+
/**
* The timeout for a background ping
*/
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
"wifi_watchdog_background_check_timeout_ms";
-
+
/**
* The number of initial pings to perform that *may* be ignored if they
* fail. Again, if these fail, they will *not* be used in packet loss
@@ -1992,7 +1992,7 @@ public final class Settings {
*/
public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
"wifi_watchdog_initial_ignored_ping_count";
-
+
/**
* The maximum number of access points (per network) to attempt to test.
* If this number is reached, the watchdog will no longer monitor the
@@ -2000,7 +2000,7 @@ public final class Settings {
* networks containing multiple APs whose DNS does not respond to pings.
*/
public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
-
+
/**
* Whether the Wi-Fi watchdog is enabled.
*/
@@ -2015,24 +2015,24 @@ public final class Settings {
* The number of pings to test if an access point is a good connection.
*/
public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
-
+
/**
* The delay between pings.
*/
public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
-
+
/**
* The timeout per ping.
*/
public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
-
+
/**
* The maximum number of times we will retry a connection to an access
* point for which we have failed in acquiring an IP address from DHCP.
* A value of N means that we will make N+1 connection attempts in all.
*/
public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
-
+
/**
* Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile
* data connectivity to be established after a disconnect from Wi-Fi.
@@ -2062,21 +2062,14 @@ public final class Settings {
public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode";
/**
- * represents current active phone class
- * 1 = GSM-Phone, 0 = CDMA-Phone
- * @hide
- */
- public static final String CURRENT_ACTIVE_PHONE = "current_active_phone";
-
- /**
- * The preferred network mode 7 = Global
- * 6 = EvDo only
- * 5 = CDMA w/o EvDo
- * 4 = CDMA / EvDo auto
- * 3 = GSM / WCDMA auto
- * 2 = WCDMA only
- * 1 = GSM only
- * 0 = GSM / WCDMA preferred
+ * The preferred network mode 7 = Global
+ * 6 = EvDo only
+ * 5 = CDMA w/o EvDo
+ * 4 = CDMA / EvDo auto
+ * 3 = GSM / WCDMA auto
+ * 2 = WCDMA only
+ * 1 = GSM only
+ * 0 = GSM / WCDMA preferred
* @hide
*/
public static final String PREFERRED_NETWORK_MODE =
@@ -2142,7 +2135,7 @@ public final class Settings {
allowedProviders.startsWith(provider + ",") ||
allowedProviders.endsWith("," + provider));
}
- return false;
+ return false;
}
/**
@@ -2166,7 +2159,7 @@ public final class Settings {
putString(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider);
}
}
-
+
/**
* Gservices settings, containing the network names for Google's
* various services. This table holds simple name/addr pairs.
@@ -2294,7 +2287,7 @@ public final class Settings {
* Event tags from the kernel event log to upload during checkin.
*/
public static final String CHECKIN_EVENTS = "checkin_events";
-
+
/**
* Event tags for list of services to upload during checkin.
*/
@@ -2984,7 +2977,7 @@ public final class Settings {
public static final String BATTERY_DISCHARGE_DURATION_THRESHOLD =
"battery_discharge_duration_threshold";
public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
-
+
/**
* An email address that anr bugreports should be sent to.
*/
@@ -3128,7 +3121,7 @@ public final class Settings {
/**
* Add a new bookmark to the system.
- *
+ *
* @param cr The ContentResolver to query.
* @param intent The desired target of the bookmark.
* @param title Bookmark title that is shown to the user; null if none
@@ -3193,7 +3186,7 @@ public final class Settings {
/**
* Return the title as it should be displayed to the user. This takes
* care of localizing bookmarks that point to activities.
- *
+ *
* @param context A context.
* @param cursor A cursor pointing to the row whose title should be
* returned. The cursor must contain at least the {@link #TITLE}
@@ -3208,24 +3201,24 @@ public final class Settings {
throw new IllegalArgumentException(
"The cursor must contain the TITLE and INTENT columns.");
}
-
+
String title = cursor.getString(titleColumn);
if (!TextUtils.isEmpty(title)) {
return title;
}
-
+
String intentUri = cursor.getString(intentColumn);
if (TextUtils.isEmpty(intentUri)) {
return "";
}
-
+
Intent intent;
try {
intent = Intent.getIntent(intentUri);
} catch (URISyntaxException e) {
return "";
}
-
+
PackageManager packageManager = context.getPackageManager();
ResolveInfo info = packageManager.resolveActivity(intent, 0);
return info != null ? info.loadLabel(packageManager) : "";
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index b9d567c76169a..8df65f96db002 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -65,7 +65,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
private static final String TAG = "SettingsProvider";
private static final String DATABASE_NAME = "settings.db";
private static final int DATABASE_VERSION = 34;
-
+
private Context mContext;
public DatabaseHelper(Context context) {
@@ -81,7 +81,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
");");
db.execSQL("CREATE INDEX secureIndex1 ON secure (name);");
}
-
+
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE system (" +
@@ -134,7 +134,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) {
Log.w(TAG, "Upgrading settings database from version " + oldVersion + " to "
+ currentVersion);
-
+
int upgradeVersion = oldVersion;
// Pattern for upgrade blocks:
@@ -143,7 +143,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
// .. your upgrade logic..
// upgradeVersion = [the DATABASE_VERSION you set]
// }
-
+
if (upgradeVersion == 20) {
/*
* Version 21 is part of the volume control refresh. There is no
@@ -156,7 +156,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
upgradeVersion = 21;
}
-
+
if (upgradeVersion < 22) {
upgradeVersion = 22;
// Upgrade the lock gesture storage location and format
@@ -186,7 +186,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
}
upgradeVersion = 24;
}
-
+
if (upgradeVersion == 24) {
db.beginTransaction();
try {
@@ -213,7 +213,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
}
upgradeVersion = 26;
}
-
+
if (upgradeVersion == 26) {
// This introduces the new secure settings table.
db.beginTransaction();
@@ -225,12 +225,12 @@ class DatabaseHelper extends SQLiteOpenHelper {
}
upgradeVersion = 27;
}
-
+
if (upgradeVersion == 27) {
// Copy settings values from 'system' to 'secure' and delete them from 'system'
SQLiteStatement insertStmt = null;
SQLiteStatement deleteStmt = null;
-
+
db.beginTransaction();
try {
insertStmt =
@@ -271,11 +271,11 @@ class DatabaseHelper extends SQLiteOpenHelper {
Settings.Secure.WIFI_WATCHDOG_PING_DELAY_MS,
Settings.Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS,
};
-
+
for (String setting : settingsToMove) {
insertStmt.bindString(1, setting);
insertStmt.execute();
-
+
deleteStmt.bindString(1, setting);
deleteStmt.execute();
}
@@ -291,7 +291,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
}
upgradeVersion = 28;
}
-
+
if (upgradeVersion == 28 || upgradeVersion == 29) {
// Note: The upgrade to 28 was flawed since it didn't delete the old
// setting first before inserting. Combining 28 and 29 with the
@@ -313,10 +313,10 @@ class DatabaseHelper extends SQLiteOpenHelper {
} finally {
db.endTransaction();
}
-
+
upgradeVersion = 30;
}
-
+
if (upgradeVersion == 30) {
/*
* Upgrade 31 clears the title for all quick launch shortcuts so the
@@ -373,7 +373,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
}
upgradeVersion = 33;
}
-
+
if (upgradeVersion == 33) {
// Set the default zoom controls to: tap-twice to bring up +/-
db.beginTransaction();
@@ -405,7 +405,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
}
private void upgradeLockPatternLocation(SQLiteDatabase db) {
- Cursor c = db.query("system", new String[] {"_id", "value"}, "name='lock_pattern'",
+ Cursor c = db.query("system", new String[] {"_id", "value"}, "name='lock_pattern'",
null, null, null, null);
if (c.getCount() > 0) {
c.moveToFirst();
@@ -414,7 +414,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
// Convert lock pattern
try {
LockPatternUtils lpu = new LockPatternUtils(mContext.getContentResolver());
- List Requires Permission:
+ *
+ * Requires Permission:
* (@link android.Manifest.permission#ACCESS_COARSE_UPDATES}
*/
public List"UNKNOWN" "ABSENT" "PIN_REQUIRED"
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index 3f8d40c7ff360..03f7f986da057 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -52,6 +52,7 @@ import com.android.internal.telephony.PhoneProxy;
import com.android.internal.telephony.PhoneSubInfo;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.TelephonyIntents;
+import com.android.internal.telephony.TelephonyProperties;
import java.util.ArrayList;
import java.util.List;
@@ -126,8 +127,8 @@ public class CDMAPhone extends PhoneBase {
//Change the system setting
- Settings.Secure.putInt(mContext.getContentResolver(),
- Settings.Secure.CURRENT_ACTIVE_PHONE, RILConstants.CDMA_PHONE);
+ SystemProperties.set(TelephonyProperties.CURRENT_ACTIVE_PHONE,
+ new Integer(RILConstants.CDMA_PHONE).toString());
}
public void dispose() {
diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
index 4fe1ea0d32011..3459dcdf23865 100755
--- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
@@ -68,6 +68,7 @@ import com.android.internal.telephony.PhoneNotifier;
import com.android.internal.telephony.PhoneProxy;
import com.android.internal.telephony.PhoneSubInfo;
import com.android.internal.telephony.RILConstants;
+import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.gsm.stk.StkService;
import com.android.internal.telephony.test.SimulatedRadioControl;
import com.android.internal.telephony.IccVmNotSupportedException;
@@ -204,9 +205,9 @@ public class GSMPhone extends PhoneBase {
}
}
- //Change the system setting
- Settings.Secure.putInt(mContext.getContentResolver(),
- Settings.Secure.CURRENT_ACTIVE_PHONE, RILConstants.GSM_PHONE);
+ //Change the system property
+ SystemProperties.set(TelephonyProperties.CURRENT_ACTIVE_PHONE,
+ new Integer(RILConstants.GSM_PHONE).toString());
}
public void dispose() {
@@ -837,21 +838,21 @@ public class GSMPhone extends PhoneBase {
private void storeVoiceMailNumber(String number) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
SharedPreferences.Editor editor = sp.edit();
- editor.putString(VM_NUMBER, number);
+ editor.putString(VM_NUMBER, number);
editor.commit();
setVmSimImsi(getSubscriberId());
}
public String getVoiceMailNumber() {
// Read from the SIM. If its null, try reading from the shared preference area.
- String number = mSIMRecords.getVoiceMailNumber();
+ String number = mSIMRecords.getVoiceMailNumber();
if (TextUtils.isEmpty(number)) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
number = sp.getString(VM_NUMBER, null);
- }
+ }
return number;
}
-
+
private String getVmSimImsi() {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
return sp.getString(VM_SIM_IMSI, null);
@@ -863,7 +864,7 @@ public class GSMPhone extends PhoneBase {
editor.putString(VM_SIM_IMSI, imsi);
editor.commit();
}
-
+
public String getVoiceMailAlphaTag() {
String ret;
@@ -932,13 +933,13 @@ public class GSMPhone extends PhoneBase {
public void setVoiceMailNumber(String alphaTag,
String voiceMailNumber,
Message onComplete) {
-
- Message resp;
+
+ Message resp;
mVmNumber = voiceMailNumber;
resp = h.obtainMessage(EVENT_SET_VM_NUMBER_DONE, 0, 0, onComplete);
mSIMRecords.setVoiceMailNumber(alphaTag, mVmNumber, resp);
}
-
+
private boolean isValidCommandInterfaceCFReason (int commandInterfaceCFReason) {
switch (commandInterfaceCFReason) {
case CF_REASON_UNCONDITIONAL:
@@ -1317,11 +1318,11 @@ public class GSMPhone extends PhoneBase {
case EVENT_SIM_RECORDS_LOADED:
updateCurrentCarrierInProvider();
-
+
// Check if this is a different SIM than the previous one. If so unset the
// voice mail number.
String imsi = getVmSimImsi();
- if (imsi != null && !getSubscriberId().equals(imsi)) {
+ if (imsi != null && !getSubscriberId().equals(imsi)) {
storeVoiceMailNumber(null);
setVmSimImsi(null);
}
@@ -1403,7 +1404,7 @@ public class GSMPhone extends PhoneBase {
onComplete.sendToTarget();
}
break;
-
+
case EVENT_SET_VM_NUMBER_DONE:
ar = (AsyncResult)msg.obj;
if (IccVmNotSupportedException.class.isInstance(ar.exception)) {
@@ -1417,7 +1418,7 @@ public class GSMPhone extends PhoneBase {
}
break;
-
+
case EVENT_GET_CALL_FORWARD_DONE:
ar = (AsyncResult)msg.obj;
if (ar.exception == null) {
@@ -1460,7 +1461,7 @@ public class GSMPhone extends PhoneBase {
/**
* Sets the "current" field in the telephony provider according to the SIM's operator
- *
+ *
* @return true for success; false otherwise.
*/
boolean updateCurrentCarrierInProvider() {