Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f12ae078 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Android (Google) Code Review
Browse files

Merge "[SB] Don't do any custom touch handling in StatusBarWindowView." into main

parents 1058d1d7 a5fa5796
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -541,6 +541,16 @@ flag {
  is_fixed_read_only: true
}

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: "icon_refresh_2025"
    namespace: "systemui"
+7 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ 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;
@@ -117,9 +118,15 @@ public class StatusBarWindowView extends FrameLayout {
     * 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);