OSDN Git Service

Prevent NullPointerException of PhotoModule in quick resume-pause.
authorSenpo Hu <senpo@google.com>
Tue, 14 Oct 2014 18:51:56 +0000 (11:51 -0700)
committerSenpo Hu <senpo@google.com>
Tue, 14 Oct 2014 18:51:56 +0000 (11:51 -0700)
Bug: 17984743
Change-Id: Ie597dbddb383004deace8933f51f091029c0a9b4

src/com/android/camera/PhotoModule.java

index 8c1c88c..b729aa9 100644 (file)
@@ -313,6 +313,10 @@ public class PhotoModule
     }
 
     private void checkDisplayRotation() {
+        // Need to just be a no-op for the quick resume-pause scenario.
+        if (mPaused) {
+            return;
+        }
         // Set the display orientation if display rotation has changed.
         // Sometimes this happens when the device is held upside
         // down and camera app is opened. Rotation animation will