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

Commit d8615906 authored by Craig Mautner's avatar Craig Mautner
Browse files

Synchronize access to Locked methods. DO NOT MERGE

onConfigurationChange was calling maybeCreateKeyguardLocked
without actually holding the lock.  Now the call to
maybeCreateKeyguardLocked is synchronized.

May fix bug 7094175.

Change-Id: I3171a18e25f54506f614f9c2cc09aa20080bd6bb
parent c1ae43ad
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -129,6 +129,10 @@ public class KeyguardViewManager {
        @Override
        protected void onConfigurationChanged(Configuration newConfig) {
            super.onConfigurationChanged(newConfig);
            post(new Runnable() {
                @Override
                public void run() {
                    synchronized (KeyguardViewManager.this) {
                        if (mKeyguardHost.getVisibility() == View.VISIBLE) {
                            // only propagate configuration messages if we're currently showing
                            maybeCreateKeyguardLocked(shouldEnableScreenRotation(), true, null);
@@ -136,6 +140,9 @@ public class KeyguardViewManager {
                            if (DEBUG) Log.v(TAG, "onConfigurationChanged: view not visible");
                        }
                    }
                }
            });
        }

        @Override
        public boolean dispatchKeyEvent(KeyEvent event) {