From 516483bf052d3285063e84ab185799e55d725890 Mon Sep 17 00:00:00 2001 From: Michael W Date: Fri, 25 May 2018 00:00:26 +0200 Subject: Snap: Allow quickreader to work with secure device * Mimic the behaviour from CameraActivity to allow using the quickreader activity with locked screen * Pass the value if mSecureCamera as SECURE_CAMERA_EXTRA flag to get knowledge if the WindowManager flags have to be modified * Also tested: Scanning an url doesn't allow bypassing the lockscreen, so it's only the reader itself which will work with a locked device Change-Id: Ia9da7b712f5e5aab32a49d272e3d42651dee412d --- src/com/android/camera/CameraActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/com/android/camera') diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 29a5cdb01..74e1a7ff3 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -2144,8 +2144,9 @@ public class CameraActivity extends Activity @Override public void onModuleSelected(int moduleIndex) { if (moduleIndex == ModuleSwitcher.QR_MODULE_INDEX) { - startActivity(new Intent(this, ScannerActivity.class)); - finish(); + Intent intent = new Intent(this, ScannerActivity.class); + intent.putExtra(SECURE_CAMERA_EXTRA, mSecureCamera); + startActivity(intent); return; } -- cgit v1.2.3