summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorKedi Xu <kedix@codeaurora.org>2016-07-20 15:24:56 +0800
committerKedi Xu <kedix@codeaurora.org>2016-07-20 15:24:56 +0800
commit4068763b7f7c95b8305f957138735efd80d739d2 (patch)
treeae3ceeae2299f4c9f4f0ed2973785c7a25aa8f3e /src/com
parent3cd6f49bd8ba93feb1b308e6f0f32a06b47c9fc8 (diff)
downloadandroid_packages_apps_Gallery2-4068763b7f7c95b8305f957138735efd80d739d2.tar.gz
android_packages_apps_Gallery2-4068763b7f7c95b8305f957138735efd80d739d2.tar.bz2
android_packages_apps_Gallery2-4068763b7f7c95b8305f957138735efd80d739d2.zip
SnapdragonGallery: fix blank gray picture after modify
After modify the pictures in PhotoPage and save, a blank gray picture show in the first Change-Id: Id6ae20c3a51880b6b71987cd024e845aef7d9a98
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/android/gallery3d/app/PhotoDataAdapter.java7
-rwxr-xr-x[-rw-r--r--]src/com/android/gallery3d/app/PhotoPage.java3
2 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/PhotoDataAdapter.java b/src/com/android/gallery3d/app/PhotoDataAdapter.java
index 05bd37687..c6ad14ded 100755
--- a/src/com/android/gallery3d/app/PhotoDataAdapter.java
+++ b/src/com/android/gallery3d/app/PhotoDataAdapter.java
@@ -162,6 +162,7 @@ public class PhotoDataAdapter implements PhotoPage.Model {
private int mCameraIndex;
private boolean mIsPanorama;
private boolean mIsStaticCamera;
+ private boolean mIsFromTimelineScreen;
private boolean mIsActive;
private boolean mNeedFullImage;
private int mFocusHintDirection = FOCUS_HINT_NEXT;
@@ -187,7 +188,7 @@ public class PhotoDataAdapter implements PhotoPage.Model {
// preview. If cameraIndex < 0, there is no camera preview.
public PhotoDataAdapter(AbstractGalleryActivity activity, PhotoView view,
MediaSet mediaSet, Path itemPath, int indexHint, int cameraIndex,
- boolean isPanorama, boolean isStaticCamera) {
+ boolean isPanorama, boolean isStaticCamera, boolean isFromTimelineScreen) {
mActivity = activity;
mSource = Utils.checkNotNull(mediaSet);
mPhotoView = Utils.checkNotNull(view);
@@ -196,6 +197,7 @@ public class PhotoDataAdapter implements PhotoPage.Model {
mCameraIndex = cameraIndex;
mIsPanorama = isPanorama;
mIsStaticCamera = isStaticCamera;
+ mIsFromTimelineScreen = isFromTimelineScreen;
mThreadPool = activity.getThreadPool();
mNeedFullImage = true;
@@ -1307,6 +1309,9 @@ public class PhotoDataAdapter implements PhotoPage.Model {
}
mDirty = false;
version = mSource.reload();
+ if (mIsFromTimelineScreen) {
+ mSource.setClusterKind(GalleryActivity.CLUSTER_ALBUMSET_NO_TITLE);
+ }
//if data is not ready, continue to reload
if (version == MediaObject.INVALID_DATA_VERSION) {
continue;
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index df3229f95..0c82944d8 100644..100755
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -507,7 +507,8 @@ public abstract class PhotoPage extends ActivityState implements
mActivity, mPhotoView, mMediaSet, itemPath, mCurrentIndex,
mAppBridge == null ? -1 : 0,
mAppBridge == null ? false : mAppBridge.isPanorama(),
- mAppBridge == null ? false : mAppBridge.isStaticCamera());
+ mAppBridge == null ? false : mAppBridge.isStaticCamera(),
+ mIsFromTimelineScreen);
mModel = pda;
mPhotoView.setModel(mModel);