Loading src/com/android/settings/location/AppLocationPermissionPreferenceController.java +1 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ public class AppLocationPermissionPreferenceController extends @Override public boolean isAvailable() { return Settings.Global.getInt(mContext.getContentResolver(), android.provider.Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, 1) == 1; Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, 1) == 1; } } src/com/android/settings/network/telephony/CarrierPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ public class CarrierPreferenceController extends BasePreferenceController { public CarrierPreferenceController(Context context, String key) { super(context, key); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; mCarrierConfigManager = new CarrierConfigManager(context); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; } Loading src/com/android/settings/network/telephony/MobileDataPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class MobileDataPreferenceController extends TogglePreferenceController public MobileDataPreferenceController(Context context, String key) { super(context, key); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; mSubscriptionManager = context.getSystemService(SubscriptionManager.class); mDataContentObserver = new DataContentObserver(new Handler(Looper.getMainLooper())); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; Loading src/com/android/settings/network/telephony/MobileNetworkUtils.java +8 −8 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public class MobileNetworkUtils { * Returns true if Wifi calling is enabled for at least one phone. */ public static boolean isWifiCallingEnabled(Context context) { int phoneCount = TelephonyManager.from(context).getPhoneCount(); int phoneCount = context.getSystemService(TelephonyManager.class).getPhoneCount(); for (int i = 0; i < phoneCount; i++) { if (isWifiCallingEnabled(context, i)) { return true; Loading Loading @@ -218,7 +218,7 @@ public class MobileNetworkUtils { */ public static void setMobileDataEnabled(Context context, int subId, boolean enabled, boolean disableOtherSubscriptions) { final TelephonyManager telephonyManager = TelephonyManager.from(context) final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) .createForSubscriptionId(subId); final SubscriptionManager subscriptionManager = context.getSystemService( SubscriptionManager.class); Loading @@ -230,7 +230,7 @@ public class MobileNetworkUtils { if (subInfoList != null) { for (SubscriptionInfo subInfo : subInfoList) { if (subInfo.getSubscriptionId() != subId) { TelephonyManager.from(context).createForSubscriptionId( context.getSystemService(TelephonyManager.class).createForSubscriptionId( subInfo.getSubscriptionId()).setDataEnabled(false); } } Loading @@ -245,7 +245,7 @@ public class MobileNetworkUtils { if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) { return false; } final TelephonyManager telephonyManager = TelephonyManager.from(context) final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) .createForSubscriptionId(subId); final PersistableBundle carrierConfig = context.getSystemService( CarrierConfigManager.class).getConfigForSubId(subId); Loading Loading @@ -307,7 +307,7 @@ public class MobileNetworkUtils { } private static boolean isGsmBasicOptions(Context context, int subId) { final TelephonyManager telephonyManager = TelephonyManager.from(context) final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) .createForSubscriptionId(subId); final PersistableBundle carrierConfig = context.getSystemService( CarrierConfigManager.class).getConfigForSubId(subId); Loading @@ -329,7 +329,7 @@ public class MobileNetworkUtils { * settings */ public static boolean isWorldMode(Context context, int subId) { final TelephonyManager telephonyManager = TelephonyManager.from(context) final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) .createForSubscriptionId(subId); boolean worldModeOn = false; final String configString = context.getString(R.string.config_world_mode); Loading Loading @@ -404,7 +404,7 @@ public class MobileNetworkUtils { */ public static boolean isTdscdmaSupported(Context context, int subId) { return isTdscdmaSupported(context, TelephonyManager.from(context).createForSubscriptionId(subId)); context.getSystemService(TelephonyManager.class).createForSubscriptionId(subId)); } //TODO(b/117651939): move it to telephony Loading src/com/android/settings/network/telephony/RoamingPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class RoamingPreferenceController extends TogglePreferenceController impl public RoamingPreferenceController(Context context, String key) { super(context, key); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; mCarrierConfigManager = context.getSystemService(CarrierConfigManager.class); mDataContentObserver = new DataContentObserver(new Handler(Looper.getMainLooper())); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; Loading Loading
src/com/android/settings/location/AppLocationPermissionPreferenceController.java +1 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ public class AppLocationPermissionPreferenceController extends @Override public boolean isAvailable() { return Settings.Global.getInt(mContext.getContentResolver(), android.provider.Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, 1) == 1; Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, 1) == 1; } }
src/com/android/settings/network/telephony/CarrierPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ public class CarrierPreferenceController extends BasePreferenceController { public CarrierPreferenceController(Context context, String key) { super(context, key); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; mCarrierConfigManager = new CarrierConfigManager(context); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; } Loading
src/com/android/settings/network/telephony/MobileDataPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class MobileDataPreferenceController extends TogglePreferenceController public MobileDataPreferenceController(Context context, String key) { super(context, key); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; mSubscriptionManager = context.getSystemService(SubscriptionManager.class); mDataContentObserver = new DataContentObserver(new Handler(Looper.getMainLooper())); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; Loading
src/com/android/settings/network/telephony/MobileNetworkUtils.java +8 −8 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public class MobileNetworkUtils { * Returns true if Wifi calling is enabled for at least one phone. */ public static boolean isWifiCallingEnabled(Context context) { int phoneCount = TelephonyManager.from(context).getPhoneCount(); int phoneCount = context.getSystemService(TelephonyManager.class).getPhoneCount(); for (int i = 0; i < phoneCount; i++) { if (isWifiCallingEnabled(context, i)) { return true; Loading Loading @@ -218,7 +218,7 @@ public class MobileNetworkUtils { */ public static void setMobileDataEnabled(Context context, int subId, boolean enabled, boolean disableOtherSubscriptions) { final TelephonyManager telephonyManager = TelephonyManager.from(context) final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) .createForSubscriptionId(subId); final SubscriptionManager subscriptionManager = context.getSystemService( SubscriptionManager.class); Loading @@ -230,7 +230,7 @@ public class MobileNetworkUtils { if (subInfoList != null) { for (SubscriptionInfo subInfo : subInfoList) { if (subInfo.getSubscriptionId() != subId) { TelephonyManager.from(context).createForSubscriptionId( context.getSystemService(TelephonyManager.class).createForSubscriptionId( subInfo.getSubscriptionId()).setDataEnabled(false); } } Loading @@ -245,7 +245,7 @@ public class MobileNetworkUtils { if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) { return false; } final TelephonyManager telephonyManager = TelephonyManager.from(context) final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) .createForSubscriptionId(subId); final PersistableBundle carrierConfig = context.getSystemService( CarrierConfigManager.class).getConfigForSubId(subId); Loading Loading @@ -307,7 +307,7 @@ public class MobileNetworkUtils { } private static boolean isGsmBasicOptions(Context context, int subId) { final TelephonyManager telephonyManager = TelephonyManager.from(context) final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) .createForSubscriptionId(subId); final PersistableBundle carrierConfig = context.getSystemService( CarrierConfigManager.class).getConfigForSubId(subId); Loading @@ -329,7 +329,7 @@ public class MobileNetworkUtils { * settings */ public static boolean isWorldMode(Context context, int subId) { final TelephonyManager telephonyManager = TelephonyManager.from(context) final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) .createForSubscriptionId(subId); boolean worldModeOn = false; final String configString = context.getString(R.string.config_world_mode); Loading Loading @@ -404,7 +404,7 @@ public class MobileNetworkUtils { */ public static boolean isTdscdmaSupported(Context context, int subId) { return isTdscdmaSupported(context, TelephonyManager.from(context).createForSubscriptionId(subId)); context.getSystemService(TelephonyManager.class).createForSubscriptionId(subId)); } //TODO(b/117651939): move it to telephony Loading
src/com/android/settings/network/telephony/RoamingPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class RoamingPreferenceController extends TogglePreferenceController impl public RoamingPreferenceController(Context context, String key) { super(context, key); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; mCarrierConfigManager = context.getSystemService(CarrierConfigManager.class); mDataContentObserver = new DataContentObserver(new Handler(Looper.getMainLooper())); mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; Loading