Added isRelativeOf instead of checking if weak pointer is not null
If a layer has a relativeOf, it will continue to assume it has a relativeOf even if what it's relative to is removed. This is because the client never explicitly asked to remove the relative Z. Instead of relying on whether the weak pointer is non null, this change adds a variable isRelativeOf that's set to true when the client calls setRelativeLayer and false when the client calls setLayer. This is clearer than checking whether the weak pointer is still around. This is also needed for mirroring since we want to add this same behavior without having to clone weak referenced layers. Bug: 131622422 Test: go/wm-smoke Test: SurfaceFlinger_test Change-Id: Ia71b0f660edda9b3a63521d40ca30bfca1d456b9
Loading
Please register or sign in to comment