Merge "Quick fix for bug 5646217 blocking automation tests" into ics-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
fed7a99a52
@@ -3465,6 +3465,15 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
if (localLOGV) Log.v(TAG, "mScreenSaverActivator: not running screen saver when not plugged in");
|
||||
return;
|
||||
}
|
||||
// Quick fix for automation tests.
|
||||
// The correct fix is to move this triggering logic to PowerManager, where more complete
|
||||
// information about wakelocks (including StayOnWhilePluggedIn) is available.
|
||||
if (Settings.System.getInt(mContext.getContentResolver(),
|
||||
Settings.System.STAY_ON_WHILE_PLUGGED_IN,
|
||||
BatteryManager.BATTERY_PLUGGED_AC) != 0) {
|
||||
Log.v(TAG, "mScreenSaverActivator: not running screen saver when STAY_ON_WHILE_PLUGGED_IN");
|
||||
return;
|
||||
}
|
||||
|
||||
if (localLOGV) Log.v(TAG, "mScreenSaverActivator entering dreamland");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user