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

Commit 799dd1cf authored by lumark's avatar lumark
Browse files

Fix ZOrderingTest got NPE during display creation.

ag/5431947 modified
HierarchyRecordingBuilderFactory.make() & HierarchyRecorder.build() for
SurfaceControl creation that will set mTransaction as null after method called.

It will got NPE when creating the second SurfaceControl instance
during DisplayContent creation, remove the null assigment to fix this case.

Bug: 113800711

Test: atest FrameworksServicesTests:ZOrderingTests
Change-Id: I791046afdc2f371e37c2f7d3c36b7f2484339e08
parent b2117bbc
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -122,7 +122,6 @@ public class ZOrderingTests extends WindowTestsBase {
        public SurfaceControl build() {
            final SurfaceControl sc = super.build();
            mTransaction.addParentFor(sc, mPendingParent);
            mTransaction = null;
            mPendingParent = null;
            return sc;
        }
@@ -138,7 +137,6 @@ public class ZOrderingTests extends WindowTestsBase {
        @Override
        public SurfaceControl.Builder make(SurfaceSession s) {
            final LayerRecordingTransaction transaction = mTransaction;
            mTransaction = null;
            return new HierarchyRecorder(s, transaction);
        }
    }