From 04e24acb19a2f283f36fc67d6c32f6b11350dca7 Mon Sep 17 00:00:00 2001 From: Alan Newberger Date: Tue, 12 May 2015 13:39:54 -0700 Subject: skip first run dialog when starting in secure mode Go right into camera mode when starting from secure lockscreen, this restores prior behavior and avoids resume loops in double onResume workarounds. Bug: 21070237 Change-Id: I353bdd4b73c8c63e58710e35304b5c269458c72e --- src/com/android/camera/CameraActivity.java | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 08b3ba9c7..7f5b8aa28 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -1887,13 +1887,20 @@ public class CameraActivity extends QuickActivity public void onResumeTasks() { mPaused = false; - // Show the dialog if necessary. The rest resume logic will be invoked - // at the onFirstRunStateReady() callback. - try { - mFirstRunDialog.showIfNecessary(); - } catch (AssertionError e) { - Log.e(TAG, "Creating camera controller failed.", e); - mFatalErrorHandler.onGenericCameraAccessFailure(); + if (!mSecureCamera) { + // Show the dialog if necessary. The rest resume logic will be invoked + // at the onFirstRunStateReady() callback. + try { + mFirstRunDialog.showIfNecessary(); + } catch (AssertionError e) { + Log.e(TAG, "Creating camera controller failed.", e); + mFatalErrorHandler.onGenericCameraAccessFailure(); + } + } else { + // In secure mode from lockscreen, we go straight to camera and will + // show first run dialog next time user enters launcher. + Log.v(TAG, "in secure mode, skipping first run dialog check"); + resume(); } } -- cgit v1.2.3