Merge "Use the SSID of the network in the no internet dialog"
diff --git a/src/com/android/settings/ApnSettings.java b/src/com/android/settings/ApnSettings.java
index d554301..35d2b9f 100755
--- a/src/com/android/settings/ApnSettings.java
+++ b/src/com/android/settings/ApnSettings.java
@@ -44,6 +44,7 @@
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
+import android.telephony.data.ApnSetting;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.Menu;
@@ -56,7 +57,7 @@
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.telephony.dataconnection.ApnSetting;
+import com.android.internal.telephony.dataconnection.ApnSettingUtils;
 import com.android.internal.telephony.uicc.IccRecords;
 import com.android.internal.telephony.uicc.UiccController;
 import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
@@ -330,7 +331,8 @@
                               ArrayList<ApnPreference> mvnoList, IccRecords r, String mvnoType,
                               String mvnoMatchData) {
         if (r != null && !TextUtils.isEmpty(mvnoType) && !TextUtils.isEmpty(mvnoMatchData)) {
-            if (ApnSetting.mvnoMatches(r, mvnoType, mvnoMatchData)) {
+            if (ApnSettingUtils.mvnoMatches(r, ApnSetting.getMvnoTypeIntFromString(mvnoType),
+                    mvnoMatchData)) {
                 mvnoList.add(pref);
                 // Since adding to mvno list, save mvno info
                 mMvnoType = mvnoType;
diff --git a/src/com/android/settings/ResetNetworkConfirm.java b/src/com/android/settings/ResetNetworkConfirm.java
index f70d3c2..7131e94 100644
--- a/src/com/android/settings/ResetNetworkConfirm.java
+++ b/src/com/android/settings/ResetNetworkConfirm.java
@@ -105,7 +105,8 @@
                 }
             }
 
-            ImsManager.factoryReset(context);
+            ImsManager.getInstance(context,
+                     SubscriptionManager.getPhoneId(mSubId)).factoryReset();
             restoreDefaultApn(context);
 
             Toast.makeText(context, R.string.reset_network_complete_toast, Toast.LENGTH_SHORT)
diff --git a/src/com/android/settings/SetFullBackupPassword.java b/src/com/android/settings/SetFullBackupPassword.java
index 4ab096b..b6a03d5 100644
--- a/src/com/android/settings/SetFullBackupPassword.java
+++ b/src/com/android/settings/SetFullBackupPassword.java
@@ -21,6 +21,7 @@
 import android.os.Bundle;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.text.TextUtils;
 import android.util.Log;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -45,7 +46,7 @@
 
                 if (!newPw.equals(confirmPw)) {
                     // Mismatch between new pw and its confirmation re-entry
-Log.i(TAG, "password mismatch");
+                    Log.i(TAG, "password mismatch");
                     Toast.makeText(SetFullBackupPassword.this,
                             R.string.local_backup_password_toast_confirmation_mismatch,
                             Toast.LENGTH_LONG).show();
@@ -56,14 +57,14 @@
 
                 if (setBackupPassword(curPw, newPw)) {
                     // success
-Log.i(TAG, "password set successfully");
+                    Log.i(TAG, "password set successfully");
                     Toast.makeText(SetFullBackupPassword.this,
                             R.string.local_backup_password_toast_success,
                             Toast.LENGTH_LONG).show();
                     finish();
                 } else {
                     // failure -- bad existing pw, usually
-Log.i(TAG, "failure; password mismatch?");
+                    Log.i(TAG, "failure; password mismatch?");
                     Toast.makeText(SetFullBackupPassword.this,
                             R.string.local_backup_password_toast_validation_failure,
                             Toast.LENGTH_LONG).show();
@@ -96,6 +97,11 @@
     }
 
     private boolean setBackupPassword(String currentPw, String newPw) {
+        // new password can't be empty
+        if (TextUtils.isEmpty(newPw)) {
+            return false;
+        }
+
         try {
             return mBackupManager.setBackupPassword(currentPw, newPw);
         } catch (RemoteException e) {
diff --git a/src/com/android/settings/wifi/WifiSummaryUpdater.java b/src/com/android/settings/wifi/WifiSummaryUpdater.java
index 2c56d08..c61d9ba 100644
--- a/src/com/android/settings/wifi/WifiSummaryUpdater.java
+++ b/src/com/android/settings/wifi/WifiSummaryUpdater.java
@@ -66,6 +66,7 @@
     @Override
     public void register(boolean register) {
         if (register) {
+            notifyChangeIfNeeded();
             mContext.registerReceiver(mReceiver, INTENT_FILTER);
         } else {
             mContext.unregisterReceiver(mReceiver);