From 31c61433194df5204bd70512a259f949396593d9 Mon Sep 17 00:00:00 2001 From: Artem Samoilenko Date: Wed, 23 Aug 2023 10:01:24 -0400 Subject: [PATCH] [Android] Updates for omnibox icons Updated omnibox icons as part of this issue `Android :: Update "lock" icon to "tune" icon in address bar` https://github.com/brave/brave-browser/issues/32380 Chromium change: https://github.com/brave/chromium/commit/13c59579a7f9dd9c9cffafcf58ba349fdb1de585 Add Chrome2023 refresh Secure icon on Android The Chrome2023 refresh changes are specific to desktop, but the lock icon replacement is meant to launch on Android too. This adds it reusing the kUpdatedConnectionSecurityIndicators flag, which previously controlled the chevron experiment. This CL also removes the chevron icon. Bug: 1468591 --- .../brave_res/layout/location_status_icon.xml | 55 +++++++++++++++++++ .../omnibox/java/res/values/dimens.xml | 1 + build/commands/lib/util.js | 8 ++- .../drawable/omnibox_https_valid_refresh.xml | 17 ++++++ 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 browser/ui/android/omnibox/java/brave_res/layout/location_status_icon.xml create mode 100644 components/omnibox/browser/android/java/res/drawable/omnibox_https_valid_refresh.xml diff --git a/browser/ui/android/omnibox/java/brave_res/layout/location_status_icon.xml b/browser/ui/android/omnibox/java/brave_res/layout/location_status_icon.xml new file mode 100644 index 0000000000000..aecfb622fe8b7 --- /dev/null +++ b/browser/ui/android/omnibox/java/brave_res/layout/location_status_icon.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + diff --git a/browser/ui/android/omnibox/java/res/values/dimens.xml b/browser/ui/android/omnibox/java/res/values/dimens.xml index c3f90536adfdb..9cf29eac735fb 100644 --- a/browser/ui/android/omnibox/java/res/values/dimens.xml +++ b/browser/ui/android/omnibox/java/res/values/dimens.xml @@ -8,4 +8,5 @@ 150dp 30dp 4dp + 20dp diff --git a/build/commands/lib/util.js b/build/commands/lib/util.js index 8fa4cb8897376..e9f1cb00ed317 100644 --- a/build/commands/lib/util.js +++ b/build/commands/lib/util.js @@ -390,6 +390,10 @@ const util = { const androidDownloadInternalResDest = path.join(config.srcDir, 'chrome', 'browser', 'download', 'internal', 'android', 'java', 'res') const androidFeaturesTabUiResSource = path.join(config.braveCoreDir, 'android', 'features', 'tab_ui', 'java', 'res') const androidFeaturesTabUiDest = path.join(config.srcDir, 'chrome', 'android', 'features', 'tab_ui', 'java', 'res') + const androidComponentsOmniboxResSource = path.join(config.braveCoreDir, 'components', 'omnibox', 'browser', 'android', 'java', 'res') + const androidComponentsOmniboxResDest = path.join(config.srcDir, 'components', 'omnibox', 'browser', 'android', 'java', 'res') + const androidBrowserUiOmniboxResSource = path.join(config.braveCoreDir, 'browser', 'ui', 'android', 'omnibox', 'java', 'brave_res') + const androidBrowserUiOmniboxResDest = path.join(config.srcDir, 'chrome', 'browser', 'ui', 'android', 'omnibox', 'java', 'res') // Mapping for copying Brave's Android resource into chromium folder. const copyAndroidResourceMapping = { @@ -405,7 +409,9 @@ const util = { [androidComponentsStylesResSource]: [androidComponentsStylesResDest], [androidSafeBrowsingResSource]: [androidSafeBrowsingResDest], [androidDownloadInternalResSource]: [androidDownloadInternalResDest], - [androidFeaturesTabUiResSource]: [androidFeaturesTabUiDest] + [androidFeaturesTabUiResSource]: [androidFeaturesTabUiDest], + [androidComponentsOmniboxResSource]: [androidComponentsOmniboxResDest], + [androidBrowserUiOmniboxResSource]: [androidBrowserUiOmniboxResDest] } console.log('copy Android app icons and app resources') diff --git a/components/omnibox/browser/android/java/res/drawable/omnibox_https_valid_refresh.xml b/components/omnibox/browser/android/java/res/drawable/omnibox_https_valid_refresh.xml new file mode 100644 index 0000000000000..10e2f9ee8b2d4 --- /dev/null +++ b/components/omnibox/browser/android/java/res/drawable/omnibox_https_valid_refresh.xml @@ -0,0 +1,17 @@ + + + + +