summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/AdminSecondaryLockScreenController.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/AdminSecondaryLockScreenController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/AdminSecondaryLockScreenController.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/AdminSecondaryLockScreenController.java b/packages/SystemUI/src/com/android/keyguard/AdminSecondaryLockScreenController.java
index 85724a969fed..7eb5a8f2b06c 100644
--- a/packages/SystemUI/src/com/android/keyguard/AdminSecondaryLockScreenController.java
+++ b/packages/SystemUI/src/com/android/keyguard/AdminSecondaryLockScreenController.java
@@ -170,9 +170,15 @@ public class AdminSecondaryLockScreenController {
private void onSurfaceReady() {
try {
- mClient.onSurfaceReady(mView.getHostToken(), mCallback);
+ IBinder hostToken = mView.getHostToken();
+ // Should never be null when SurfaceView is attached to window.
+ if (hostToken != null) {
+ mClient.onCreateKeyguardSurface(hostToken, mCallback);
+ } else {
+ hide();
+ }
} catch (RemoteException e) {
- Log.e(TAG, "Error in onSurfaceReady", e);
+ Log.e(TAG, "Error in onCreateKeyguardSurface", e);
dismiss(KeyguardUpdateMonitor.getCurrentUser());
}
}