Skip to content

Commit

Permalink
Merge pull request #24460 from brave/android_webapps_branding_fix
Browse files Browse the repository at this point in the history
[C127] [Android] Fix for web app branding icon and string
  • Loading branch information
mkarolin committed Jul 2, 2024
1 parent 6180543 commit ca33215
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 1 deletion.
40 changes: 40 additions & 0 deletions android/java/res/drawable/chrome_logo_on_circular_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?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/.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="31dp"
android:height="31dp"
android:viewportWidth="31"
android:viewportHeight="31">
<path
android:pathData="M26,15.5C26,21.299 21.299,26 15.5,26C9.701,26 5,21.299 5,15.5C5,9.701 9.701,5 15.5,5C21.299,5 26,9.701 26,15.5Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M22.218,11.57L22.617,10.593C22.617,10.593 22.11,10.05 21.494,9.436C20.878,8.821 19.575,9.182 19.575,9.182L18.09,7.5H15.483H12.876L11.391,9.182C11.391,9.182 10.087,8.821 9.472,9.436C8.856,10.05 8.349,10.593 8.349,10.593L8.748,11.57L8.241,13.017C8.241,13.017 9.732,18.657 9.906,19.346C10.25,20.703 10.486,21.227 11.464,21.914C12.441,22.602 14.215,23.795 14.505,23.976C14.795,24.157 15.157,24.465 15.483,24.465C15.809,24.465 16.171,24.157 16.461,23.976C16.75,23.795 18.525,22.602 19.502,21.914C20.48,21.227 20.715,20.703 21.059,19.346C21.234,18.657 22.725,13.017 22.725,13.017L22.218,11.57Z"
android:fillType="evenOdd">
<aapt:attr name="android:fillColor">
<gradient
android:startX="8.241"
android:startY="24.585"
android:endX="22.725"
android:endY="24.585"
android:type="linear">
<item android:offset="0" android:color="#FFFF5601"/>
<item android:offset="0.5" android:color="#FFFF4000"/>
<item android:offset="1" android:color="#FFFF1F01"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M17.33,10.557C17.547,10.557 19.158,10.25 19.158,10.25C19.158,10.25 21.068,12.555 21.068,13.048C21.068,13.456 20.904,13.615 20.71,13.803C20.67,13.842 20.628,13.883 20.586,13.927L19.154,15.446C19.14,15.461 19.124,15.477 19.108,15.494C18.965,15.637 18.754,15.849 18.903,16.2C18.913,16.223 18.923,16.247 18.933,16.271C19.096,16.652 19.297,17.121 19.041,17.597C18.769,18.103 18.303,18.441 18.004,18.385C17.705,18.329 17.004,17.963 16.746,17.795C16.488,17.628 15.67,16.955 15.67,16.697C15.67,16.482 16.258,16.124 16.544,15.95C16.601,15.916 16.646,15.889 16.671,15.871C16.701,15.851 16.75,15.821 16.811,15.783C17.072,15.621 17.543,15.329 17.555,15.199C17.569,15.04 17.564,14.993 17.353,14.598C17.309,14.514 17.256,14.424 17.202,14.331C17.002,13.987 16.778,13.602 16.828,13.326C16.884,13.015 17.372,12.836 17.786,12.685C17.838,12.666 17.889,12.648 17.937,12.629C18.058,12.584 18.209,12.527 18.368,12.468C18.781,12.313 19.24,12.141 19.316,12.106C19.421,12.058 19.394,12.012 19.076,11.982C19.034,11.978 18.982,11.972 18.922,11.966C18.529,11.924 17.805,11.847 17.452,11.946C17.383,11.965 17.305,11.986 17.224,12.008C16.828,12.115 16.343,12.246 16.296,12.322C16.288,12.335 16.28,12.347 16.272,12.357C16.228,12.421 16.199,12.462 16.248,12.731C16.263,12.811 16.293,12.969 16.33,13.163C16.44,13.734 16.61,14.624 16.632,14.824C16.635,14.852 16.638,14.879 16.641,14.905C16.669,15.128 16.687,15.276 16.427,15.335C16.406,15.34 16.383,15.345 16.36,15.351C16.067,15.418 15.638,15.516 15.483,15.516C15.328,15.516 14.899,15.418 14.606,15.351C14.583,15.345 14.56,15.34 14.539,15.335C14.279,15.276 14.297,15.128 14.325,14.905C14.328,14.879 14.331,14.852 14.334,14.824C14.356,14.623 14.527,13.731 14.636,13.161C14.673,12.967 14.703,12.811 14.718,12.731C14.767,12.462 14.738,12.421 14.694,12.357C14.686,12.347 14.678,12.335 14.67,12.322C14.623,12.246 14.138,12.115 13.742,12.008C13.661,11.986 13.583,11.965 13.514,11.946C13.161,11.847 12.437,11.924 12.044,11.966C11.984,11.972 11.932,11.978 11.89,11.982C11.572,12.012 11.545,12.058 11.65,12.106C11.726,12.141 12.184,12.313 12.598,12.467C12.756,12.527 12.908,12.584 13.029,12.629C13.078,12.648 13.128,12.666 13.18,12.685C13.594,12.836 14.082,13.015 14.138,13.326C14.188,13.602 13.964,13.987 13.764,14.331C13.71,14.424 13.657,14.514 13.613,14.598C13.402,14.993 13.397,15.04 13.411,15.199C13.423,15.329 13.894,15.621 14.155,15.783C14.215,15.821 14.265,15.851 14.294,15.871C14.32,15.889 14.365,15.916 14.422,15.95C14.708,16.124 15.296,16.482 15.296,16.697C15.296,16.955 14.478,17.628 14.22,17.795C13.962,17.963 13.26,18.329 12.962,18.385C12.663,18.441 12.197,18.103 11.925,17.597C11.669,17.121 11.87,16.652 12.033,16.271C12.043,16.247 12.053,16.223 12.063,16.2C12.212,15.849 12.001,15.637 11.858,15.494C11.842,15.477 11.826,15.461 11.811,15.446L10.38,13.927C10.338,13.883 10.296,13.842 10.256,13.803C10.062,13.615 9.898,13.456 9.898,13.048C9.898,12.555 11.808,10.25 11.808,10.25C11.808,10.25 13.419,10.557 13.636,10.557C13.81,10.557 14.144,10.442 14.493,10.322C14.582,10.291 14.671,10.261 14.759,10.231C15.193,10.087 15.483,10.086 15.483,10.086C15.483,10.086 15.773,10.087 16.207,10.231C16.295,10.261 16.384,10.291 16.473,10.322C16.822,10.442 17.156,10.557 17.33,10.557Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M17.053,18.713C17.394,18.888 17.635,19.013 17.727,19.07C17.845,19.144 17.773,19.283 17.665,19.359C17.558,19.435 16.111,20.555 15.97,20.678C15.952,20.694 15.933,20.711 15.913,20.729C15.778,20.851 15.605,21.006 15.483,21.006C15.361,21.006 15.188,20.851 15.052,20.729C15.033,20.711 15.014,20.694 14.996,20.678C14.855,20.555 13.408,19.435 13.301,19.359C13.193,19.283 13.121,19.144 13.239,19.07C13.331,19.013 13.573,18.888 13.913,18.713C14.013,18.661 14.122,18.605 14.238,18.546C14.748,18.282 15.384,18.058 15.483,18.058C15.582,18.058 16.218,18.282 16.729,18.546C16.844,18.605 16.953,18.662 17.053,18.713Z"
android:fillColor="#ffffff"/>
</vector>
5 changes: 4 additions & 1 deletion build/commands/lib/l10nUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const androidChromeStringsPath = path.resolve(path.join(srcDir, 'chrome', 'brows
const braveAndroidChromeStringsPath = path.resolve(path.join(srcDir, 'brave', 'browser', 'ui', 'android', 'strings', 'android_chrome_strings.grd'))
const androidTabUiStringsPath = path.resolve(path.join(srcDir, 'chrome', 'android', 'features', 'tab_ui', 'java', 'strings', 'android_chrome_tab_ui_strings.grd'))
const braveAndroidTabUiStringsPath = path.resolve(path.join(srcDir, 'brave', 'android', 'features', 'tab_ui', 'java', 'strings', 'android_chrome_tab_ui_strings.grd'))
const androidWebappsStringsPath = path.resolve(path.join(srcDir, 'components', 'webapps', 'browser', 'android', 'android_webapps_strings.grd'))
const braveAndroidWebappsStringsPath = path.resolve(path.join(srcDir, 'brave', 'components', 'webapps', 'browser', 'android', 'android_webapps_strings.grd'))


// component_chromium_strings.grd and any of its parts files that we track localization for in transifex
Expand Down Expand Up @@ -137,7 +139,8 @@ function getAutoGeneratedGrdMappings() {
...addGrd(chromiumComponentsStringsPath, braveComponentsStringsPath),
...addGrd(chromiumGeneratedResourcesPath, braveGeneratedResourcesPath, chromiumGeneratedResourcesExcludes),
...addGrd(androidChromeStringsPath, braveAndroidChromeStringsPath),
...addGrd(androidTabUiStringsPath, braveAndroidTabUiStringsPath)
...addGrd(androidTabUiStringsPath, braveAndroidTabUiStringsPath),
...addGrd(androidWebappsStringsPath, braveAndroidWebappsStringsPath)
}
console.log(chalk.italic('Done recursing through GRD to find GRDP files.'))
}
Expand Down
Loading

0 comments on commit ca33215

Please sign in to comment.