diff options
| -rw-r--r-- | src/com/android/gallery3d/data/ClusterAlbum.java | 5 | ||||
| -rw-r--r-- | src/com/android/gallery3d/ui/TiledScreenNail.java | 4 | ||||
| -rw-r--r-- | src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/data/ClusterAlbum.java b/src/com/android/gallery3d/data/ClusterAlbum.java index 3cf4f95c2..6cf7bee6b 100644 --- a/src/com/android/gallery3d/data/ClusterAlbum.java +++ b/src/com/android/gallery3d/data/ClusterAlbum.java @@ -193,11 +193,16 @@ public class ClusterAlbum extends MediaSet implements ContentListener { @Override public int getSupportedOperations() { + // Timeline title item doesn't support anything, just its sub objects supported. + if (mKind == ClusterSource.CLUSTER_ALBUMSET_TIME) { + return 0; + } return SUPPORT_SHARE | SUPPORT_DELETE | SUPPORT_INFO; } @Override public void delete() { + if ((getSupportedOperations() & MediaObject.SUPPORT_DELETE) == 0) return; ItemConsumer consumer = new ItemConsumer() { @Override public void consume(int index, MediaItem item) { diff --git a/src/com/android/gallery3d/ui/TiledScreenNail.java b/src/com/android/gallery3d/ui/TiledScreenNail.java index 860e230bb..0ade9389c 100644 --- a/src/com/android/gallery3d/ui/TiledScreenNail.java +++ b/src/com/android/gallery3d/ui/TiledScreenNail.java @@ -153,7 +153,7 @@ public class TiledScreenNail implements ScreenNail { @Override public void draw(GLCanvas canvas, int x, int y, int width, int height) { - if (mTexture == null || !mTexture.isReady()) { + if (mTexture == null) { if (mAnimationStartTime == ANIMATION_NOT_NEEDED) { mAnimationStartTime = ANIMATION_NEEDED; } @@ -177,7 +177,7 @@ public class TiledScreenNail implements ScreenNail { @Override public void draw(GLCanvas canvas, RectF source, RectF dest) { - if (mTexture == null || !mTexture.isReady()) { + if (mTexture == null) { canvas.fillRect(dest.left, dest.top, dest.width(), dest.height(), mPlaceholderColor); return; diff --git a/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java b/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java index 3b4312d67..0475aef82 100644 --- a/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java +++ b/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java @@ -275,6 +275,7 @@ public class CodeauroraVideoView extends SurfaceView implements MediaPlayerContr } } + mMediaPlayer.reset(); /* Otherwise, pop up an error dialog so the user knows that * something bad has happened. Only try and pop up the dialog * if we're attached to a window. When we're going away and no @@ -301,6 +302,7 @@ public class CodeauroraVideoView extends SurfaceView implements MediaPlayerContr if (mOnCompletionListener != null) { mOnCompletionListener.onCompletion(mMediaPlayer); } + release(true); } }) .setCancelable(false) |
