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

Commit 77e34942 authored by Robert Carr's avatar Robert Carr Committed by Wale Ogunwale
Browse files

Have setRelativeLayer take SurfaceControl instead of IBinder

Avoid making the caller have a pointless call to getHandle()
ill convert the rest of the methods later, but this one is needed
for some testing requirements in the hierarchy branch.

Test: Builds
Change-Id: Ie501690c48c46872cc4641f456b3f2ba601281d0
parent a975a0a1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -713,7 +713,7 @@ public class SurfaceControl {
        }
    }

    public void setRelativeLayer(IBinder relativeTo, int zorder) {
    public void setRelativeLayer(SurfaceControl relativeTo, int zorder) {
        checkNotReleased();
        synchronized(SurfaceControl.class) {
            sGlobalTransaction.setRelativeLayer(this, relativeTo, zorder);
@@ -1215,9 +1215,9 @@ public class SurfaceControl {
            return this;
        }

        public Transaction setRelativeLayer(SurfaceControl sc, IBinder relativeTo, int z) {
        public Transaction setRelativeLayer(SurfaceControl sc, SurfaceControl relativeTo, int z) {
            nativeSetRelativeLayer(mNativeObject, sc.mNativeObject,
                    relativeTo, z);
                    relativeTo.getHandle(), z);
            return this;
        }

+1 −1
Original line number Diff line number Diff line
@@ -252,7 +252,7 @@ class WindowSurfaceController {
                if (mAnimator.mWin.usesRelativeZOrdering()) {
                    mSurfaceControl.setRelativeLayer(
                            mAnimator.mWin.getParentWindow()
                            .mWinAnimator.mSurfaceController.mSurfaceControl.getHandle(),
                            .mWinAnimator.mSurfaceController.mSurfaceControl,
                            -1);
                } else {
                    mSurfaceLayer = layer;