diff options
author | zhuw <zhuw@codeaurora.org> | 2018-05-09 15:39:48 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-05-09 00:42:47 -0700 |
commit | c2a6ba3dfeeecd707f771b87612c808fcd173d78 (patch) | |
tree | aeafd48d2152206235ad93e096feb042222aee47 /src/com/android/camera/ui | |
parent | 901778a2697bbef1239d88ca7e1a5faf0a0f2fc3 (diff) | |
download | android_packages_apps_Snap-c2a6ba3dfeeecd707f771b87612c808fcd173d78.tar.gz android_packages_apps_Snap-c2a6ba3dfeeecd707f771b87612c808fcd173d78.tar.bz2 android_packages_apps_Snap-c2a6ba3dfeeecd707f771b87612c808fcd173d78.zip |
Fix focus close when rotate phone during panorama capturing
if layout size is changed and then the mAargbBuffer.length is less than
processing bitmap's w*h, don't process this frame.
Change-Id: I2ce9d35b4d89a79bd5863be59c0bd4bf843e81e2
Diffstat (limited to 'src/com/android/camera/ui')
-rw-r--r-- | src/com/android/camera/ui/PanoCaptureProcessView.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/camera/ui/PanoCaptureProcessView.java b/src/com/android/camera/ui/PanoCaptureProcessView.java index b62c588fa..478c182db 100644 --- a/src/com/android/camera/ui/PanoCaptureProcessView.java +++ b/src/com/android/camera/ui/PanoCaptureProcessView.java @@ -437,6 +437,9 @@ public class PanoCaptureProcessView extends View implements SensorEventListener int a, R, G, B, Y, U, V; int index = 0; + if (mAargbBuffer.length < w * h) { + return; + } bitmap.getPixels(mAargbBuffer, 0, w, 0, 0, w, h); for (int j = 0; j < h; j++) { for (int i = 0; i < w; i++) { |