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

Commit a850a543 authored by Bobby Georgescu's avatar Bobby Georgescu Committed by Android (Google) Code Review
Browse files

Fix jank when launching editor from Camera filmstrip

Bug: 7301182
Status bar visibility in FilterShow will now match
the one in Camera/Gallery so that there isn't weird
jank when launching.

Change-Id: I3e942633b351264d2cd38cc5b587de32e38521ed
parent 41a3a3be
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -303,4 +303,9 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext
    public PanoramaViewHelper getPanoramaViewHelper() {
        return mPanoramaViewHelper;
    }

    protected boolean isFullscreen() {
        return (getWindow().getAttributes().flags
                & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0;
    }
}
+4 −0
Original line number Diff line number Diff line
@@ -687,6 +687,8 @@ public class PhotoPage extends ActivityState implements
        intent.setClass(mActivity, FilterShowActivity.class);
        intent.setDataAndType(current.getContentUri(), current.getMimeType())
            .setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
        intent.putExtra(FilterShowActivity.LAUNCH_FULLSCREEN,
                mActivity.isFullscreen());
        mRecenterCameraOnResume = false;
        mActivity.startActivityForResult(intent, REQUEST_EDIT);
        overrideTransitionToEditor();
@@ -707,6 +709,8 @@ public class PhotoPage extends ActivityState implements
                .queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY).size() == 0) {
            intent.setAction(Intent.ACTION_EDIT);
        }
        intent.putExtra(FilterShowActivity.LAUNCH_FULLSCREEN,
                mActivity.isFullscreen());
        mRecenterCameraOnResume = false;
        ((Activity) mActivity).startActivityForResult(Intent.createChooser(intent, null),
                REQUEST_EDIT);
+6 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
@@ -94,6 +95,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,

    public static final String CROP_ACTION = "com.android.camera.action.CROP";
    public static final String TINY_PLANET_ACTION = "com.android.camera.action.TINY_PLANET";
    public static final String LAUNCH_FULLSCREEN = "launch-fullscreen";
    private final PanelController mPanelController = new PanelController();
    private ImageLoader mImageLoader = null;
    private ImageShow mImageShow = null;
@@ -352,6 +354,10 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
        mPanelController.setMasterImage(mImageShow);
        mPanelController.setCurrentPanel(mFxButton);
        Intent intent = getIntent();
        if (intent.getBooleanExtra(LAUNCH_FULLSCREEN, false)) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
        }

        String data = intent.getDataString();
        if (data != null) {
            Uri uri = Uri.parse(data);