diff options
author | Ray Chen <raychen@google.com> | 2012-03-16 14:38:04 +0800 |
---|---|---|
committer | Ray Chen <raychen@google.com> | 2012-03-19 15:31:39 +0800 |
commit | 655f63f04638dfe31045eab1b6b4c39cc2db10db (patch) | |
tree | aef80ab64769b6f98d867e4295c46f310d99b523 /src/com/android/gallery3d/app/AbstractGalleryActivity.java | |
parent | 32f779384c64e4c1abad40bd0acc9bfe3ac900eb (diff) | |
download | android_packages_apps_Gallery2-655f63f04638dfe31045eab1b6b4c39cc2db10db.tar.gz android_packages_apps_Gallery2-655f63f04638dfe31045eab1b6b4c39cc2db10db.tar.bz2 android_packages_apps_Gallery2-655f63f04638dfe31045eab1b6b4c39cc2db10db.zip |
Revert "bug #6176711: guard against null GalleryActionBar." and
fix DialogPicker's NPE issue while setting wallpaper.
Change-Id: I833ebfb04907d3a1378df98db51c96b490796a00
Diffstat (limited to 'src/com/android/gallery3d/app/AbstractGalleryActivity.java')
-rw-r--r-- | src/com/android/gallery3d/app/AbstractGalleryActivity.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java index 7d9d72b13..03f522f48 100644 --- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java +++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java @@ -27,6 +27,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.res.Configuration; import android.os.Bundle; +import android.view.MenuItem; import android.view.Window; import android.view.WindowManager; @@ -194,6 +195,17 @@ public class AbstractGalleryActivity extends Activity implements GalleryActivity return null; } + @Override + public boolean onOptionsItemSelected(MenuItem item) { + GLRoot root = getGLRoot(); + root.lockRenderThread(); + try { + return getStateManager().itemSelected(item); + } finally { + root.unlockRenderThread(); + } + } + // Shows status bar in portrait view, hide in landscape view private void toggleStatusBarByOrientation() { Window win = getWindow(); |