Change feature flag enabled behavior
Because new Emergency Info app need pre-grant fixed system permission,
it need re-ues the TelephonyManager.ACTION_EMERGENCY_ASSISTANCE intent,
so that change the feature flag enabled behavior here.
Bug: 124348906
Test: Manually
Change-Id: Ic78ac892b78063eedcaa3c9c353ef333bfcf3941
diff --git a/src/com/android/phone/EmergencyAssistanceHelper.java b/src/com/android/phone/EmergencyAssistanceHelper.java
index a98d81d..4b291c5 100644
--- a/src/com/android/phone/EmergencyAssistanceHelper.java
+++ b/src/com/android/phone/EmergencyAssistanceHelper.java
@@ -50,11 +50,13 @@
* used for team food.
*/
public static String getIntentAction(Context context) {
- if (FeatureFlagUtils.isEnabled(context, FeatureFlagUtils.SAFETY_HUB)) {
- String action = context.getResources().getString(R.string.config_emergency_app_intent);
- if (!action.isEmpty()) {
- return action;
+ String action = context.getResources().getString(R.string.config_emergency_app_intent);
+ if (!action.isEmpty()) {
+ // TODO: remove feature flag and this temporary intent once Emergency app was replaced.
+ if (!FeatureFlagUtils.isEnabled(context, FeatureFlagUtils.SAFETY_HUB)) {
+ return "com.android.emergency.action.EMERGENCY_ASSISTANCE";
}
+ return action;
}
return TelephonyManager.ACTION_EMERGENCY_ASSISTANCE;