summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSanjeev Garg <sangarg@codeaurora.org>2015-08-13 17:08:39 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2015-08-13 23:12:52 -0700
commitfe56d3870dedf0d0a0f72ba1da8badd33c37e705 (patch)
tree75c9bc7ea263721fd43dc99e2a089016f721b4a6 /src
parentaa8e71215ad358d714c13073192f754615dda54c (diff)
downloadandroid_packages_apps_Snap-fe56d3870dedf0d0a0f72ba1da8badd33c37e705.tar.gz
android_packages_apps_Snap-fe56d3870dedf0d0a0f72ba1da8badd33c37e705.tar.bz2
android_packages_apps_Snap-fe56d3870dedf0d0a0f72ba1da8badd33c37e705.zip
SnapdragonCamera: Fixing NullPointerException in onCreate of VideoModule
As per new open camera optimization, setContentView is called after init. But VideoModule has a dependency in initialization on setContentView as if setContentView is not called before using mFilmStripView then its value is null. To avoid this changed the location of using mFilmStripView from initialization to onResume. Change-Id: I6f0116fa82554b11b06d733b3952e6596daa50d3
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoModule.java2
-rw-r--r--src/com/android/camera/VideoUI.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 77897f6b0..18b96f472 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1011,7 +1011,7 @@ public class VideoModule implements CameraModule,
mUI.initDisplayChangeListener();
// Initializing it here after the preview is started.
mUI.initializeZoom(mParameters);
-
+ mUI.setPreviewGesturesVideoUI();
keepScreenOnAwhile();
mOrientationManager.resume();
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 5f2c7cd08..32a84b2f7 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -597,6 +597,9 @@ public class VideoUI implements PieRenderer.PieListener,
}
});
+ }
+
+ public void setPreviewGesturesVideoUI() {
mActivity.setPreviewGestures(mGestures);
}