diff options
Diffstat (limited to 'src/com/android/gallery3d/app/SlideshowPage.java')
-rw-r--r-- | src/com/android/gallery3d/app/SlideshowPage.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/app/SlideshowPage.java b/src/com/android/gallery3d/app/SlideshowPage.java index 174058dc8..2b15ab96e 100644 --- a/src/com/android/gallery3d/app/SlideshowPage.java +++ b/src/com/android/gallery3d/app/SlideshowPage.java @@ -16,8 +16,12 @@ package com.android.gallery3d.app; +import java.util.ArrayList; +import java.util.Random; + import android.app.Activity; import android.content.Intent; +import android.drm.DrmHelper; import android.graphics.Bitmap; import android.os.Bundle; import android.os.Handler; @@ -38,9 +42,6 @@ import com.android.gallery3d.ui.SynchronizedHandler; import com.android.gallery3d.util.Future; import com.android.gallery3d.util.FutureListener; -import java.util.ArrayList; -import java.util.Random; - public class SlideshowPage extends ActivityState { private static final String TAG = "SlideshowPage"; @@ -338,6 +339,15 @@ public class SlideshowPage extends ActivityState { mData = mMediaSet.getMediaItem(index, DATA_SIZE); mDataStart = index; dataEnd = index + mData.size(); + + // 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/*"); + } + } } return (index < mDataStart || index >= dataEnd) ? null : mData.get(index - mDataStart); |