Dont call requestLoadNewPhotos in secure camera mode.
Bug: 13530796
Change-Id: I6e9bb51ed529bc633511f7c29d3ac9268c617717
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 534672e..75179a3 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -1521,12 +1521,15 @@
}
mLocalImagesObserver.setActivityPaused(false);
mLocalVideosObserver.setActivityPaused(false);
- mLocalImagesObserver.setForegroundChangeListener(new LocalMediaObserver.ChangeListener() {
- @Override
- public void onChange() {
- mDataAdapter.requestLoadNewPhotos();
- }
- });
+ if (!mSecureCamera) {
+ mLocalImagesObserver.setForegroundChangeListener(
+ new LocalMediaObserver.ChangeListener() {
+ @Override
+ public void onChange() {
+ mDataAdapter.requestLoadNewPhotos();
+ }
+ });
+ }
keepScreenOnForAWhile();