Merge "Merge "Rename resetNewUserDisclaimer() to acknowledgeNewUserDisclaimer()" into sc-v2-dev am: d7a45338bb" into sc-v2-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
4007d0545f
@@ -3103,11 +3103,18 @@ public class DevicePolicyManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/**
|
||||||
public void resetNewUserDisclaimer() {
|
* Acknoledges that the new managed user disclaimer was viewed by the (human) user
|
||||||
|
* so that {@link #ACTION_SHOW_NEW_USER_DISCLAIMER broadcast} is not sent again the next time
|
||||||
|
* this user is switched to.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@RequiresPermission(android.Manifest.permission.MANAGE_USERS)
|
||||||
|
public void acknowledgeNewUserDisclaimer() {
|
||||||
if (mService != null) {
|
if (mService != null) {
|
||||||
try {
|
try {
|
||||||
mService.resetNewUserDisclaimer();
|
mService.acknowledgeNewUserDisclaimer();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw e.rethrowFromSystemServer();
|
throw e.rethrowFromSystemServer();
|
||||||
}
|
}
|
||||||
@@ -5673,7 +5680,7 @@ public class DevicePolicyManager {
|
|||||||
*/
|
*/
|
||||||
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
||||||
public static final String ACTION_SHOW_NEW_USER_DISCLAIMER =
|
public static final String ACTION_SHOW_NEW_USER_DISCLAIMER =
|
||||||
"android.app.action.ACTION_SHOW_NEW_USER_DISCLAIMER";
|
"android.app.action.SHOW_NEW_USER_DISCLAIMER";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Widgets are enabled in keyguard
|
* Widgets are enabled in keyguard
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ interface IDevicePolicyManager {
|
|||||||
int getLogoutUserId();
|
int getLogoutUserId();
|
||||||
void clearLogoutUser();
|
void clearLogoutUser();
|
||||||
List<UserHandle> getSecondaryUsers(in ComponentName who);
|
List<UserHandle> getSecondaryUsers(in ComponentName who);
|
||||||
void resetNewUserDisclaimer();
|
void acknowledgeNewUserDisclaimer();
|
||||||
|
|
||||||
void enableSystemApp(in ComponentName admin, in String callerPackage, in String packageName);
|
void enableSystemApp(in ComponentName admin, in String callerPackage, in String packageName);
|
||||||
int enableSystemAppWithIntent(in ComponentName admin, in String callerPackage, in Intent intent);
|
int enableSystemAppWithIntent(in ComponentName admin, in String callerPackage, in Intent intent);
|
||||||
|
|||||||
@@ -711,7 +711,7 @@
|
|||||||
<protected-broadcast android:name="android.scheduling.action.REBOOT_READY" />
|
<protected-broadcast android:name="android.scheduling.action.REBOOT_READY" />
|
||||||
<protected-broadcast android:name="android.app.action.DEVICE_POLICY_CONSTANTS_CHANGED" />
|
<protected-broadcast android:name="android.app.action.DEVICE_POLICY_CONSTANTS_CHANGED" />
|
||||||
<protected-broadcast android:name="android.app.action.SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED" />
|
<protected-broadcast android:name="android.app.action.SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED" />
|
||||||
<protected-broadcast android:name="android.app.action.ACTION_SHOW_NEW_USER_DISCLAIMER" />
|
<protected-broadcast android:name="android.app.action.SHOW_NEW_USER_DISCLAIMER" />
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
<!-- ====================================================================== -->
|
||||||
<!-- RUNTIME PERMISSIONS -->
|
<!-- RUNTIME PERMISSIONS -->
|
||||||
|
|||||||
@@ -10768,7 +10768,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetNewUserDisclaimer() {
|
public void acknowledgeNewUserDisclaimer() {
|
||||||
CallerIdentity callerIdentity = getCallerIdentity();
|
CallerIdentity callerIdentity = getCallerIdentity();
|
||||||
canManageUsers(callerIdentity);
|
canManageUsers(callerIdentity);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user