Merge "Remove overly tight constraint on drawn Keyguard." into klp-dev

This commit is contained in:
Craig Mautner
2013-10-09 19:10:44 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 10 deletions

View File

@ -420,6 +420,7 @@ public class KeyguardViewManager {
public synchronized void onScreenTurnedOn(final IKeyguardShowCallback callback) {
if (DEBUG) Log.d(TAG, "onScreenTurnedOn()");
mScreenOn = true;
final IBinder token = mKeyguardHost == null ? null : mKeyguardHost.getWindowToken();
if (mKeyguardView != null) {
mKeyguardView.onScreenTurnedOn();
@ -432,10 +433,6 @@ public class KeyguardViewManager {
mKeyguardHost.post(new Runnable() {
@Override
public void run() {
IBinder token = null;
if (mKeyguardHost.getVisibility() == View.VISIBLE) {
token = mKeyguardHost.getWindowToken();
}
try {
callback.onShown(token);
} catch (RemoteException e) {
@ -445,7 +442,7 @@ public class KeyguardViewManager {
});
} else {
try {
callback.onShown(null);
callback.onShown(token);
} catch (RemoteException e) {
Slog.w(TAG, "Exception calling onShown():", e);
}
@ -453,7 +450,7 @@ public class KeyguardViewManager {
}
} else if (callback != null) {
try {
callback.onShown(null);
callback.onShown(token);
} catch (RemoteException e) {
Slog.w(TAG, "Exception calling onShown():", e);
}

View File

@ -4282,12 +4282,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
})) {
return;
}
Slog.i(TAG, "No lock screen! waitForWindowDrawn false");
} catch (RemoteException ex) {
// Can't happen in system process.
}
}
Slog.i(TAG, "No lock screen!");
Slog.i(TAG, "No lock screen! windowToken=" + windowToken);
finishScreenTurningOn(screenOnListener);
}

View File

@ -9473,9 +9473,8 @@ public class WindowManagerService extends IWindowManager.Stub
//Slog.i(TAG, "Waiting for drawn " + win + ": removed="
// + win.mRemoved + " visible=" + win.isVisibleLw()
// + " shown=" + win.mSurfaceShown);
if (win.mRemoved || !win.isVisibleLw()) {
// Window has been removed or made invisible; no draw
// will now happen, so stop waiting.
if (win.mRemoved) {
// Window has been removed; no draw will now happen, so stop waiting.
Slog.w(TAG, "Aborted waiting for drawn: " + pair.first);
try {
pair.second.sendResult(null);
@ -9510,6 +9509,7 @@ public class WindowManagerService extends IWindowManager.Stub
checkDrawnWindowsLocked();
return true;
}
Slog.i(TAG, "waitForWindowDrawn: win null");
}
}
return false;