Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -35493,6 +35493,7 @@ package android.os { field public static final String DISALLOW_CONFIG_VPN = "no_config_vpn"; field public static final String DISALLOW_CONFIG_WIFI = "no_config_wifi"; field public static final String DISALLOW_CONTENT_CAPTURE = "no_content_capture"; field public static final String DISALLOW_CONTENT_SUGGESTIONS = "no_content_suggestions"; field public static final String DISALLOW_CREATE_WINDOWS = "no_create_windows"; field public static final String DISALLOW_CROSS_PROFILE_COPY_PASTE = "no_cross_profile_copy_paste"; field public static final String DISALLOW_DATA_ROAMING = "no_data_roaming"; core/java/android/os/UserManager.java +15 −0 Original line number Diff line number Diff line Loading @@ -953,6 +953,21 @@ public class UserManager { */ public static final String DISALLOW_CONTENT_CAPTURE = "no_content_capture"; /** * Specifies if the current user is able to receive content suggestions for selections based on * the contents of their screen. * * <p>Device owner and profile owner can set this restriction. When it is set by device owner, * only the target user will be affected. * * <p>The default value is <code>false</code>. * * @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#clearUserRestriction(ComponentName, String) * @see #getUserRestrictions() */ public static final String DISALLOW_CONTENT_SUGGESTIONS = "no_content_suggestions"; /** * Specifies if user switching is blocked on the current user. * Loading services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.RemoteException; import android.os.ResultReceiver; import android.os.ShellCallback; import android.os.UserHandle; import android.os.UserManager; import android.util.Slog; import com.android.server.LocalServices; Loading Loading @@ -63,7 +64,8 @@ public class ContentSuggestionsManagerService extends public ContentSuggestionsManagerService(Context context) { super(context, new FrameworkResourcesServiceNameResolver(context, com.android.internal.R.string.config_defaultContentSuggestionsService), null); com.android.internal.R.string.config_defaultContentSuggestionsService), UserManager.DISALLOW_CONTENT_SUGGESTIONS); mActivityTaskManagerInternal = LocalServices.getService(ActivityTaskManagerInternal.class); } Loading services/core/java/com/android/server/pm/UserRestrictionsUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ public class UserRestrictionsUtils { UserManager.DISALLOW_UNMUTE_DEVICE, UserManager.DISALLOW_AUTOFILL, UserManager.DISALLOW_CONTENT_CAPTURE, UserManager.DISALLOW_CONTENT_SUGGESTIONS, UserManager.DISALLOW_USER_SWITCH, UserManager.DISALLOW_UNIFIED_PASSWORD, UserManager.DISALLOW_CONFIG_LOCATION, Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -35493,6 +35493,7 @@ package android.os { field public static final String DISALLOW_CONFIG_VPN = "no_config_vpn"; field public static final String DISALLOW_CONFIG_WIFI = "no_config_wifi"; field public static final String DISALLOW_CONTENT_CAPTURE = "no_content_capture"; field public static final String DISALLOW_CONTENT_SUGGESTIONS = "no_content_suggestions"; field public static final String DISALLOW_CREATE_WINDOWS = "no_create_windows"; field public static final String DISALLOW_CROSS_PROFILE_COPY_PASTE = "no_cross_profile_copy_paste"; field public static final String DISALLOW_DATA_ROAMING = "no_data_roaming";
core/java/android/os/UserManager.java +15 −0 Original line number Diff line number Diff line Loading @@ -953,6 +953,21 @@ public class UserManager { */ public static final String DISALLOW_CONTENT_CAPTURE = "no_content_capture"; /** * Specifies if the current user is able to receive content suggestions for selections based on * the contents of their screen. * * <p>Device owner and profile owner can set this restriction. When it is set by device owner, * only the target user will be affected. * * <p>The default value is <code>false</code>. * * @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#clearUserRestriction(ComponentName, String) * @see #getUserRestrictions() */ public static final String DISALLOW_CONTENT_SUGGESTIONS = "no_content_suggestions"; /** * Specifies if user switching is blocked on the current user. * Loading
services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.RemoteException; import android.os.ResultReceiver; import android.os.ShellCallback; import android.os.UserHandle; import android.os.UserManager; import android.util.Slog; import com.android.server.LocalServices; Loading Loading @@ -63,7 +64,8 @@ public class ContentSuggestionsManagerService extends public ContentSuggestionsManagerService(Context context) { super(context, new FrameworkResourcesServiceNameResolver(context, com.android.internal.R.string.config_defaultContentSuggestionsService), null); com.android.internal.R.string.config_defaultContentSuggestionsService), UserManager.DISALLOW_CONTENT_SUGGESTIONS); mActivityTaskManagerInternal = LocalServices.getService(ActivityTaskManagerInternal.class); } Loading
services/core/java/com/android/server/pm/UserRestrictionsUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ public class UserRestrictionsUtils { UserManager.DISALLOW_UNMUTE_DEVICE, UserManager.DISALLOW_AUTOFILL, UserManager.DISALLOW_CONTENT_CAPTURE, UserManager.DISALLOW_CONTENT_SUGGESTIONS, UserManager.DISALLOW_USER_SWITCH, UserManager.DISALLOW_UNIFIED_PASSWORD, UserManager.DISALLOW_CONFIG_LOCATION, Loading