Clean up emergency app overlay intent
Emergency app will be launched by default intent, this overlay intent is
not required.
Test: Manually
Bug: 129806015
Change-Id: I6ecd08485a57a973918770d92d6dab159d23cb43
diff --git a/res/values/config.xml b/res/values/config.xml
index 6b6bf04..232c57f 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -251,9 +251,6 @@
audio stream which the remote party will be able to hear. -->
<bool name="config_support_telephony_audio_device">false</bool>
- <!-- Intent action to launch target emergency app. -->
- <string name="config_emergency_app_intent" translatable="false"></string>
-
<!-- The country list that shortcut view can be enabled. -->
<string-array name="config_countries_to_enable_shortcut_view" translatable="false">
</string-array>
diff --git a/src/com/android/phone/EmergencyActionGroup.java b/src/com/android/phone/EmergencyActionGroup.java
index 4f9121a..b8bf7a8 100644
--- a/src/com/android/phone/EmergencyActionGroup.java
+++ b/src/com/android/phone/EmergencyActionGroup.java
@@ -143,7 +143,7 @@
ComponentName name = EmergencyAssistanceHelper.getComponentName(info);
button.setTag(R.id.tag_intent,
- new Intent(EmergencyAssistanceHelper.getIntentAction(getContext()))
+ new Intent(EmergencyAssistanceHelper.getIntentAction())
.setComponent(name));
button.setText(info.loadLabel(getContext().getPackageManager()));
visible = true;
diff --git a/src/com/android/phone/EmergencyAssistanceHelper.java b/src/com/android/phone/EmergencyAssistanceHelper.java
index 1bf212e..33788d3 100644
--- a/src/com/android/phone/EmergencyAssistanceHelper.java
+++ b/src/com/android/phone/EmergencyAssistanceHelper.java
@@ -43,16 +43,9 @@
/**
* Get intent action of target emergency app.
*
- * @param context The context of the application.
- * @return A string of intent action to launch target emergency app by feature flag, it will be
- * used for team food.
+ * @return A string of intent action to launch target emergency app.
*/
- public static String getIntentAction(Context context) {
- String action = context.getResources().getString(R.string.config_emergency_app_intent);
- if (!action.isEmpty()) {
- return action;
- }
-
+ public static String getIntentAction() {
return TelephonyManager.ACTION_EMERGENCY_ASSISTANCE;
}
@@ -68,7 +61,7 @@
List<ResolveInfo> infos = queryAssistActivities(context, assistPackage);
if (infos == null || infos.isEmpty()) {
PackageManager packageManager = context.getPackageManager();
- Intent queryIntent = new Intent(getIntentAction(context));
+ Intent queryIntent = new Intent(getIntentAction());
infos = packageManager.queryIntentActivities(queryIntent, 0);
PackageInfo bestMatch = null;
@@ -112,7 +105,7 @@
List<ResolveInfo> infos = null;
if (!TextUtils.isEmpty(assistPackage)) {
- Intent queryIntent = new Intent(getIntentAction(context))
+ Intent queryIntent = new Intent(getIntentAction())
.setPackage(assistPackage);
infos = context.getPackageManager().queryIntentActivities(queryIntent, 0);
}
diff --git a/src/com/android/phone/EmergencyInfoGroup.java b/src/com/android/phone/EmergencyInfoGroup.java
index 7f01412..14c24d8 100644
--- a/src/com/android/phone/EmergencyInfoGroup.java
+++ b/src/com/android/phone/EmergencyInfoGroup.java
@@ -127,7 +127,7 @@
if (infos != null && infos.size() > 0) {
final String packageName = infos.get(0).activityInfo.packageName;
final Intent intent = new Intent(
- EmergencyAssistanceHelper.getIntentAction(getContext()))
+ EmergencyAssistanceHelper.getIntentAction())
.setPackage(packageName);
setTag(R.id.tag_intent, intent);
setUserIcon();