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

Commit 423d7c62 authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Fix fillsParent() always be false on finishing activity" into rvc-dev am: 838475b6

Change-Id: Ica9f609742d3e1a46cd4feac2ef7561e052180ec
parents 989ba124 838475b6
Loading
Loading
Loading
Loading
+12 −4
Original line number Original line Diff line number Diff line
@@ -2120,12 +2120,20 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A


    @Override
    @Override
    boolean fillsParent() {
    boolean fillsParent() {
        return occludesParent();
        return occludesParent(true /* includingFinishing */);
    }
    }


    /** Returns true if this activity is opaque and fills the entire space of this task. */
    /** Returns true if this activity is not finishing, is opaque and fills the entire space of
     * this task. */
    boolean occludesParent() {
    boolean occludesParent() {
        return !finishing && mOccludesParent;
        return occludesParent(false /* includingFinishing */);
    }

    private boolean occludesParent(boolean includingFinishing) {
        if (!includingFinishing && finishing) {
            return false;
        }
        return mOccludesParent;
    }
    }


    boolean setOccludesParent(boolean occludesParent) {
    boolean setOccludesParent(boolean occludesParent) {
@@ -7547,7 +7555,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (mThumbnail != null){
        if (mThumbnail != null){
            mThumbnail.dumpDebug(proto, THUMBNAIL);
            mThumbnail.dumpDebug(proto, THUMBNAIL);
        }
        }
        proto.write(FILLS_PARENT, mOccludesParent);
        proto.write(FILLS_PARENT, fillsParent());
        proto.write(APP_STOPPED, mAppStopped);
        proto.write(APP_STOPPED, mAppStopped);
        proto.write(TRANSLUCENT, !occludesParent());
        proto.write(TRANSLUCENT, !occludesParent());
        proto.write(VISIBLE, mVisible);
        proto.write(VISIBLE, mVisible);
+1 −0
Original line number Original line Diff line number Diff line
@@ -295,6 +295,7 @@ class ActivityTestsBase extends SystemServiceTestsBase {
                // fullscreen value is normally read from resources in ctor, so for testing we need
                // fullscreen value is normally read from resources in ctor, so for testing we need
                // to set it somewhere else since we can't mock resources.
                // to set it somewhere else since we can't mock resources.
                doReturn(true).when(activity).occludesParent();
                doReturn(true).when(activity).occludesParent();
                doReturn(true).when(activity).fillsParent();
                mTask.addChild(activity);
                mTask.addChild(activity);
                // Make visible by default...
                // Make visible by default...
                activity.setVisible(true);
                activity.setVisible(true);