am 58f49a20: am 13d03e9c: am 5b2792a3: Merge "Only show emergency actions if enabled" into mnc-dev
* commit '58f49a20bf975d65286fef42fa29db7e0bc1c9a6':
Only show emergency actions if enabled
diff --git a/src/com/android/phone/EmergencyActionGroup.java b/src/com/android/phone/EmergencyActionGroup.java
index b8d17c9..2d70d01 100644
--- a/src/com/android/phone/EmergencyActionGroup.java
+++ b/src/com/android/phone/EmergencyActionGroup.java
@@ -76,7 +76,6 @@
@Override
protected void onFinishInflate() {
super.onFinishInflate();
-
setupAssistActions();
mSelectedContainer = (ViewGroup) findViewById(R.id.selected_container);
@@ -119,7 +118,13 @@
private void setupAssistActions() {
int[] buttonIds = new int[] {R.id.action1, R.id.action2, R.id.action3};
- List<ResolveInfo> infos = resolveAssistPackageAndQueryActivites();
+ List<ResolveInfo> infos;
+
+ if (TelephonyManager.EMERGENCY_ASSISTANCE_ENABLED) {
+ infos = resolveAssistPackageAndQueryActivites();
+ } else {
+ infos = null;
+ }
for (int i = 0; i < 3; i++) {
Button button = (Button) findViewById(buttonIds[i]);