summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2016-03-10 17:10:13 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-03-25 14:33:01 -0700
commitac95bcdaf902921b763618e94985e282591f5c44 (patch)
tree7664a68155236512a684d38da79980ba5e9d6e9a
parent5dcd941c45206bf6f226db95cef515be31478855 (diff)
downloadandroid_packages_apps_Snap-ac95bcdaf902921b763618e94985e282591f5c44.zip
android_packages_apps_Snap-ac95bcdaf902921b763618e94985e282591f5c44.tar.gz
android_packages_apps_Snap-ac95bcdaf902921b763618e94985e282591f5c44.tar.bz2
Snap: Fall back to REVIEW intent before VIEW intent
Change-Id: Ie8f1dac602957cb871d0f8c7043ac0f434f4bfac
-rw-r--r--src/com/android/camera/CameraActivity.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index e6e1ea4..ba79b1c 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -599,8 +599,22 @@ public class CameraActivity extends Activity
intent.putExtra(KEY_TOTAL_NUMBER, (adapter.getTotalNumber() -1));
startActivity(intent);
} catch (ActivityNotFoundException ex) {
- gotoViewPhoto(uri);
+ gotoReviewPhoto(uri);
} catch (IllegalArgumentException ex) {
+ gotoReviewPhoto(uri);
+ }
+ }
+
+ private void gotoReviewPhoto(Uri uri) {
+ try {
+ Log.w(TAG, "Gallery not found");
+ Intent intent = new Intent(CameraUtil.REVIEW_ACTION, uri);
+ startActivity(intent);
+ intent.putExtra(KEY_FROM_SNAPCAM, true);
+ intent.putExtra(KEY_TOTAL_NUMBER, getDataAdapter().getTotalNumber() - 1);
+ } catch (ActivityNotFoundException e) {
+ gotoViewPhoto(uri);
+ } catch (IllegalArgumentException e) {
gotoViewPhoto(uri);
}
}