diff options
Diffstat (limited to 'src/com')
23 files changed, 215 insertions, 214 deletions
diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java index 932865a06..bd9f0170b 100644 --- a/src/com/android/gallery3d/app/AlbumPage.java +++ b/src/com/android/gallery3d/app/AlbumPage.java @@ -19,7 +19,7 @@ package com.android.gallery3d.app; import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Rect; import android.net.Uri; import android.os.Bundle; @@ -310,12 +310,12 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster if (isLayoutRtl && item == null) { return; // Item not ready yet, ignore the click } - if (DrmHelper.isDrmFile(DrmHelper.getFilePath( - mActivity.getAndroidContext(), item.getContentUri()))) { - Toast.makeText(mActivity, R.string.no_permission_for_drm, - Toast.LENGTH_SHORT).show(); - return; - } +// if (DrmHelper.isDrmFile(DrmHelper.getFilePath( +// mActivity.getAndroidContext(), item.getContentUri()))) { +// Toast.makeText(mActivity, R.string.no_permission_for_drm, +// Toast.LENGTH_SHORT).show(); +// return; +// } onGetContent(item); } else if (mLaunchedFromPhotoPage) { if (isLayoutRtl && item == null) { diff --git a/src/com/android/gallery3d/app/MovieActivity.java b/src/com/android/gallery3d/app/MovieActivity.java index 8fe9b270e..beab0e5ef 100644 --- a/src/com/android/gallery3d/app/MovieActivity.java +++ b/src/com/android/gallery3d/app/MovieActivity.java @@ -35,7 +35,7 @@ import android.content.res.Configuration; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.database.Cursor; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.media.AudioManager; @@ -242,14 +242,14 @@ public class MovieActivity extends Activity { }); // DRM validation - Uri original = intent.getData(); - String mimeType = intent.getType(); - String filepath = DrmHelper.getFilePath(this, original); - if (DrmHelper.isDrmFile(filepath)) { - if (!DrmHelper.validateLicense(this, filepath, mimeType)) { - finish(); - } - } +// Uri original = intent.getData(); +// String mimeType = intent.getType(); +// String filepath = DrmHelper.getFilePath(this, original); +// if (DrmHelper.isDrmFile(filepath)) { +// if (!DrmHelper.validateLicense(this, filepath, mimeType)) { +// finish(); +// } +// } } private void setActionBarLogoFromIntent(Intent intent) { @@ -344,11 +344,11 @@ public class MovieActivity extends Activity { super.onPrepareOptionsMenu(menu); mMovieHooker.onPrepareOptionsMenu(menu); - if (mMovieItem != null - && !DrmHelper.isShareableDrmFile(DrmHelper.getFilePath(this, - mMovieItem.getUri()))) { - menu.removeItem(R.id.action_share); - } +// if (mMovieItem != null +// && !DrmHelper.isShareableDrmFile(DrmHelper.getFilePath(this, +// mMovieItem.getUri()))) { +// menu.removeItem(R.id.action_share); +// } return true; } diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 65c26278a..9f3b85f10 100755..100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -24,7 +24,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.Configuration; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Rect; import android.media.MediaFile; import android.net.Uri; @@ -811,13 +811,13 @@ public abstract class PhotoPage extends ActivityState implements // Do not consume rights of a GIF image and video here. // ViewGifImage will take care of GIF rights consumption stub. // MediaPlayer will handle the video rights consumption stub. - String mime = mCurrentPhoto.getMimeType(); - if (!TextUtils.isEmpty(mime) && !mime.equals("image/gif") - && !mime.startsWith("video/")) { - DrmHelper.manageDrmLicense(mActivity.getAndroidContext(), - mHandler, mCurrentPhoto.getFilePath(), - mCurrentPhoto.getMimeType()); - } +// String mime = mCurrentPhoto.getMimeType(); +// if (!TextUtils.isEmpty(mime) && !mime.equals("image/gif") +// && !mime.startsWith("video/")) { +// DrmHelper.manageDrmLicense(mActivity.getAndroidContext(), +// mHandler, mCurrentPhoto.getFilePath(), +// mCurrentPhoto.getMimeType()); +// } } } @@ -1173,12 +1173,12 @@ public abstract class PhotoPage extends ActivityState implements mSelectionManager.toggle(path); mMenuExecutor.onMenuClicked(item, confirmMsg, mConfirmDialogListener); return true; - case R.id.action_drm_info: - String filepath = current.getFilePath(); - if (DrmHelper.isDrmFile(filepath)) { - DrmHelper.showDrmInfo(mActivity.getAndroidContext(), filepath); - } - return true; +// case R.id.action_drm_info: +// String filepath = current.getFilePath(); +// if (DrmHelper.isDrmFile(filepath)) { +// DrmHelper.showDrmInfo(mActivity.getAndroidContext(), filepath); +// } +// return true; default : return false; } @@ -1452,16 +1452,16 @@ public abstract class PhotoPage extends ActivityState implements // Do not consume rights of a GIF image and video here. // ViewGifImage will take care of GIF rights consumption stub. // MediaPlayer will handle the video rights consumption stub. - if ((mMediaSet != null && mMediaSet.getMediaItemCount() > 1) - || !(this instanceof SinglePhotoPage)) { - String mime = mCurrentPhoto.getMimeType(); - if (!TextUtils.isEmpty(mime) && !mime.equals("image/gif") - && !mime.startsWith("video/")) { - DrmHelper.manageDrmLicense(mActivity.getAndroidContext(), - mHandler, mCurrentPhoto.getFilePath(), - mCurrentPhoto.getMimeType()); - } - } +// if ((mMediaSet != null && mMediaSet.getMediaItemCount() > 1) +// || !(this instanceof SinglePhotoPage)) { +// String mime = mCurrentPhoto.getMimeType(); +// if (!TextUtils.isEmpty(mime) && !mime.equals("image/gif") +// && !mime.startsWith("video/")) { +// DrmHelper.manageDrmLicense(mActivity.getAndroidContext(), +// mHandler, mCurrentPhoto.getFilePath(), +// mCurrentPhoto.getMimeType()); +// } +// } } } @@ -1656,9 +1656,9 @@ public abstract class PhotoPage extends ActivityState implements private static void viewAnimateGif(Activity activity, Uri uri) { Intent intent = new Intent(ViewGifImage.VIEW_GIF_ACTION, uri); - if (DrmHelper.isDrmFile(uri.toString())) { - intent.setDataAndType(uri, "image/gif"); - } +// if (DrmHelper.isDrmFile(uri.toString())) { +// intent.setDataAndType(uri, "image/gif"); +// } activity.startActivity(intent); } } diff --git a/src/com/android/gallery3d/app/SlideshowPage.java b/src/com/android/gallery3d/app/SlideshowPage.java index 2b15ab96e..ca46ce3e8 100644 --- a/src/com/android/gallery3d/app/SlideshowPage.java +++ b/src/com/android/gallery3d/app/SlideshowPage.java @@ -21,7 +21,7 @@ import java.util.Random; import android.app.Activity; import android.content.Intent; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Bitmap; import android.os.Bundle; import android.os.Handler; @@ -342,12 +342,12 @@ public class SlideshowPage extends ActivityState { // Consume license once in each element of the slide-show // This is a non-blocking loop operation - for (int i = 0; i < mData.size(); i++) { - String path = mData.get(i).getFilePath(); - if (DrmHelper.isDrmFile(path)) { - DrmHelper.consumeDrmRights(path, "image/*"); - } - } +// for (int i = 0; i < mData.size(); i++) { +// String path = mData.get(i).getFilePath(); +// if (DrmHelper.isDrmFile(path)) { +// DrmHelper.consumeDrmRights(path, "image/*"); +// } +// } } return (index < mDataStart || index >= dataEnd) ? null : mData.get(index - mDataStart); diff --git a/src/com/android/gallery3d/data/ImageCacheRequest.java b/src/com/android/gallery3d/data/ImageCacheRequest.java index faca5d7d8..90fb28c96 100644 --- a/src/com/android/gallery3d/data/ImageCacheRequest.java +++ b/src/com/android/gallery3d/data/ImageCacheRequest.java @@ -16,7 +16,7 @@ package com.android.gallery3d.data; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.text.TextUtils; @@ -63,13 +63,13 @@ abstract class ImageCacheRequest implements Job<Bitmap> { @Override public Bitmap run(JobContext jc) { - if (!TextUtils.isEmpty(mFilePath) && !TextUtils.isEmpty(mMimeType) - && !mMimeType.startsWith("video/")) { - if (DrmHelper.isDrmFile(mFilePath) - && mType != MediaItem.TYPE_MICROTHUMBNAIL) { - return onDecodeOriginal(jc, mType); - } - } +// if (!TextUtils.isEmpty(mFilePath) && !TextUtils.isEmpty(mMimeType) +// && !mMimeType.startsWith("video/")) { +// if (DrmHelper.isDrmFile(mFilePath) +// && mType != MediaItem.TYPE_MICROTHUMBNAIL) { +// return onDecodeOriginal(jc, mType); +// } +// } ImageCacheService cacheService = mApplication.getImageCacheService(); diff --git a/src/com/android/gallery3d/data/LocalImage.java b/src/com/android/gallery3d/data/LocalImage.java index 1b0384548..ca07e8532 100644 --- a/src/com/android/gallery3d/data/LocalImage.java +++ b/src/com/android/gallery3d/data/LocalImage.java @@ -20,7 +20,7 @@ import android.annotation.TargetApi; import android.content.ContentResolver; import android.content.ContentValues; import android.database.Cursor; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.BitmapRegionDecoder; @@ -199,10 +199,10 @@ public class LocalImage extends LocalMediaItem { BitmapFactory.Options options = new BitmapFactory.Options(); options.inPreferredConfig = Bitmap.Config.ARGB_8888; - if (DrmHelper.isDrmFile(mLocalFilePath)) { - return DecodeUtils.ensureGLCompatibleBitmap(DrmHelper - .getBitmap(mLocalFilePath, options)); - } +// if (DrmHelper.isDrmFile(mLocalFilePath)) { +// return DecodeUtils.ensureGLCompatibleBitmap(DrmHelper +// .getBitmap(mLocalFilePath, options)); +// } int targetSize = MediaItem.getTargetSize(type); @@ -244,10 +244,10 @@ public class LocalImage extends LocalMediaItem { @Override public BitmapRegionDecoder run(JobContext jc) { - if (DrmHelper.isDrmFile(mLocalFilePath)) { - return DrmHelper.createBitmapRegionDecoder(mLocalFilePath, - false); - } +// if (DrmHelper.isDrmFile(mLocalFilePath)) { +// return DrmHelper.createBitmapRegionDecoder(mLocalFilePath, +// false); +// } return DecodeUtils.createBitmapRegionDecoder(jc, mLocalFilePath, false); } @@ -256,16 +256,17 @@ public class LocalImage extends LocalMediaItem { @Override public int getSupportedOperations() { int operation = SUPPORT_DELETE | SUPPORT_INFO; - if (DrmHelper.isDrmFile(getFilePath())) { - if (DrmHelper.isDrmFLBlocking(mApplication.getAndroidContext(), - getFilePath())) { - operation |= SUPPORT_SETAS; - } - operation |= SUPPORT_DRM_INFO | SUPPORT_FULL_IMAGE; - if (DrmHelper.isShareableDrmFile(getFilePath())) { - operation |= SUPPORT_SHARE; - } - } else { + +// if (DrmHelper.isDrmFile(getFilePath())) { +// if (DrmHelper.isDrmFLBlocking(mApplication.getAndroidContext(), +// getFilePath())) { +// operation |= SUPPORT_SETAS; +// } +// operation |= SUPPORT_DRM_INFO | SUPPORT_FULL_IMAGE; +// if (DrmHelper.isShareableDrmFile(getFilePath())) { +// operation |= SUPPORT_SHARE; +// } +// } else { operation = SUPPORT_DELETE | SUPPORT_SHARE | SUPPORT_CROP | SUPPORT_SETAS | SUPPORT_PRINT | SUPPORT_INFO; if (BitmapUtils.isSupportedByRegionDecoder(mimeType)) { @@ -279,7 +280,7 @@ public class LocalImage extends LocalMediaItem { if (GalleryUtils.isValidLocation(latitude, longitude)) { operation |= SUPPORT_SHOW_ON_MAP; } - } +// } return operation; } @@ -344,9 +345,9 @@ public class LocalImage extends LocalMediaItem { @Override public int getMediaType() { - if (DrmHelper.isDrmFile(getFilePath())) { - return MEDIA_TYPE_DRM_IMAGE; - } +// if (DrmHelper.isDrmFile(getFilePath())) { +// return MEDIA_TYPE_DRM_IMAGE; +// } return MEDIA_TYPE_IMAGE; } diff --git a/src/com/android/gallery3d/data/LocalVideo.java b/src/com/android/gallery3d/data/LocalVideo.java index 7fafe97ae..044f43fac 100644 --- a/src/com/android/gallery3d/data/LocalVideo.java +++ b/src/com/android/gallery3d/data/LocalVideo.java @@ -18,7 +18,7 @@ package com.android.gallery3d.data; import android.content.ContentResolver; import android.database.Cursor; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Bitmap; import android.graphics.BitmapRegionDecoder; import android.net.Uri; @@ -190,14 +190,14 @@ public class LocalVideo extends LocalMediaItem { @Override public int getSupportedOperations() { - if (DrmHelper.isDrmFile(getFilePath())) { - int operation = SUPPORT_DELETE | SUPPORT_PLAY | SUPPORT_INFO - | SUPPORT_DRM_INFO; - if (DrmHelper.isShareableDrmFile(getFilePath())) { - operation |= SUPPORT_SHARE; - } - return operation; - } +// if (DrmHelper.isDrmFile(getFilePath())) { +// int operation = SUPPORT_DELETE | SUPPORT_PLAY | SUPPORT_INFO +// | SUPPORT_DRM_INFO; +// if (DrmHelper.isShareableDrmFile(getFilePath())) { +// operation |= SUPPORT_SHARE; +// } +// return operation; +// } return SUPPORT_DELETE | SUPPORT_SHARE | SUPPORT_PLAY | SUPPORT_INFO | SUPPORT_TRIM | SUPPORT_MUTE; @@ -229,9 +229,9 @@ public class LocalVideo extends LocalMediaItem { @Override public int getMediaType() { - if (DrmHelper.isDrmFile(getFilePath())) { - return MEDIA_TYPE_DRM_VIDEO; - } +// if (DrmHelper.isDrmFile(getFilePath())) { +// return MEDIA_TYPE_DRM_VIDEO; +// } return MEDIA_TYPE_VIDEO; } diff --git a/src/com/android/gallery3d/data/UriImage.java b/src/com/android/gallery3d/data/UriImage.java index 13176e4aa..47ba535fe 100644 --- a/src/com/android/gallery3d/data/UriImage.java +++ b/src/com/android/gallery3d/data/UriImage.java @@ -17,7 +17,7 @@ package com.android.gallery3d.data; import android.content.ContentResolver; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory.Options; @@ -59,14 +59,14 @@ public class UriImage extends MediaItem { private PanoramaMetadataSupport mPanoramaMetadata = new PanoramaMetadataSupport(this); private GalleryApp mApplication; - private String mFilePath; +// private String mFilePath; public UriImage(GalleryApp application, Path path, Uri uri, String contentType) { super(path, nextVersionNumber()); mUri = uri; mApplication = Utils.checkNotNull(application); mContentType = contentType; - mFilePath = DrmHelper.getFilePath(mApplication.getAndroidContext(), uri); +// mFilePath = DrmHelper.getFilePath(mApplication.getAndroidContext(), uri); } @Override @@ -174,13 +174,13 @@ public class UriImage extends MediaItem { private class RegionDecoderJob implements Job<BitmapRegionDecoder> { @Override public BitmapRegionDecoder run(JobContext jc) { - if (DrmHelper.isDrmFile(getFilePath())) { - BitmapRegionDecoder decoder = DrmHelper - .createBitmapRegionDecoder(getFilePath(), false); - mWidth = decoder.getWidth(); - mHeight = decoder.getHeight(); - return decoder; - } +// if (DrmHelper.isDrmFile(getFilePath())) { +// BitmapRegionDecoder decoder = DrmHelper +// .createBitmapRegionDecoder(getFilePath(), false); +// mWidth = decoder.getWidth(); +// mHeight = decoder.getHeight(); +// return decoder; +// } if (!prepareInputFile(jc)) return null; BitmapRegionDecoder decoder = DecodeUtils.createBitmapRegionDecoder( @@ -200,9 +200,9 @@ public class UriImage extends MediaItem { @Override public Bitmap run(JobContext jc) { - if (DrmHelper.isDrmFile(getFilePath())) { - return DecodeUtils.ensureGLCompatibleBitmap(DrmHelper.getBitmap(getFilePath())); - } +// if (DrmHelper.isDrmFile(getFilePath())) { +// return DecodeUtils.ensureGLCompatibleBitmap(DrmHelper.getBitmap(getFilePath())); +// } if (!prepareInputFile(jc)) return null; int targetSize = MediaItem.getTargetSize(mType); @@ -227,18 +227,18 @@ public class UriImage extends MediaItem { @Override public int getSupportedOperations() { int supported = 0; - if (DrmHelper.isDrmFile(getFilePath())) { - supported |= SUPPORT_DRM_INFO | SUPPORT_FULL_IMAGE; - if (DrmHelper.isShareableDrmFile(getFilePath())) { - supported |= SUPPORT_SHARE; - } - } else { +// if (DrmHelper.isDrmFile(getFilePath())) { +// supported |= SUPPORT_DRM_INFO | SUPPORT_FULL_IMAGE; +// if (DrmHelper.isShareableDrmFile(getFilePath())) { +// supported |= SUPPORT_SHARE; +// } +// } else { supported = SUPPORT_PRINT | SUPPORT_SETAS; if (isSharable()) supported |= SUPPORT_SHARE; if (BitmapUtils.isSupportedByRegionDecoder(mContentType)) { supported |= SUPPORT_EDIT | SUPPORT_FULL_IMAGE; } - } +// } return supported; } @@ -262,9 +262,9 @@ public class UriImage extends MediaItem { @Override public int getMediaType() { - if (DrmHelper.isDrmFile(getFilePath())) { - return MEDIA_TYPE_DRM_IMAGE; - } +// if (DrmHelper.isDrmFile(getFilePath())) { +// return MEDIA_TYPE_DRM_IMAGE; +// } return MEDIA_TYPE_IMAGE; } @@ -323,8 +323,8 @@ public class UriImage extends MediaItem { return mRotation; } - @Override - public String getFilePath() { - return mFilePath; - } +// @Override +// public String getFilePath() { +// return mFilePath; +// } } diff --git a/src/com/android/gallery3d/data/UriSource.java b/src/com/android/gallery3d/data/UriSource.java index b4bb16072..f31283c24 100644 --- a/src/com/android/gallery3d/data/UriSource.java +++ b/src/com/android/gallery3d/data/UriSource.java @@ -17,7 +17,7 @@ package com.android.gallery3d.data; import android.content.ContentResolver; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.net.Uri; import android.text.TextUtils; import android.webkit.MimeTypeMap; @@ -75,19 +75,19 @@ class UriSource extends MediaSource { @Override public Path findPathByUri(Uri uri, String type) { String mimeType = getMimeType(uri); - if (DrmHelper.isDrmMimeType(mimeType)) { - String path = DrmHelper.getFilePath( - mApplication.getAndroidContext(), uri); - if (!TextUtils.isEmpty(path)) { - try { - return Path.fromString("/uri/" - + URLEncoder.encode(path, CHARSET_UTF_8) + "/" - + URLEncoder.encode(type, CHARSET_UTF_8)); - } catch (UnsupportedEncodingException e) { - throw new AssertionError(e); - } - } - } +// if (DrmHelper.isDrmMimeType(mimeType)) { +// String path = DrmHelper.getFilePath( +// mApplication.getAndroidContext(), uri); +// if (!TextUtils.isEmpty(path)) { +// try { +// return Path.fromString("/uri/" +// + URLEncoder.encode(path, CHARSET_UTF_8) + "/" +// + URLEncoder.encode(type, CHARSET_UTF_8)); +// } catch (UnsupportedEncodingException e) { +// throw new AssertionError(e); +// } +// } +// } // Try to find a most specific type but it has to be started with "image/" if ((type == null) || (IMAGE_TYPE_ANY.equals(type) diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilter.java b/src/com/android/gallery3d/filtershow/filters/ImageFilter.java index 437137416..1fcd3008c 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilter.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilter.java @@ -19,7 +19,7 @@ package com.android.gallery3d.filtershow.filters; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.Matrix; -import android.support.v8.renderscript.Allocation; +import android.renderscript.Allocation; import android.widget.Toast; import com.android.gallery3d.filtershow.imageshow.GeometryMathUtils; diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java index 5d3856ebc..8482eac32 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java @@ -18,11 +18,11 @@ package com.android.gallery3d.filtershow.filters; import android.graphics.Bitmap; import android.graphics.Matrix; -import android.support.v8.renderscript.Allocation; -import android.support.v8.renderscript.Element; -import android.support.v8.renderscript.RenderScript; -import android.support.v8.renderscript.Script.LaunchOptions; -import android.support.v8.renderscript.Type; +import android.renderscript.Allocation; +import android.renderscript.Element; +import android.renderscript.RenderScript; +import android.renderscript.Script.LaunchOptions; +import android.renderscript.Type; import com.android.gallery3d.R; import com.android.gallery3d.filtershow.pipeline.FilterEnvironment; diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java index 0a615afd4..4d5a79c04 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java @@ -26,11 +26,11 @@ import com.android.gallery3d.filtershow.pipeline.FilterEnvironment; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Matrix; -import android.support.v8.renderscript.Allocation; -import android.support.v8.renderscript.Element; -import android.support.v8.renderscript.RenderScript; -import android.support.v8.renderscript.Script.LaunchOptions; -import android.support.v8.renderscript.Type; +import android.renderscript.Allocation; +import android.renderscript.Element; +import android.renderscript.RenderScript; +import android.renderscript.Script.LaunchOptions; +import android.renderscript.Type; import android.util.Log; import com.android.gallery3d.R; diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java index e94e2a63a..3c54456b6 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java @@ -18,7 +18,7 @@ package com.android.gallery3d.filtershow.filters; import android.graphics.Bitmap; import android.graphics.BitmapFactory; -import android.support.v8.renderscript.*; +import android.renderscript.*; import android.util.Log; import android.content.res.Resources; import com.android.gallery3d.R; diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java index e0b4cf687..0d0dd3b08 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java @@ -24,11 +24,11 @@ import android.graphics.Rect; import com.android.gallery3d.R; import com.android.gallery3d.filtershow.imageshow.MasterImage; import com.android.gallery3d.filtershow.pipeline.FilterEnvironment; -import android.support.v8.renderscript.Allocation; -import android.support.v8.renderscript.Element; -import android.support.v8.renderscript.RenderScript; -import android.support.v8.renderscript.Script.LaunchOptions; -import android.support.v8.renderscript.Type; +import android.renderscript.Allocation; +import android.renderscript.Element; +import android.renderscript.RenderScript; +import android.renderscript.Script.LaunchOptions; +import android.renderscript.Type; import android.util.Log; public class ImageFilterVignette extends ImageFilterRS { diff --git a/src/com/android/gallery3d/filtershow/pipeline/Buffer.java b/src/com/android/gallery3d/filtershow/pipeline/Buffer.java index c378eb994..a487a5d8d 100644 --- a/src/com/android/gallery3d/filtershow/pipeline/Buffer.java +++ b/src/com/android/gallery3d/filtershow/pipeline/Buffer.java @@ -18,8 +18,8 @@ package com.android.gallery3d.filtershow.pipeline; import android.graphics.Bitmap; import android.graphics.Canvas; -import android.support.v8.renderscript.Allocation; -import android.support.v8.renderscript.RenderScript; +import android.renderscript.Allocation; +import android.renderscript.RenderScript; import android.util.Log; import com.android.gallery3d.filtershow.cache.BitmapCache; import com.android.gallery3d.filtershow.imageshow.MasterImage; diff --git a/src/com/android/gallery3d/filtershow/pipeline/CachingPipeline.java b/src/com/android/gallery3d/filtershow/pipeline/CachingPipeline.java index 8ae9a7c7b..2923e3bbb 100644 --- a/src/com/android/gallery3d/filtershow/pipeline/CachingPipeline.java +++ b/src/com/android/gallery3d/filtershow/pipeline/CachingPipeline.java @@ -24,8 +24,8 @@ import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; -import android.support.v8.renderscript.Allocation; -import android.support.v8.renderscript.RenderScript; +import android.renderscript.Allocation; +import android.renderscript.RenderScript; import android.util.Log; import com.android.gallery3d.filtershow.cache.BitmapCache; diff --git a/src/com/android/gallery3d/filtershow/pipeline/FilterEnvironment.java b/src/com/android/gallery3d/filtershow/pipeline/FilterEnvironment.java index ebf83b720..0b84f5203 100644 --- a/src/com/android/gallery3d/filtershow/pipeline/FilterEnvironment.java +++ b/src/com/android/gallery3d/filtershow/pipeline/FilterEnvironment.java @@ -18,7 +18,7 @@ package com.android.gallery3d.filtershow.pipeline; import android.graphics.Bitmap; import android.graphics.Canvas; -import android.support.v8.renderscript.Allocation; +import android.renderscript.Allocation; import com.android.gallery3d.app.Log; import com.android.gallery3d.filtershow.cache.BitmapCache; diff --git a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java index 18321f567..1460ad434 100644 --- a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java +++ b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java @@ -18,7 +18,7 @@ package com.android.gallery3d.filtershow.pipeline; import android.graphics.Bitmap; import android.graphics.Rect; -import android.support.v8.renderscript.Allocation; +import android.renderscript.Allocation; import android.util.JsonReader; import android.util.JsonWriter; import android.util.Log; diff --git a/src/com/android/gallery3d/filtershow/pipeline/PipelineInterface.java b/src/com/android/gallery3d/filtershow/pipeline/PipelineInterface.java index d53768c95..ad59e0c44 100644 --- a/src/com/android/gallery3d/filtershow/pipeline/PipelineInterface.java +++ b/src/com/android/gallery3d/filtershow/pipeline/PipelineInterface.java @@ -18,8 +18,8 @@ package com.android.gallery3d.filtershow.pipeline; import android.content.res.Resources; import android.graphics.Bitmap; -import android.support.v8.renderscript.Allocation; -import android.support.v8.renderscript.RenderScript; +import android.renderscript.Allocation; +import android.renderscript.RenderScript; public interface PipelineInterface { public String getName(); diff --git a/src/com/android/gallery3d/gadget/WidgetService.java b/src/com/android/gallery3d/gadget/WidgetService.java index b240ded46..751aaef9d 100644 --- a/src/com/android/gallery3d/gadget/WidgetService.java +++ b/src/com/android/gallery3d/gadget/WidgetService.java @@ -19,7 +19,7 @@ package com.android.gallery3d.gadget; import android.annotation.TargetApi; import android.appwidget.AppWidgetManager; import android.content.Intent; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Bitmap; import android.net.Uri; import android.view.View; @@ -121,10 +121,10 @@ public class WidgetService extends RemoteViewsService { Bitmap bitmap = mSource.getImage(position); boolean isDrm = false; - if (DrmHelper.isDrmFile(DrmHelper.getFilePath( - mApp.getAndroidContext(), mSource.getContentUri(position)))) { - isDrm = true; - } +// if (DrmHelper.isDrmFile(DrmHelper.getFilePath( +// mApp.getAndroidContext(), mSource.getContentUri(position)))) { +// isDrm = true; +// } if (isDrm) { if (bitmap == null) { diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java index 9b2c3259c..2e8b90644 100644 --- a/src/com/android/gallery3d/ui/MenuExecutor.java +++ b/src/com/android/gallery3d/ui/MenuExecutor.java @@ -24,7 +24,7 @@ import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.content.Intent; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.net.Uri; import android.os.Handler; import android.os.Message; @@ -261,9 +261,9 @@ public class MenuExecutor { // DRM files can be set as wallpaper only. Don't show other options // to set as. Uri uri = intent.getData(); - if (DrmHelper.isDrmFile(DrmHelper.getFilePath(mActivity, uri))) { - intent.setPackage("com.android.gallery3d"); - } +// if (DrmHelper.isDrmFile(DrmHelper.getFilePath(mActivity, uri))) { +// intent.setPackage("com.android.gallery3d"); +// } Activity activity = mActivity; activity.startActivity(Intent.createChooser( @@ -282,20 +282,20 @@ public class MenuExecutor { case R.id.action_show_on_map: title = R.string.show_on_map; break; - case R.id.action_drm_info: - DataManager manager = mActivity.getDataManager(); - Path path = getSingleSelectedPath(); - Uri uri = manager.getContentUri(path); - String filepath = null; - String scheme = uri.getScheme(); - if ("file".equals(scheme)) { - filepath = uri.getPath(); - } else { - filepath = DrmHelper.getFilePath(mActivity, uri); - } - DrmHelper.showDrmInfo(mActivity, filepath); - title = R.string.drm_license_info; - break; +// case R.id.action_drm_info: +// DataManager manager = mActivity.getDataManager(); +// Path path = getSingleSelectedPath(); +// Uri uri = manager.getContentUri(path); +// String filepath = null; +// String scheme = uri.getScheme(); +// if ("file".equals(scheme)) { +// filepath = uri.getPath(); +// } else { +// filepath = DrmHelper.getFilePath(mActivity, uri); +// } +// DrmHelper.showDrmInfo(mActivity, filepath); +// title = R.string.drm_license_info; +// break; default: return; } diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java index 265a53fc7..cb14e490d 100755..100644 --- a/src/com/android/gallery3d/ui/PhotoView.java +++ b/src/com/android/gallery3d/ui/PhotoView.java @@ -18,7 +18,7 @@ package com.android.gallery3d.ui; import android.content.Context; import android.content.res.Configuration; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Rect; @@ -743,14 +743,14 @@ public class PhotoView extends GLView { drawLoadingFailMessage(canvas); } - if (getFilmMode()) { - MediaItem item = mModel.getMediaItem(0); - if (item != null) { - if (DrmHelper.isDrmFile(item.getFilePath())) { - drawDrmIcon(canvas, s); - } - } - } +// if (getFilmMode()) { +// MediaItem item = mModel.getMediaItem(0); +// if (item != null) { +// if (DrmHelper.isDrmFile(item.getFilePath())) { +// drawDrmIcon(canvas, s); +// } +// } +// } // Draw a debug indicator showing which picture has focus (index == // 0). @@ -874,12 +874,12 @@ public class PhotoView extends GLView { drawLoadingFailMessage(canvas); } - MediaItem item = mModel.getMediaItem(mIndex); - if (item != null) { - if (DrmHelper.isDrmFile(item.getFilePath())) { - drawDrmIcon(canvas, s); - } - } +// MediaItem item = mModel.getMediaItem(mIndex); +// if (item != null) { +// if (DrmHelper.isDrmFile(item.getFilePath())) { +// drawDrmIcon(canvas, s); +// } +// } canvas.restore(); } diff --git a/src/com/android/gallery3d/util/GIFView.java b/src/com/android/gallery3d/util/GIFView.java index c80625b41..6c6c49b95 100755..100644 --- a/src/com/android/gallery3d/util/GIFView.java +++ b/src/com/android/gallery3d/util/GIFView.java @@ -6,7 +6,7 @@ import android.content.Context; import android.content.ContentResolver; import android.content.res.AssetManager; import android.database.Cursor; -import android.drm.DrmHelper; +//import android.drm.DrmHelper; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; @@ -47,17 +47,17 @@ public class GIFView extends ImageView implements GifAction { mUri = uri; // Let decode the GIF image from byte stream instead of file stream - String filepath = DrmHelper.getFilePath(mContext, mUri); - if (DrmHelper.isDrmFile(filepath)) { - byte[] bytes = DrmHelper.getDrmImageBytes(filepath); - DrmHelper.manageDrmLicense(mContext, this.getHandler(), filepath, - "image/gif"); - if (bytes == null) { - return false; - } - startDecode(bytes); - return true; - } +// String filepath = DrmHelper.getFilePath(mContext, mUri); +// if (DrmHelper.isDrmFile(filepath)) { +// byte[] bytes = DrmHelper.getDrmImageBytes(filepath); +// DrmHelper.manageDrmLicense(mContext, this.getHandler(), filepath, +// "image/gif"); +// if (bytes == null) { +// return false; +// } +// startDecode(bytes); +// return true; +// } InputStream is = getInputStream(uri); if (is == null || (getFileSize (is) == 0)) { |