Loading packages/SystemUI/aconfig/systemui.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -453,16 +453,6 @@ flag { } } flag { name: "status_bar_window_no_custom_touch" namespace: "systemui" description: "Don't have any custom touch handling in StatusBarWindowView" bug: "391894499" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "status_bar_app_handle_tracking" namespace: "systemui" Loading packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowView.java +0 −33 Original line number Diff line number Diff line Loading @@ -16,9 +16,6 @@ package com.android.systemui.statusbar.window; import static android.view.MotionEvent.ACTION_DOWN; import static android.view.MotionEvent.ACTION_MOVE; import static android.view.MotionEvent.ACTION_UP; import static android.view.WindowInsets.Type.systemBars; import android.content.Context; Loading @@ -26,7 +23,6 @@ import android.content.res.Configuration; import android.graphics.Insets; import android.util.AttributeSet; import android.view.DisplayCutout; import android.view.MotionEvent; import android.view.View; import android.view.WindowInsets; import android.widget.FrameLayout; Loading @@ -34,7 +30,6 @@ import android.widget.FrameLayout; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.android.systemui.Flags; import com.android.systemui.compose.ComposeInitializer; import com.android.systemui.statusbar.core.StatusBarRootModernization; import com.android.systemui.statusbar.data.repository.StatusBarConfigurationController; Loading Loading @@ -110,34 +105,6 @@ public class StatusBarWindowView extends FrameLayout { return windowInsets; } /** * This is specifically for pulling down the status bar as a consistent motion in the visual * immersive mode. In the visual immersive mode, after the system detects a system gesture * motion from the top, we show permanent bars, and then forward the touch events from the * focused window to the status bar window. However, since the first relayed event is out of * bound of the status bar view, in order for the touch event to be correctly dispatched down, * we jot down the position Y of the initial touch down event, offset it to 0 in the y-axis, * and calculate the movement based on first touch down position. * * TODO(b/391894499): Remove this doc once Flags.statusBarWindowNoCustomTouch() is rolled out. */ @Override public boolean dispatchTouchEvent(MotionEvent ev) { if (Flags.statusBarWindowNoCustomTouch()) { return super.dispatchTouchEvent(ev); } if (ev.getAction() == ACTION_DOWN && ev.getRawY() > getHeight()) { mTouchDownY = ev.getRawY(); ev.setLocation(ev.getRawX(), mTopInset); } else if (ev.getAction() == ACTION_MOVE && mTouchDownY != 0) { ev.setLocation(ev.getRawX(), mTopInset + ev.getRawY() - mTouchDownY); } else if (ev.getAction() == ACTION_UP) { mTouchDownY = 0; } return super.dispatchTouchEvent(ev); } private void applyMargins() { final int count = getChildCount(); for (int i = 0; i < count; i++) { Loading Loading
packages/SystemUI/aconfig/systemui.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -453,16 +453,6 @@ flag { } } flag { name: "status_bar_window_no_custom_touch" namespace: "systemui" description: "Don't have any custom touch handling in StatusBarWindowView" bug: "391894499" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "status_bar_app_handle_tracking" namespace: "systemui" Loading
packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowView.java +0 −33 Original line number Diff line number Diff line Loading @@ -16,9 +16,6 @@ package com.android.systemui.statusbar.window; import static android.view.MotionEvent.ACTION_DOWN; import static android.view.MotionEvent.ACTION_MOVE; import static android.view.MotionEvent.ACTION_UP; import static android.view.WindowInsets.Type.systemBars; import android.content.Context; Loading @@ -26,7 +23,6 @@ import android.content.res.Configuration; import android.graphics.Insets; import android.util.AttributeSet; import android.view.DisplayCutout; import android.view.MotionEvent; import android.view.View; import android.view.WindowInsets; import android.widget.FrameLayout; Loading @@ -34,7 +30,6 @@ import android.widget.FrameLayout; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.android.systemui.Flags; import com.android.systemui.compose.ComposeInitializer; import com.android.systemui.statusbar.core.StatusBarRootModernization; import com.android.systemui.statusbar.data.repository.StatusBarConfigurationController; Loading Loading @@ -110,34 +105,6 @@ public class StatusBarWindowView extends FrameLayout { return windowInsets; } /** * This is specifically for pulling down the status bar as a consistent motion in the visual * immersive mode. In the visual immersive mode, after the system detects a system gesture * motion from the top, we show permanent bars, and then forward the touch events from the * focused window to the status bar window. However, since the first relayed event is out of * bound of the status bar view, in order for the touch event to be correctly dispatched down, * we jot down the position Y of the initial touch down event, offset it to 0 in the y-axis, * and calculate the movement based on first touch down position. * * TODO(b/391894499): Remove this doc once Flags.statusBarWindowNoCustomTouch() is rolled out. */ @Override public boolean dispatchTouchEvent(MotionEvent ev) { if (Flags.statusBarWindowNoCustomTouch()) { return super.dispatchTouchEvent(ev); } if (ev.getAction() == ACTION_DOWN && ev.getRawY() > getHeight()) { mTouchDownY = ev.getRawY(); ev.setLocation(ev.getRawX(), mTopInset); } else if (ev.getAction() == ACTION_MOVE && mTouchDownY != 0) { ev.setLocation(ev.getRawX(), mTopInset + ev.getRawY() - mTouchDownY); } else if (ev.getAction() == ACTION_UP) { mTouchDownY = 0; } return super.dispatchTouchEvent(ev); } private void applyMargins() { final int count = getChildCount(); for (int i = 0; i < count; i++) { Loading