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

Commit 423e45e4 authored by Mangesh Ghiware's avatar Mangesh Ghiware
Browse files

Refresh panorama image after stitching completion

Bug: 7336784

Updating photo refreshes the supported operations which indiate if said
MediaItem is a panorama or not.

Change-Id: If3a169c9256b3f898594a30740930b5dfd96dba0
parent 6111c54d
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -94,8 +94,9 @@ public class PhotoPage extends ActivityState implements
    private static final int MSG_ON_CAMERA_CENTER = 9;
    private static final int MSG_ON_PICTURE_CENTER = 10;
    private static final int MSG_REFRESH_IMAGE = 11;
    private static final int MSG_UPDATE_DEFERRED = 12;
    private static final int MSG_UPDATE_PHOTO_UI = 12;
    private static final int MSG_UPDATE_PROGRESS = 13;
    private static final int MSG_UPDATE_DEFERRED = 14;

    private static final int HIDE_BARS_TIMEOUT = 3500;
    private static final int UNFREEZE_GLROOT_TIMEOUT = 250;
@@ -194,7 +195,7 @@ public class PhotoPage extends ActivityState implements
        new SupportedOperationsListener() {
            @Override
            public void onChange(int operations) {
                mHandler.sendEmptyMessage(MSG_REFRESH_IMAGE);
                mHandler.sendEmptyMessage(MSG_UPDATE_PHOTO_UI);
            }
        };

@@ -366,6 +367,12 @@ public class PhotoPage extends ActivityState implements
                        break;
                    }
                    case MSG_REFRESH_IMAGE: {
                        final MediaItem photo = mCurrentPhoto;
                        mCurrentPhoto = null;
                        updateCurrentPhoto(photo);
                        break;
                    }
                    case MSG_UPDATE_PHOTO_UI: {
                        updateUIForCurrentPhoto();
                        break;
                    }
+0 −2
Original line number Diff line number Diff line
@@ -288,8 +288,6 @@ public class LocalImage extends LocalMediaItem {
    @Override
    public void setSupportedOperationsListener(SupportedOperationsListener l) {
        synchronized (mLock) {
            if (mPanoramaMetadataInitialized) return; // no more updates

            if (l == null) {
                if (mGetPanoMetadataTask != null) {
                    mGetPanoMetadataTask.cancel();
+0 −2
Original line number Diff line number Diff line
@@ -255,8 +255,6 @@ public class UriImage extends MediaItem {
    @Override
    public void setSupportedOperationsListener(SupportedOperationsListener l) {
        synchronized (mLock) {
            if (mPanoramaMetadataInitialized) return; // no more updates

            if (l != null) {
                if (mGetPanoMetadataTask != null) {
                    mGetPanoMetadataTask.cancel();