summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/sim
diff options
context:
space:
mode:
authorSanket Padawe <sanketpadawe@google.com>2015-01-05 14:46:14 -0800
committerSanket Padawe <sanketpadawe@google.com>2015-01-05 23:00:42 +0000
commitc8c82f002d8ed828186393023cbea163cd0914ea (patch)
tree46b54800654aaadf12bda672a3ee48b28af27afc /src/com/android/settings/sim
parent9f0eaf19b323bdc7f6e7403d4fb5c08078f9a73e (diff)
downloadpackages_apps_Settings-c8c82f002d8ed828186393023cbea163cd0914ea.zip
packages_apps_Settings-c8c82f002d8ed828186393023cbea163cd0914ea.tar.gz
packages_apps_Settings-c8c82f002d8ed828186393023cbea163cd0914ea.tar.bz2
Grey out sim select dialog for Calls when only 1 phoneAccount exists
Bug: 18685720 Change-Id: Id7c8f756fd958fc81086a0166f1b0423c62e2569
Diffstat (limited to 'src/com/android/settings/sim')
-rw-r--r--src/com/android/settings/sim/SimSettings.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/settings/sim/SimSettings.java b/src/com/android/settings/sim/SimSettings.java
index 92a10d6..eaf932f 100644
--- a/src/com/android/settings/sim/SimSettings.java
+++ b/src/com/android/settings/sim/SimSettings.java
@@ -230,11 +230,14 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
final TelecomManager telecomManager = TelecomManager.from(getActivity());
final PhoneAccountHandle phoneAccount =
telecomManager.getUserSelectedOutgoingPhoneAccount();
+ final List<PhoneAccountHandle> allPhoneAccounts =
+ telecomManager.getCallCapablePhoneAccounts();
simPref.setTitle(R.string.calls_title);
simPref.setSummary(phoneAccount == null
? getResources().getString(R.string.sim_calls_ask_first_prefs_title)
: (String)telecomManager.getPhoneAccount(phoneAccount).getLabel());
+ simPref.setEnabled(allPhoneAccounts.size() > 1);
}
@Override