From 46770fa49c9a5e51a5ea5a3afc7aab0dba2e59bd Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 30 Mar 2022 21:46:29 +0000 Subject: [PATCH 1/2] Parcel: recycle recycles Before, it was like getting a used pan with food stuck on it. We run a clean ship here. You want a Parcel? You get a fresh Parcel. When we recycle a Parcel, we do a real clean-up job. Air freshener. All bits brushed over. These Parcel objects are clean as heck now! (specifically cleans mClassCookies) Bug: 208279300 Test: build Merged-In: I250872f5c6796bb64e2dc68008154c0e90feb218 Change-Id: I250872f5c6796bb64e2dc68008154c0e90feb218 --- core/java/android/os/Parcel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index e06e7b6be90a9..d0a77a031c99e 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -474,6 +474,7 @@ public final class Parcel { */ public final void recycle() { if (DEBUG_RECYCLE) mStack = null; + mClassCookies = null; freeBuffer(); if (mOwnsNativeParcelObject) { From ab04f9e14ddcdf88ce2b3afc33a5de94a43ce348 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Mon, 4 Apr 2022 16:36:02 -0700 Subject: [PATCH 2/2] Check for nullable AutoHideController * Wasn't able to repro, but we are currently checking for null in other usages of mAutoHideController Fixes: 227638744 Change-Id: I1168dc3a0f6c7dd3cfca4e22d1155b65d3afe0c3 --- .../com/android/systemui/navigationbar/NavigationBarView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java index f5abe28914c35..40265a367a06b 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java @@ -143,6 +143,7 @@ public class NavigationBarView extends FrameLayout { private boolean mDeadZoneConsuming = false; private final NavigationBarTransitions mBarTransitions; private final OverviewProxyService mOverviewProxyService; + @Nullable private AutoHideController mAutoHideController; // performs manual animation in sync with layout transitions @@ -316,7 +317,7 @@ public class NavigationBarView extends FrameLayout { }; private final Consumer mNavbarOverlayVisibilityChangeCallback = (visible) -> { - if (visible) { + if (visible && mAutoHideController != null) { mAutoHideController.touchAutoHide(); } notifyActiveTouchRegions();