Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e9c942e authored by Daniel Sandler's avatar Daniel Sandler Committed by Android Git Automerger
Browse files

am 834c2870: am fed7a99a: Merge "Quick fix for bug 5646217 blocking automation tests" into ics-mr1

* commit '834c2870':
  Quick fix for bug 5646217 blocking automation tests
parents 9a8246c8 834c2870
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3468,6 +3468,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");