Add a global override for VoLTE calls (which leaves user setting in place)
Etan Cohen [Mon, 24 Nov 2014 19:18:33 +0000 (11:18 -0800)]
Bug: 18446228
Change-Id: I77e0047d97be6fb4a81e4e25e0404e2cdcb16644

src/java/com/android/ims/ImsManager.java

index 50d3a45..805d0e9 100644 (file)
@@ -182,11 +182,16 @@ public class ImsManager {
             return true;
         }
 
+        boolean disabledByGlobalSetting = android.provider.Settings.Global.getInt(
+                context.getContentResolver(),
+                android.provider.Settings.Global.VOLTE_FEATURE_DISABLED, 0) == 1;
+
         return
                 context.getResources().getBoolean(
                         com.android.internal.R.bool.config_device_volte_available) &&
                 context.getResources().getBoolean(
-                        com.android.internal.R.bool.config_carrier_volte_available);
+                        com.android.internal.R.bool.config_carrier_volte_available) &&
+                !disabledByGlobalSetting;
     }
 
     /**