Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67d97709 authored by kaiyiz's avatar kaiyiz
Browse files

Gallery2: Remove wait when notify dirty

When notify Dirty from photo data adapter, where is a operation of
waiting, but this Object.wait is locked by ReloadTask.

Remove the wait when notify dirty, which notify all right away. And
do the delete operation after last picture's deletion is done.

Change-Id: I3c322c8d01944d1e41d784346da930b907efdb1c
CRs-Fixed: 808799
parent 670d9b82
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -1208,12 +1208,6 @@ public class PhotoDataAdapter implements PhotoPage.Model {
        }

        public synchronized void notifyDirty() {
            while (mDirty) {
                try {
                    wait(NOTIFY_DIRTY_WAIT_TIME);
                } catch (Exception ex) {
                }
            }
            mDirty = true;
            notifyAll();
        }
+1 −0
Original line number Diff line number Diff line
@@ -1133,6 +1133,7 @@ public class PhotoView extends GLView {
        }

        private void deleteAfterAnimation(int duration) {
            if (mHandler.hasMessages(MSG_DELETE_ANIMATION_DONE)) return;
            MediaItem item = mModel.getMediaItem(mTouchBoxIndex);
            if (item == null) return;
            mListener.onCommitDeleteImage();