Revert "Fix flicker while booting"
This reverts commit 77cbe79b74.
KeyguardScrim is not hiding for some reason. Need more time to investigate.
Change-Id: I7624138dded386a7310386bc78b3b496af55b2b9
Fixes: 31174702
Bug: 29643498
This commit is contained in:
@@ -6400,9 +6400,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mWindowManagerDrawComplete = true;
|
mWindowManagerDrawComplete = true;
|
||||||
if (mKeyguardDelegate != null) {
|
|
||||||
mKeyguardDelegate.onDrawCompleteLw();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
finishScreenTurningOn();
|
finishScreenTurningOn();
|
||||||
@@ -6872,8 +6869,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public void systemReady() {
|
public void systemReady() {
|
||||||
mKeyguardDelegate = new KeyguardServiceDelegate(mContext,
|
mKeyguardDelegate = new KeyguardServiceDelegate(mContext);
|
||||||
mWindowManagerFuncs.getWindowManagerLock());
|
|
||||||
mKeyguardDelegate.onSystemReady();
|
mKeyguardDelegate.onSystemReady();
|
||||||
|
|
||||||
readCameraLensCoverState();
|
readCameraLensCoverState();
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import android.view.ViewGroup;
|
|||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.WindowManagerPolicy.OnKeyguardExitResult;
|
import android.view.WindowManagerPolicy.OnKeyguardExitResult;
|
||||||
|
|
||||||
import com.android.internal.annotations.GuardedBy;
|
|
||||||
import com.android.internal.policy.IKeyguardDrawnCallback;
|
import com.android.internal.policy.IKeyguardDrawnCallback;
|
||||||
import com.android.internal.policy.IKeyguardExitCallback;
|
import com.android.internal.policy.IKeyguardExitCallback;
|
||||||
import com.android.internal.policy.IKeyguardService;
|
import com.android.internal.policy.IKeyguardService;
|
||||||
@@ -44,7 +43,6 @@ public class KeyguardServiceDelegate {
|
|||||||
private static final int INTERACTIVE_STATE_AWAKE = 1;
|
private static final int INTERACTIVE_STATE_AWAKE = 1;
|
||||||
private static final int INTERACTIVE_STATE_GOING_TO_SLEEP = 2;
|
private static final int INTERACTIVE_STATE_GOING_TO_SLEEP = 2;
|
||||||
|
|
||||||
private final Object mWindowManagerLock;
|
|
||||||
protected KeyguardServiceWrapper mKeyguardService;
|
protected KeyguardServiceWrapper mKeyguardService;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final View mScrim; // shown if keyguard crashes
|
private final View mScrim; // shown if keyguard crashes
|
||||||
@@ -52,9 +50,6 @@ public class KeyguardServiceDelegate {
|
|||||||
private final KeyguardState mKeyguardState = new KeyguardState();
|
private final KeyguardState mKeyguardState = new KeyguardState();
|
||||||
private DrawnListener mDrawnListenerWhenConnect;
|
private DrawnListener mDrawnListenerWhenConnect;
|
||||||
|
|
||||||
@GuardedBy("mWindowManagerLock")
|
|
||||||
private boolean mHideScrimPending;
|
|
||||||
|
|
||||||
private static final class KeyguardState {
|
private static final class KeyguardState {
|
||||||
KeyguardState() {
|
KeyguardState() {
|
||||||
// Assume keyguard is showing and secure until we know for sure. This is here in
|
// Assume keyguard is showing and secure until we know for sure. This is here in
|
||||||
@@ -97,12 +92,10 @@ public class KeyguardServiceDelegate {
|
|||||||
@Override
|
@Override
|
||||||
public void onDrawn() throws RemoteException {
|
public void onDrawn() throws RemoteException {
|
||||||
if (DEBUG) Log.v(TAG, "**** SHOWN CALLED ****");
|
if (DEBUG) Log.v(TAG, "**** SHOWN CALLED ****");
|
||||||
synchronized (mWindowManagerLock) {
|
|
||||||
mHideScrimPending = true;
|
|
||||||
}
|
|
||||||
if (mDrawnListener != null) {
|
if (mDrawnListener != null) {
|
||||||
mDrawnListener.onDrawn();
|
mDrawnListener.onDrawn();
|
||||||
}
|
}
|
||||||
|
hideScrim();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -123,8 +116,7 @@ public class KeyguardServiceDelegate {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public KeyguardServiceDelegate(Context context, Object windowManagerLock) {
|
public KeyguardServiceDelegate(Context context) {
|
||||||
mWindowManagerLock = windowManagerLock;
|
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mScrimHandler = UiThread.getHandler();
|
mScrimHandler = UiThread.getHandler();
|
||||||
mScrim = createScrim(context, mScrimHandler);
|
mScrim = createScrim(context, mScrimHandler);
|
||||||
@@ -363,16 +355,6 @@ public class KeyguardServiceDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when all windows were fully drawn.
|
|
||||||
*/
|
|
||||||
public void onDrawCompleteLw() {
|
|
||||||
if (mHideScrimPending) {
|
|
||||||
hideScrim();
|
|
||||||
mHideScrimPending = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static View createScrim(Context context, Handler handler) {
|
private static View createScrim(Context context, Handler handler) {
|
||||||
final View view = new View(context);
|
final View view = new View(context);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user