diff options
author | LuK1337 <priv.luk@gmail.com> | 2016-01-03 22:32:00 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2016-01-04 16:22:15 +0100 |
commit | 787ad53044ce52619ce50bb59520c172224eb89c (patch) | |
tree | b17683ec427f14048f25670ae0546df331867080 /src | |
parent | e02a5f293d9749b6fa30617d316f7600b50c683e (diff) | |
download | packages_apps_Settings-787ad53044ce52619ce50bb59520c172224eb89c.tar.gz packages_apps_Settings-787ad53044ce52619ce50bb59520c172224eb89c.tar.bz2 packages_apps_Settings-787ad53044ce52619ce50bb59520c172224eb89c.zip |
Hide manual provisioning switch when extphone framework is not present
* It doesn't work without it.
Change-Id: Iec11ec2006059f26668f2a6fee4c2c9ca6650119
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/sim/SimSettings.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/settings/sim/SimSettings.java b/src/com/android/settings/sim/SimSettings.java index 6c9057d8f..6748489ba 100644 --- a/src/com/android/settings/sim/SimSettings.java +++ b/src/com/android/settings/sim/SimSettings.java @@ -484,11 +484,13 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable mSwitch.setVisibility(mSwitchVisibility); // Disable manual provisioning option to user when - // device is in Airplane mode. - if (isAirplaneModeOn()) { - mSwitch.setEnabled(false); + // device is in Airplane mode. Hide it if the extphone framework + // is not present, as the operation relies on said framework. + if (mExtTelephony == null) { + mSwitch.setVisibility(View.GONE); } else { - mSwitch.setEnabled(true); + mSwitch.setVisibility(View.VISIBLE); + mSwitch.setEnabled(!isAirplaneModeOn()); } } |