OSDN Git Service

SimSettings: Make provisioning optional even if qti-telephony is present
authorRicardo Cerqueira <ricardo@cyngn.com>
Thu, 28 Jul 2016 11:29:40 +0000 (12:29 +0100)
committerRicardo Cerqueira <ricardo@cyngn.com>
Thu, 28 Jul 2016 11:34:47 +0000 (12:34 +0100)
Current code assumes the manual provisioning options should come
up if the qti-telephony blob is present. Don't make that assumption.

Change-Id: I5e4f28b628e3fe3fe9e506631e92c85103e87ccf

res/values/config.xml
src/com/android/settings/sim/SimSettings.java

index f463615..a2ad7d0 100755 (executable)
          3 = right side
     -->
     <integer name="config_fingerprintSensorLocation">0</integer>
+
+    <!-- Does the device allow for manual subscription provisioning? Only works for multi-sim devices,
+         and currently depends on QC's proprietary telephony stack -->
+    <bool name="config_enableManualSubProvisioning">true</bool>
 </resources>
index 88ed36f..b97ee03 100644 (file)
@@ -512,7 +512,8 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
             // Disable manual provisioning option to user when
             // device is in Airplane mode. Hide it if the extphone framework
             // is not present, as the operation relies on said framework.
-            if (mExtTelephony == null) {
+            if (mExtTelephony == null ||
+                   !mContext.getResources().getBoolean(R.bool.config_enableManualSubProvisioning)) {
                 mSwitch.setVisibility(View.GONE);
             } else {
                 mSwitch.setVisibility(View.VISIBLE);