Refer to STAY_ON_WHILE_PLUGGED_IN via the Global namespace

It moved from System to Global, so writes are not automatically redirected
to the new namespace (else apps would start crashing).

Bug 7126575

Change-Id: Ief31fcb5a6107a098da04d30d146e16921dee776
This commit is contained in:
Christopher Tate
2012-09-07 15:00:54 -07:00
parent c0be8c85b0
commit 62df6eb508

View File

@ -1628,8 +1628,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
} else {
// Make sure KEEP_SCREEN_ON is disabled, since that
// would allow bypassing of the maximum time to lock.
Settings.System.putInt(mContext.getContentResolver(),
Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0);
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0);
}
mLastMaximumTimeToLock = timeMs;