User restriction for disallowing window creation
Block any types of windows that could by used by apps to create
views on top of a locked app. This can be used by device admins
in conjunction with lock task mode.
Added a way for system (and priv apps) to bypass user restrictions
for specified op codes.
Bug: 15279535
Change-Id: I2381530ef6226a5bb32a99bb4030baafb39bf564
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 544e93b..194e85d 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -838,6 +838,7 @@
writeBoolean(serializer, restrictions, UserManager.DISALLOW_UNMUTE_MICROPHONE);
writeBoolean(serializer, restrictions, UserManager.DISALLOW_ADJUST_VOLUME);
writeBoolean(serializer, restrictions, UserManager.DISALLOW_TELEPHONY);
+ writeBoolean(serializer, restrictions, UserManager.DISALLOW_CREATE_WINDOWS);
serializer.endTag(null, TAG_RESTRICTIONS);
}
@@ -980,6 +981,7 @@
readBoolean(parser, restrictions, UserManager.DISALLOW_UNMUTE_MICROPHONE);
readBoolean(parser, restrictions, UserManager.DISALLOW_ADJUST_VOLUME);
readBoolean(parser, restrictions, UserManager.DISALLOW_TELEPHONY);
+ readBoolean(parser, restrictions, UserManager.DISALLOW_CREATE_WINDOWS);
}
private void readBoolean(XmlPullParser parser, Bundle restrictions,