Merge "Disallow safe boot when in demo mode" into nyc-mr1-dev

This commit is contained in:
TreeHugger Robot
2016-07-13 23:45:38 +00:00
committed by Android (Google) Code Review

View File

@@ -327,6 +327,9 @@ public class RetailDemoModeService extends SystemService {
um.setUserRestriction(UserManager.DISALLOW_USB_FILE_TRANSFER, true, user);
um.setUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, true, user);
um.setUserRestriction(UserManager.DISALLOW_CONFIG_BLUETOOTH, true, user);
// Disallow rebooting in safe mode - controlled by user 0
getUserManager().setUserRestriction(UserManager.DISALLOW_SAFE_BOOT, true,
UserHandle.SYSTEM);
Settings.Secure.putIntForUser(getContext().getContentResolver(),
Settings.Secure.SKIP_FIRST_USE_HINTS, 1, userInfo.id);
Settings.Secure.putIntForUser(getContext().getContentResolver(),