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

Commit 104f3678 authored by kaiyiz's avatar kaiyiz Committed by Gerrit - the friendly Code Review server
Browse files

Gallery2: Set PhotoPage GL root reset when rotate

When there is another activity on top of PhotoPage, the GLRootView
will not update to match screen, so the back ground seems corruption.

Set GLRoot View resume when onConfigurationChanged happen.

CRs-Fixed: 778294

Change-Id: Ib1fd6953462e26f11c3a8957a042db2ad4ecc275
parent 23016e74
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -133,6 +133,15 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext
        return mGLRootView;
    }

    public void GLRootResume(boolean isResume) {
        if (isResume) {
            mGLRootView.onResume();
            mGLRootView.lockRenderThread();
        } else {
            mGLRootView.unlockRenderThread();
        }
    }

    public OrientationManager getOrientationManager() {
        return mOrientationManager;
    }
+9 −0
Original line number Diff line number Diff line
@@ -1630,6 +1630,15 @@ public abstract class PhotoPage extends ActivityState implements
        }
    }

    @Override
    public void onConfigurationChanged(Configuration config) {
        super.onConfigurationChanged(config);
        if(mIsActive) return;
        mActivity.GLRootResume(true);
        mModel.resume();
        mActivity.GLRootResume(false);
    }

    @Override
    protected void onResume() {
        super.onResume();