Different Mobile Network Settings screen for Nova multi-profile SIMs.

Simplify the Mobile Network Settings screen regardless CDMA or GSM activeness
to provide a unified experience for Nova users.

For more details, please refer to b/15854628.

Bug: 15854628
Change-Id: Ieba04eff49824aa09a056cd4fb142cbd268207a3
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 70847fe..dad9cee 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -69,9 +69,11 @@
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * Implementation of the ITelephony interface.
@@ -121,6 +123,12 @@
     MainThreadHandler mMainThreadHandler;
 
     /**
+     * Indicates if Android should display a simplified Mobile Network Settings UI in a specific
+     * subscription.
+     */
+    Set<Long> mSimplifiedNetworkSettings;
+
+    /**
      * A request object to use for transmitting data to an ICC.
      */
     private static final class IccAPDUArgument {
@@ -556,6 +564,7 @@
         mApp = app;
         mPhone = phone;
         mCM = PhoneGlobals.getInstance().mCM;
+        mSimplifiedNetworkSettings = new HashSet<Long>();
         mAppOps = (AppOpsManager)app.getSystemService(Context.APP_OPS_SERVICE);
         mMainThreadHandler = new MainThreadHandler();
         publish();
@@ -1709,4 +1718,20 @@
         }
         return TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS;
     }
+
+    @Override
+    public void enableSimplifiedNetworkSettings(long subId, boolean enable) {
+        enforceModifyPermission();
+        if (enable) {
+            mSimplifiedNetworkSettings.add(subId);
+        } else {
+            mSimplifiedNetworkSettings.remove(subId);
+        }
+    }
+
+    @Override
+    public boolean getSimplifiedNetworkSettingsEnabled(long subId) {
+        enforceReadPermission();
+        return mSimplifiedNetworkSettings.contains(subId);
+    }
 }