Send broadcast when user restrictions change.
- Send UserManager.ACTION_USER_RESTRICTIONS_CHANGED, which is a runtime receiver only broadcast. Bug 36355208 Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_deviceOwnerOnly' Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_primaryProfileOwnerOnly' Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.UserRestrictionsTest#testUserRestrictions_secondaryProfileOwnerOnly' Change-Id: Ifd82e39ce2c08ed5accdf017f4a1ea3af6face63
This commit is contained in:
@@ -22,6 +22,7 @@ import android.annotation.IntDef;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.TestApi;
|
||||
import android.annotation.UserIdInt;
|
||||
import android.annotation.WorkerThread;
|
||||
import android.app.Activity;
|
||||
@@ -762,6 +763,16 @@ public class UserManager {
|
||||
/** @hide */
|
||||
public static final int PIN_VERIFICATION_SUCCESS = -1;
|
||||
|
||||
/**
|
||||
* Sent when user restrictions have changed.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi // To allow seeing it from CTS.
|
||||
public static final String ACTION_USER_RESTRICTIONS_CHANGED =
|
||||
"android.os.action.USER_RESTRICTIONS_CHANGED";
|
||||
|
||||
/**
|
||||
* Error result indicating that this user is not allowed to add other users on this device.
|
||||
* This is a result code returned from the activity created by the intent
|
||||
|
||||
Reference in New Issue
Block a user