summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-08-07 23:33:32 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-07 23:33:33 +0000
commita6b80cccafe0a4c2de575ec69d1960c3c0d88062 (patch)
treeda82437dd7fd9074b212e01fefa5f16bdf7dca3d /src
parent430e46b06f8e7ee1ca3e7ecdcef3e0a978637c03 (diff)
parenta08fab5958ecd50ada4b7c013af362029c61f117 (diff)
downloadandroid_packages_apps_Gallery2-a6b80cccafe0a4c2de575ec69d1960c3c0d88062.tar.gz
android_packages_apps_Gallery2-a6b80cccafe0a4c2de575ec69d1960c3c0d88062.tar.bz2
android_packages_apps_Gallery2-a6b80cccafe0a4c2de575ec69d1960c3c0d88062.zip
Merge "WAR the crash from re-editing missing online image" into gb-ub-photos-carlsbad
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 4700fccfe..0d1d6a34e 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -166,6 +166,7 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
}
private ServiceConnection mConnection = new ServiceConnection() {
+ @Override
public void onServiceConnected(ComponentName className, IBinder service) {
/*
* This is called when the connection with the service has been
@@ -179,6 +180,7 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
mBoundService.onStart();
}
+ @Override
public void onServiceDisconnected(ComponentName className) {
/*
* This is called when the connection with the service has been
@@ -604,6 +606,9 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
if (!result) {
cannotLoadImage();
+ // TODO: We should figure out the best way preventing this from
+ // happening, e.g: early checking.
+ return;
}
if (null == CachingPipeline.getRenderScriptContext()){
@@ -673,7 +678,7 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
private int getScreenImageSize() {
DisplayMetrics outMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(outMetrics);
- return (int) Math.max(outMetrics.heightPixels, outMetrics.widthPixels);
+ return Math.max(outMetrics.heightPixels, outMetrics.widthPixels);
}
private void showSavingProgress(String albumName) {