diff options
| author | Chao Zhang <chaoz@codeaurora.org> | 2016-01-16 19:05:28 +0800 |
|---|---|---|
| committer | Chao Zhang <chaoz@codeaurora.org> | 2016-01-19 13:33:58 +0800 |
| commit | 871618c8ef82dc4e00c20e5d59688f291854f7f4 (patch) | |
| tree | 18f708b8f3088c0d8334f2c2d3cd3f601e13f0ff /src/com | |
| parent | 119c6106bd1ea71c64f47fc323e953a12890f53b (diff) | |
| download | android_packages_apps_Gallery2-871618c8ef82dc4e00c20e5d59688f291854f7f4.tar.gz android_packages_apps_Gallery2-871618c8ef82dc4e00c20e5d59688f291854f7f4.tar.bz2 android_packages_apps_Gallery2-871618c8ef82dc4e00c20e5d59688f291854f7f4.zip | |
Gallery2: fix delete abnormal when select all photos.
Remove timeline title item's all supported operations,
otherwise all sub objects will be affected.
Change-Id: If7e332f68d80da72bc819223169abca238fd2eb6
CRs-Fixed: 960220
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/gallery3d/data/ClusterAlbum.java | 5 |
1 files changed, 5 insertions, 0 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) { |
