如果通过语音命令打开相机,左上角会显示意外的“X”图标

Issue:
"
Actual Results: 

Lanuch Google voice search,and say" Open camera", we observed:

A 'X’ icon displays in left-upper corner in camera preview UI, and overlap with the Menu icon.

Expected Results: 

Should no 'X' icon

Reproduction Steps:

  1. Launch Google voice search
  2. Say “open camera"

"
如果通过语音命令打开相机,左上角会显示意外的“X”图标_第1张图片

Solution:
"Solution: To invisible cancel button if open camera by voice command."

packages/apps/SnapdragonCamera/src/com/android/camera/CaptureUI.java 

diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index f39a5ec..03c5dcd 100644
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -428,7 +428,12 @@
         if (intentMode != CaptureModule.INTENT_MODE_NORMAL) {
             mCameraControls.setIntentMode(intentMode);
             mCameraControls.setVideoMode(false);
-            mCancelButton.setVisibility(View.VISIBLE);
+            //BSPA-185897 'X' icon shouldn't show in left-upper corner if open camera by voice command.
+            if (XXXUtils.isXXX().orElse(false) && intentMode == CaptureModule.INTENT_MODE_STILL_IMAGE_CAMERA) {
+                Log.i(TAG,"Cancel icon shouldn't be show!");
+            } else {
+                mCancelButton.setVisibility(View.VISIBLE);
+            }
             mReviewCancelButton = mRootView.findViewById(R.id.preview_btn_cancel);
             mReviewDoneButton = mRootView.findViewById(R.id.done_button);
             mReviewRetakeButton = mRootView.findViewById(R.id.preview_btn_retake);

你可能感兴趣的:(数码相机,android)