From 1eac60aefc076f103520323ec30fcc90fd229d73 Mon Sep 17 00:00:00 2001 From: Linus Tufvesson Date: Wed, 15 Dec 2021 15:52:44 +0000 Subject: [PATCH] Remove splash screen special case Splashscreen are no touch opaque and no special treatment is needed. Also made mName in ActivityRecordInputSink more useful for debugging Test: Manually verified that touches don't reach the input sink while splash screen is showing Bug: 194480991 Bug: 208659130 Change-Id: I319cc9716cd4456980f585deaeeb24853552f11d --- .../android/server/wm/ActivityRecordInputSink.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/wm/ActivityRecordInputSink.java b/services/core/java/com/android/server/wm/ActivityRecordInputSink.java index b183281e0f520..bce288311e137 100644 --- a/services/core/java/com/android/server/wm/ActivityRecordInputSink.java +++ b/services/core/java/com/android/server/wm/ActivityRecordInputSink.java @@ -55,12 +55,12 @@ class ActivityRecordInputSink { private final ActivityRecord mActivityRecord; private final boolean mIsCompatEnabled; + private final String mName; // Hold on to InputEventReceiver to prevent it from getting GCd. private InputEventReceiver mInputEventReceiver; private InputWindowHandleWrapper mInputWindowHandleWrapper; - private final String mName = Integer.toHexString(System.identityHashCode(this)) - + " ActivityRecordInputSink"; + private int mRapidTouchCount = 0; private IBinder mToken; private boolean mDisabled = false; @@ -69,6 +69,8 @@ class ActivityRecordInputSink { mActivityRecord = activityRecord; mIsCompatEnabled = CompatChanges.isChangeEnabled(ENABLE_TOUCH_OPAQUE_ACTIVITIES, mActivityRecord.getUid()); + mName = Integer.toHexString(System.identityHashCode(this)) + " ActivityRecordInputSink " + + mActivityRecord.mActivityComponent.getShortClassName(); } public void applyChangesToSurfaceIfChanged( @@ -91,11 +93,6 @@ class ActivityRecordInputSink { ANIMATION_TYPE_APP_TRANSITION)) { // TODO(b/208662670): Investigate if we can have feature active during animations. mInputWindowHandleWrapper.setToken(null); - } else if (mActivityRecord.mStartingData != null) { - // TODO(b/208659130): Remove this special case - // Don't block touches during splash screen. This is done to not show toasts for - // touches passing through splash screens. b/171772640 - mInputWindowHandleWrapper.setToken(null); } else { mInputWindowHandleWrapper.setToken(mToken); }