[cr143][Android] Disable tab search box long click
Chromium changes: https://chromium.googlesource.com/chromium/src/+/92380b1a637b00d97b4beabfffcd1f63d3b2ab8e commit 92380b1a637b00d97b4beabfffcd1f63d3b2ab8e Author: Jingping Sun <jings@microsoft.com> Date: Tue Jun 17 07:33:42 2025 -0700 Disable tab search box long click Long click the tab search box can trigger a paste menu to paste string from clipboard. But it can't open search activity after paste. Open the search activity, the string from clipboard isn't in search box. So we need to disable the long click of the tab search box to fix this issue. Bug: 425560785 Change-Id: Ia29807c73b5c425aa41a35d26b293081e9bb99f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6650829 Commit-Queue: Jingping Sun <jings@microsoft.com> Reviewed-by: Sky Malice <skym@chromium.org> Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org> Cr-Commit-Position: refs/heads/main@{#1474952}
This commit is contained in:
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2024 The Brave Authors. All rights reserved.
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/. -->
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MergeRootFrame">
|
||||
<!-- Should only be visible during animations involving hub search. -->
|
||||
<FrameLayout
|
||||
android:id="@+id/search_box_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height_no_shadow"
|
||||
android:layout_marginTop="@dimen/toolbar_height_no_shadow"
|
||||
android:background="@android:color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<org.chromium.chrome.browser.hub.BraveHubToolbarView
|
||||
android:id="@+id/hub_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbar_action_container"
|
||||
android:clipChildren="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height_no_shadow">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start|center_vertical">
|
||||
|
||||
<Space
|
||||
android:id="@+id/margin_spacer"
|
||||
android:layout_width="@dimen/hub_toolbar_action_button_start_margin"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<org.chromium.ui.widget.ChromeImageButton
|
||||
android:id="@+id/toolbar_back_button"
|
||||
android:src="@drawable/ic_arrow_back_24dp"
|
||||
android:layout_width="@dimen/min_touch_target_size"
|
||||
android:layout_height="@dimen/min_touch_target_size"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:contentDescription="@string/back"
|
||||
android:tooltipText="@string/back"
|
||||
android:visibility="gone"
|
||||
style="@style/ToolbarMenuButton"
|
||||
app:tint="@color/default_icon_color_tint_list"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/toolbar_action_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:visibility="gone"
|
||||
style="?attr/newTabButtonStyle"/>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/pane_switcher_card"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:background="@drawable/hub_pane_switcher_background"
|
||||
android:clipChildren="false"
|
||||
>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/pane_switcher"
|
||||
style="@style/ToolbarButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:visibility="gone"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:tabIndicator="@drawable/m3_tabs_line_indicator"
|
||||
app:tabIndicatorFullWidth="true"
|
||||
app:tabUnboundedRipple="true" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/menu_button_container"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end" >
|
||||
<!-- On tablets, the searchbox (R.id.search_box) is hidden in favor of a button. -->
|
||||
<org.chromium.ui.widget.ChromeImageButton
|
||||
android:id="@+id/search_loupe"
|
||||
android:visibility="gone"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/search"
|
||||
android:src="@drawable/ic_search"
|
||||
android:tooltipText="@string/accessibility_search_loupe_tooltip_text"
|
||||
style="@style/ToolbarMenuButton"
|
||||
app:tint="@color/default_icon_color_tint_list" />
|
||||
<include layout="@layout/menu_button" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Hub search is selectively hidden based on the feature flag. -->
|
||||
<LinearLayout
|
||||
android:id="@+id/search_box"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/hub_search_box_height"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="@dimen/hub_search_box_vertical_margin"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/hub_search_box_background">
|
||||
|
||||
<EditText
|
||||
tools:ignore="Autofill,LabelFor"
|
||||
style="@style/TextAppearance.TextLarge.Primary"
|
||||
android:id="@+id/search_box_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:focusableInTouchMode="false"
|
||||
android:focusable="false"
|
||||
android:inputType="text"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
</org.chromium.chrome.browser.hub.BraveHubToolbarView>
|
||||
</FrameLayout>
|
||||
@@ -690,23 +690,6 @@ exports.update = () => {
|
||||
'java',
|
||||
'res',
|
||||
)
|
||||
const androidBrowserHubInternalResSource = path.join(
|
||||
config.braveCoreDir,
|
||||
'browser',
|
||||
'hub',
|
||||
'internal',
|
||||
'android',
|
||||
'res',
|
||||
)
|
||||
const androidBrowserHubInternalResDest = path.join(
|
||||
config.srcDir,
|
||||
'chrome',
|
||||
'browser',
|
||||
'hub',
|
||||
'internal',
|
||||
'android',
|
||||
'res',
|
||||
)
|
||||
|
||||
const uiAndroidResSource = path.join(
|
||||
config.braveCoreDir,
|
||||
@@ -740,7 +723,6 @@ exports.update = () => {
|
||||
[androidFeaturesTabUiResSource]: [androidFeaturesTabUiDest],
|
||||
[androidComponentsOmniboxResSource]: [androidComponentsOmniboxResDest],
|
||||
[androidBrowserPrivateResSource]: [androidBrowserPrivateResDest],
|
||||
[androidBrowserHubInternalResSource]: [androidBrowserHubInternalResDest],
|
||||
[uiAndroidResSource]: [uiAndroidResDest],
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
diff --git a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml b/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
index 943892a524e9c19d8595511ac640f06960ccd540..2a675f197bd819c1025fb135a7a2fd3645bd1c29 100644
|
||||
--- a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
+++ b/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
@@ -21,7 +21,7 @@ found in the LICENSE file.
|
||||
android:background="@android:color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
- <org.chromium.chrome.browser.hub.HubToolbarView
|
||||
+ <org.chromium.chrome.browser.hub.BraveHubToolbarView
|
||||
android:id="@+id/hub_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -150,5 +150,5 @@ found in the LICENSE file.
|
||||
android:gravity="top"
|
||||
android:importantForAccessibility="no"
|
||||
android:visibility="gone"/>
|
||||
- </org.chromium.chrome.browser.hub.HubToolbarView>
|
||||
+ </org.chromium.chrome.browser.hub.BraveHubToolbarView>
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user