diff options
author | Weijie Wang <quic_weijiew@quicinc.com> | 2022-02-15 17:05:19 +0800 |
---|---|---|
committer | Weijie Wang <quic_weijiew@quicinc.com> | 2022-02-17 01:27:13 +0000 |
commit | f016d9915027d499494035d465fd95ec3aeeca3e (patch) | |
tree | 93ece115d00f5cbf5d3bc9d5d3b8aaf178649a8d /packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java | |
parent | 1aba3d5aacfa8a9ae30d9d8ae0229434c5e5f565 (diff) |
SystemUI: Remove location permission
Remove location permission to comply with MBA pregrant
permission policy.
Change-Id: I00f8a9b632446c5cb31ca948666c7f148ffd1470
CRs-Fixed: 3126786
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java b/packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java index 7064b8e22f2a..1d6dce9b1af8 100644 --- a/packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java +++ b/packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java @@ -37,6 +37,7 @@ import androidx.annotation.Nullable; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.keyguard.dagger.KeyguardBouncerScope; +import com.android.systemui.R; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; @@ -176,6 +177,9 @@ public class EmergencyButtonController extends ViewController<EmergencyButton> { } private void requestCellInfoUpdate(){ + if(!getContext().getResources().getBoolean(R.bool.kg_hide_emgcy_btn_when_oos)) { + return; + } TelephonyManager tmWithoutSim = mTelephonyManager .createForSubscriptionId(SubscriptionManager.INVALID_SUBSCRIPTION_ID); try { @@ -195,7 +199,7 @@ public class EmergencyButtonController extends ViewController<EmergencyButton> { updateEmergencyCallButton(); } }); - } catch (IllegalStateException exception) { + } catch (Exception exception) { Log.e(LOG_TAG, "Fail to call TelephonyManager.requestCellInfoUpdate ", exception); } } |