Add TYPE_NOTIFICATION_SHADE and TYPE_STATUS_BAR window type for Touch Boost
Touch Boost is not triggered in the notification shade. Therefore, added
TYPE_NOTIFICATION_SHADE and TYPE_STATUS_BAR window type for Touch Boost.
The reason I added TYPE_STATUS_BAR is that when swiping down, users can
first touch statu bar and then swipe down.
Bug: 309687630
Bug: 309687706
Test: atest ViewRootImplTest, manually test
Change-Id: Iccdc6ea120ad47da60a074d37b65d230d36d904d
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index ac2c550..4cd6253 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -81,6 +81,8 @@
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
+import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE;
+import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
@@ -12054,7 +12056,8 @@
|| motionEventAction == MotionEvent.ACTION_MOVE
|| motionEventAction == MotionEvent.ACTION_UP;
boolean desiredType = windowType == TYPE_BASE_APPLICATION || windowType == TYPE_APPLICATION
- || windowType == TYPE_APPLICATION_STARTING || windowType == TYPE_DRAWN_APPLICATION;
+ || windowType == TYPE_APPLICATION_STARTING || windowType == TYPE_DRAWN_APPLICATION
+ || windowType == TYPE_NOTIFICATION_SHADE || windowType == TYPE_STATUS_BAR;
// use toolkitSetFrameRate flag to gate the change
return desiredAction && desiredType && sToolkitSetFrameRateReadOnlyFlagValue;
}