From f3ece36535d4999cf2bfd2175a33da6c3cdf298e Mon Sep 17 00:00:00 2001 From: Benjamin Franz Date: Wed, 11 Feb 2015 10:51:10 +0000 Subject: Block setting wallpapers from managed profiles. Silently fail when a managed profile app tries to change the wallpaper and return default values for getters in that case. This is implemented through a new AppOp that is controlled by a new user restriction that will be set during provisioning. Bug: 18725052 Change-Id: I1601852617e738be86560f054daf3435dd9f5a9f --- core/java/android/os/UserManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/java/android/os') diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 650f3b3..706e0d0 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -391,6 +391,15 @@ public class UserManager { public static final String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam"; /** + * Hidden user restriction to disallow access to wallpaper manager APIs. This user restriction + * is always set for managed profiles. + * @hide + * @see #setUserRestrictions(Bundle) + * @see #getUserRestrictions() + */ + public static final String DISALLOW_WALLPAPER = "no_wallpaper"; + + /** * Application restriction key that is used to indicate the pending arrival * of real restrictions for the app. * -- cgit v1.1