Disallow safe boot when in demo mode

Bug: 30038636
Change-Id: I70624bff85f5fb012772422f0fff523dab6e9be1
This commit is contained in:
Fyodor Kupolov
2016-07-13 11:33:09 -07:00
parent 0ce03e77bc
commit 4e416e9f0c

View File

@@ -329,6 +329,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(),