diff options
author | Diogo Ferreira <diogo@underdev.org> | 2015-09-03 14:36:21 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-02-16 11:23:49 -0800 |
commit | 69f45f56e41f7f7fe70c497216d1ea0b8cecc62f (patch) | |
tree | 2cf5b732dfbfe8924c1f780bd0970323e0733535 /src | |
parent | 5614e2fb653bec4eb748d212de699e0353892e2f (diff) | |
download | packages_apps_Settings-69f45f56e41f7f7fe70c497216d1ea0b8cecc62f.zip packages_apps_Settings-69f45f56e41f7f7fe70c497216d1ea0b8cecc62f.tar.gz packages_apps_Settings-69f45f56e41f7f7fe70c497216d1ea0b8cecc62f.tar.bz2 |
Settings: Only show multi-sim card configuration for owners
Telephony only allows the owner to manage sim card Settings,
currently we are crashing when changing any multisim setting
from eithr a guest or non-owner. This patch addresses the
issue by not adding the tile unless the current user is the
owner.
Change-Id: Ifaeec6c22cdf7318530ef1e6ed6e1ec851317263
Ticket: CYNGNOS-2054
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/Utils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java index ef633e1..3a92099 100644 --- a/src/com/android/settings/Utils.java +++ b/src/com/android/settings/Utils.java @@ -1089,8 +1089,8 @@ public final class Utils { public static boolean showSimCardTile(Context context) { final TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); - - return tm.getSimCount() > 1; + final boolean isPrimary = UserHandle.myUserId() == UserHandle.USER_OWNER; + return isPrimary && tm.getSimCount() > 1; } /** |