summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Newberger <alann@google.com>2015-05-12 13:39:54 -0700
committerAlan Newberger <alann@google.com>2015-05-12 13:55:40 -0700
commit04e24acb19a2f283f36fc67d6c32f6b11350dca7 (patch)
tree1249054626695df8677f7dbf99be016f98e0099d /src
parentcc986451105a407142e6939a88c3821dadbebd5f (diff)
downloadandroid_packages_apps_Camera2-04e24acb19a2f283f36fc67d6c32f6b11350dca7.tar.gz
android_packages_apps_Camera2-04e24acb19a2f283f36fc67d6c32f6b11350dca7.tar.bz2
android_packages_apps_Camera2-04e24acb19a2f283f36fc67d6c32f6b11350dca7.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CameraActivity.java21
1 files changed, 14 insertions, 7 deletions
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();
}
}