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

Commit fed7a99a authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "Quick fix for bug 5646217 blocking automation tests" into ics-mr1

parents 4e5d3f2c 7d46c613
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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");