summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/RefocusActivity.java
diff options
context:
space:
mode:
authorpezhan <pezhan@codeaurora.org>2017-01-12 14:56:43 +0800
committerpezhan <pezhan@codeaurora.org>2017-01-12 15:27:34 +0800
commit3c8acd4f9e99615e9c05c21d96cb995770cec6a5 (patch)
tree635ef7f96ef2c2dc44800fa173425e994edd7395 /src/com/android/camera/RefocusActivity.java
parent326822d1e444da7b227be3c86815e3ee6eb6453d (diff)
downloadandroid_packages_apps_Snap-3c8acd4f9e99615e9c05c21d96cb995770cec6a5.tar.gz
android_packages_apps_Snap-3c8acd4f9e99615e9c05c21d96cb995770cec6a5.tar.bz2
android_packages_apps_Snap-3c8acd4f9e99615e9c05c21d96cb995770cec6a5.zip
SnapdragonCamera: Fix Can't edit UbiFocus mode picture when screen locked.
When enter the RefocusActivity, the keyguard will cover this activity. Add flags if it's SecureCamera and UbiFocus mode when enter RefocusActivity, the keyguard will dismiss. RefocusActivity will display normally. Add display the thumbnail when click shutter button under SecureCamera and UbiFocus mode also it is Refocus. Add display the thumbnail when when back from RefocusActivity under SecureCamera and UbiFocus mode also it is Refocus. Change-Id: I158d77b6c9132162a5414987dc4f5d61cc4ef31d CRs-Fixed: 1108273
Diffstat (limited to 'src/com/android/camera/RefocusActivity.java')
-rw-r--r--src/com/android/camera/RefocusActivity.java25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/com/android/camera/RefocusActivity.java b/src/com/android/camera/RefocusActivity.java
index 058e7b0d2..a3d5c0862 100644
--- a/src/com/android/camera/RefocusActivity.java
+++ b/src/com/android/camera/RefocusActivity.java
@@ -56,11 +56,14 @@ import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.FrameLayout;
import com.android.camera.exif.ExifInterface;
+import com.android.camera.util.CameraUtil;
import org.codeaurora.snapcam.R;
public class RefocusActivity extends Activity {
@@ -75,7 +78,7 @@ public class RefocusActivity extends Activity {
private int mWidth;
private int mHeight;
private Indicator mIndicator;
-
+ private boolean mSecureCamera;
private View mAllInFocusView;
private DepthMap mDepthMap;
@@ -90,8 +93,25 @@ public class RefocusActivity extends Activity {
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
+ Intent intent = getIntent();
+ mUri = intent.getData();
+ String action = intent.getAction();
+ if (CameraUtil.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE.equals(action)
+ || CameraUtil.ACTION_IMAGE_CAPTURE_SECURE.equals(action)) {
+ mSecureCamera = true;
+ } else {
+ mSecureCamera = intent.getBooleanExtra(CameraUtil.SECURE_CAMERA_EXTRA, false);
+ }
+
+ if (mSecureCamera) {
+ // Change the window flags so that secure camera can show when locked
+ Window win = getWindow();
+ WindowManager.LayoutParams params = win.getAttributes();
+ params.flags |= WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
+ win.setAttributes(params);
+ }
mFilesPath = getFilesDir()+"";
- if(getIntent().getFlags() == MAP_ROTATED) {
+ if(intent.getFlags() == MAP_ROTATED || mSecureCamera) {
mMapRotated = true;
mFilesPath = getFilesDir()+"/Ubifocus";
}
@@ -102,7 +122,6 @@ public class RefocusActivity extends Activity {
}
}).start();
- mUri = getIntent().getData();
setContentView(R.layout.refocus_editor);
mIndicator = (Indicator) findViewById(R.id.refocus_indicator);