File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
policy/src/com/android/internal/policy/impl Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3465,6 +3465,15 @@ public void run() {
34653465 if (localLOGV ) Log .v (TAG , "mScreenSaverActivator: not running screen saver when not plugged in" );
34663466 return ;
34673467 }
3468+ // Quick fix for automation tests.
3469+ // The correct fix is to move this triggering logic to PowerManager, where more complete
3470+ // information about wakelocks (including StayOnWhilePluggedIn) is available.
3471+ if (Settings .System .getInt (mContext .getContentResolver (),
3472+ Settings .System .STAY_ON_WHILE_PLUGGED_IN ,
3473+ BatteryManager .BATTERY_PLUGGED_AC ) != 0 ) {
3474+ Log .v (TAG , "mScreenSaverActivator: not running screen saver when STAY_ON_WHILE_PLUGGED_IN" );
3475+ return ;
3476+ }
34683477
34693478 if (localLOGV ) Log .v (TAG , "mScreenSaverActivator entering dreamland" );
34703479
You can’t perform that action at this time.
0 commit comments