summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ViewImage.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/camera/ViewImage.java b/src/com/android/camera/ViewImage.java
index 2e777fd..1376172 100644
--- a/src/com/android/camera/ViewImage.java
+++ b/src/com/android/camera/ViewImage.java
@@ -201,6 +201,17 @@ public class ViewImage extends Activity implements View.OnClickListener
mZoomButtonsController.setZoomOutEnabled(scale > 1);
}
+ @Override
+ protected void onDestroy() {
+ // This is necessary to make the ZoomButtonsController unregister
+ // its configuration change receiver.
+ if (mZoomButtonsController != null) {
+ mZoomButtonsController.setVisible(false);
+ }
+
+ super.onDestroy();
+ }
+
private void setupZoomButtonController(View rootView) {
mGestureDetector = new GestureDetector(this, new MyGestureListener());
mZoomButtonsController = new ZoomButtonsController(rootView);