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

Commit a33097d6 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "Fix synchronization problem in PowerManagerService.dump()"

parents b71c6164 ca44df86
Loading
Loading
Loading
Loading
+89 −87
Original line number Diff line number Diff line
@@ -154,8 +154,8 @@ class PowerManagerService extends IPowerManager.Stub
    private boolean mDoneBooting = false;
    private boolean mBootCompleted = false;
    private int mStayOnConditions = 0;
    private int[] mBroadcastQueue = new int[] { -1, -1, -1 };
    private int[] mBroadcastWhy = new int[3];
    private final int[] mBroadcastQueue = new int[] { -1, -1, -1 };
    private final int[] mBroadcastWhy = new int[3];
    private int mPartialCount = 0;
    private int mPowerState;
    // mScreenOffReason can be WindowManagerPolicy.OFF_BECAUSE_OF_USER,
@@ -194,8 +194,8 @@ class PowerManagerService extends IPowerManager.Stub
    private UnsynchronizedWakeLock mProximityPartialLock;
    private HandlerThread mHandlerThread;
    private Handler mHandler;
    private TimeoutTask mTimeoutTask = new TimeoutTask();
    private LightAnimator mLightAnimator = new LightAnimator();
    private final TimeoutTask mTimeoutTask = new TimeoutTask();
    private final LightAnimator mLightAnimator = new LightAnimator();
    private final BrightnessState mScreenBrightness
            = new BrightnessState(SCREEN_BRIGHT_BIT);
    private final BrightnessState mKeyboardBrightness
@@ -223,7 +223,7 @@ class PowerManagerService extends IPowerManager.Stub
    private volatile int mPokey = 0;
    private volatile boolean mPokeAwakeOnSet = false;
    private volatile boolean mInitComplete = false;
    private HashMap<IBinder,PokeLock> mPokeLocks = new HashMap<IBinder,PokeLock>();
    private final HashMap<IBinder,PokeLock> mPokeLocks = new HashMap<IBinder,PokeLock>();
    // mLastScreenOnTime is the time the screen was last turned on
    private long mLastScreenOnTime;
    private boolean mPreventScreenOn;
@@ -932,6 +932,7 @@ class PowerManagerService extends IPowerManager.Stub

        long now = SystemClock.uptimeMillis();

        synchronized (mLocks) {
            pw.println("Power Manager State:");
            pw.println("  mIsPowered=" + mIsPowered
                    + " mPowerState=" + mPowerState
@@ -1019,6 +1020,7 @@ class PowerManagerService extends IPowerManager.Stub

            pw.println();
        }
    }

    private void setTimeoutLocked(long now, int nextState)
    {