summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2013-08-19 14:36:06 -0700
committerGeorge Mount <mount@google.com>2013-08-19 14:43:05 -0700
commit97dd05ad6ed8bfb9fde741919738bec5d87daf79 (patch)
tree440ab39febb6592fb031083b451a4827dc1b4b15
parent77505296d5943519b0e449edb364a6ee203496b7 (diff)
downloadandroid_packages_apps_Gallery2-97dd05ad6ed8bfb9fde741919738bec5d87daf79.tar.gz
android_packages_apps_Gallery2-97dd05ad6ed8bfb9fde741919738bec5d87daf79.tar.bz2
android_packages_apps_Gallery2-97dd05ad6ed8bfb9fde741919738bec5d87daf79.zip
Allow for extension for pano-based navigation.
Bug 9265629 Change-Id: Ief895285991b2200a423636580a68f1d21a31cdf
-rw-r--r--src/com/android/gallery3d/filtershow/crop/CropActivity.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/com/android/gallery3d/filtershow/crop/CropActivity.java b/src/com/android/gallery3d/filtershow/crop/CropActivity.java
index 0a0c36703..3a7829681 100644
--- a/src/com/android/gallery3d/filtershow/crop/CropActivity.java
+++ b/src/com/android/gallery3d/filtershow/crop/CropActivity.java
@@ -106,17 +106,18 @@ public class CropActivity extends Activity {
mCropView = (CropView) findViewById(R.id.cropView);
ActionBar actionBar = getActionBar();
- actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
- actionBar.setCustomView(R.layout.filtershow_actionbar);
-
- View mSaveButton = actionBar.getCustomView();
- mSaveButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View view) {
- startFinishOutput();
- }
- });
-
+ if (actionBar != null) {
+ actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
+ actionBar.setCustomView(R.layout.filtershow_actionbar);
+
+ View mSaveButton = actionBar.getCustomView();
+ mSaveButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ startFinishOutput();
+ }
+ });
+ }
if (intent.getData() != null) {
mSourceUri = intent.getData();
startLoadBitmap(mSourceUri);
@@ -275,7 +276,7 @@ public class CropActivity extends Activity {
}
}
- private void startFinishOutput() {
+ protected void startFinishOutput() {
if (finalIOGuard) {
return;
} else {