X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fcom%2Fandroid%2Fgallery3d%2Fapp%2FAbstractGalleryActivity.java;h=9af1fb8baef121aefe438eba24b38fee05b47a3f;hb=fac21a096afbe8eb517726cf4f9f093eade87ddc;hp=923c5b2e66d85ea6fc9c41889eac5fd3d2b474a6;hpb=2f3a8e1c95e1a689086e585a9db2482dc66ea39b;p=android-x86%2Fpackages-apps-Gallery2.git diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java index 923c5b2e6..9af1fb8ba 100644 --- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java +++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java @@ -32,6 +32,7 @@ import android.content.res.Configuration; import android.net.Uri; import android.os.Bundle; import android.os.IBinder; +import android.support.v4.print.PrintHelper; import android.view.Menu; import android.view.MenuItem; import android.view.Window; @@ -45,12 +46,12 @@ import com.android.gallery3d.filtershow.cache.ImageLoader; import com.android.gallery3d.ui.GLRoot; import com.android.gallery3d.ui.GLRootView; import com.android.gallery3d.util.PanoramaViewHelper; -import com.android.gallery3d.util.PrintJob; import com.android.gallery3d.util.ThreadPool; import com.android.photos.data.GalleryBitmapPool; +import java.io.FileNotFoundException; + public class AbstractGalleryActivity extends Activity implements GalleryContext { - @SuppressWarnings("unused") private static final String TAG = "AbstractGalleryActivity"; private GLRootView mGLRootView; private StateManager mStateManager; @@ -357,6 +358,11 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext } else { path = uri.getLastPathSegment(); } - PrintJob.printBitmapAtUri(this, path, uri); + PrintHelper printer = new PrintHelper(this); + try { + printer.printBitmap(path, uri); + } catch (FileNotFoundException fnfe) { + Log.e(TAG, "Error printing an image", fnfe); + } } }