Restrict Emergency Assist API to system image only.
Bug: 23591361
Change-Id: Idecae74384568e9cb45e605b6eeadad9dea367ab
(cherry picked from commit 66229fd15cf42c0f09169122cc8a245f64569965)
diff --git a/src/com/android/phone/EmergencyActionGroup.java b/src/com/android/phone/EmergencyActionGroup.java
index 2d70d01..039dd82 100644
--- a/src/com/android/phone/EmergencyActionGroup.java
+++ b/src/com/android/phone/EmergencyActionGroup.java
@@ -165,11 +165,9 @@
} catch (PackageManager.NameNotFoundException e) {
continue;
}
- // Get earliest installed app, but prioritize system apps.
- if (bestMatch == null
- || !isSystemApp(bestMatch) && isSystemApp(packageInfo)
- || isSystemApp(bestMatch) == isSystemApp(packageInfo)
- && bestMatch.firstInstallTime > packageInfo.firstInstallTime) {
+ // Get earliest installed system app.
+ if (isSystemApp(packageInfo) && (bestMatch == null ||
+ bestMatch.firstInstallTime > packageInfo.firstInstallTime)) {
bestMatch = packageInfo;
}
}