Merge "Disable system alert window permissions on low ram devices"

This commit is contained in:
Zhi An Ng
2019-02-27 17:06:50 +00:00
committed by Android (Google) Code Review
9 changed files with 212 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ public class ShadowUtils {
private static boolean sIsDemoUser;
private static ComponentName sDeviceOwnerComponentName;
private static Map<String, String> sAppNameMap;
private static boolean sIsSystemAlertWindowEnabled;
@Implementation
protected static int enforceSameOwner(Context context, int userId) {
@@ -113,4 +114,13 @@ public class ShadowUtils {
}
sAppNameMap.put(packageName, appLabel);
}
@Implementation
protected static boolean isSystemAlertWindowEnabled(Context context) {
return sIsSystemAlertWindowEnabled;
}
public static void setIsSystemAlertWindowEnabled(boolean enabled) {
sIsSystemAlertWindowEnabled = enabled;
}
}