summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2013-10-06 20:03:32 -0700
committerJohn Hoford <hoford@google.com>2013-10-07 10:52:17 -0700
commit391e4a190d4afcfdf89b8e7892e972cc998cdf41 (patch)
tree50aaa8f9f698c9e3bfe77b3221feb73a59b9dd7b /src/com/android/gallery3d/ui
parent47f602c3262652f981a9c98358e5a8bde41656ea (diff)
downloadandroid_packages_apps_Gallery2-391e4a190d4afcfdf89b8e7892e972cc998cdf41.tar.gz
android_packages_apps_Gallery2-391e4a190d4afcfdf89b8e7892e972cc998cdf41.tar.bz2
android_packages_apps_Gallery2-391e4a190d4afcfdf89b8e7892e972cc998cdf41.zip
Switch Gallery2 to use the support lib for printing.
Now we have a class in the support library that uses a correct internal implemetation based on the API level. On older devices the app does not crash and on new devices it can print. Also this class does the heavy lifiting. Gallery2 was not using this class, rather it had its own (obsolete) implemetation that was not taking into account the image aspect ratio to provide a hint to the print system for the orientation to be used. bug:11099831 Change-Id: I4cd260614af4d9d87ec31d205ee2a5ef02ef5417
Diffstat (limited to 'src/com/android/gallery3d/ui')
-rw-r--r--src/com/android/gallery3d/ui/MenuExecutor.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java
index cbf9a8774..1ace71829 100644
--- a/src/com/android/gallery3d/ui/MenuExecutor.java
+++ b/src/com/android/gallery3d/ui/MenuExecutor.java
@@ -26,6 +26,7 @@ import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
+import android.support.v4.print.PrintHelper;
import android.view.Menu;
import android.view.MenuItem;
@@ -39,14 +40,12 @@ import com.android.gallery3d.data.Path;
import com.android.gallery3d.filtershow.crop.CropActivity;
import com.android.gallery3d.util.Future;
import com.android.gallery3d.util.GalleryUtils;
-import com.android.gallery3d.util.PrintJob;
import com.android.gallery3d.util.ThreadPool.Job;
import com.android.gallery3d.util.ThreadPool.JobContext;
import java.util.ArrayList;
public class MenuExecutor {
- @SuppressWarnings("unused")
private static final String TAG = "MenuExecutor";
private static final int MSG_TASK_COMPLETE = 1;
@@ -179,7 +178,7 @@ public class MenuExecutor {
boolean supportEdit = (supported & MediaObject.SUPPORT_EDIT) != 0;
boolean supportInfo = (supported & MediaObject.SUPPORT_INFO) != 0;
boolean supportPrint = (supported & MediaObject.SUPPORT_PRINT) != 0;
- supportPrint &= PrintJob.systemSupportsPrint();
+ supportPrint &= PrintHelper.systemSupportsPrint();
setMenuItemVisible(menu, R.id.action_delete, supportDelete);
setMenuItemVisible(menu, R.id.action_rotate_ccw, supportRotate);