* Add command line key to diagnose Sync Passwords switch issue
To see additional diagnostic output, add `--verbose_sync_passwords_pref` through QA Preferences/Command line
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/65eee63c0e75ebd343c409a7c14addb00ca4b6dd
[Tab Model] Deprecate tab_groups package
Merge the tab_groups/ package into tabmodel/. The two packages have
significant overlap and should really have a lot of their logic merged
anyway.
This allows us to package protect TabGroupModelFilterInternal and make
destroy method package private as well.
Fixed: 372068933
Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/df77cbacb9476b0b6d3e75cc34b5d127985e79c3
[Settings] Enable the single-activity mode by default
Bug: b/356743945
https://source.chromium.org/chromium/chromium/src/+/cd5fd3e6bcef39a904578857a4c1ab2419efacec
[Settings] Add a method to finish the current fragment
Some settings page need to finish when the user is done with them.
Previously we used getActivity().onBackPressed() to perform this, but
we might want to handle finish and back gesture differently, and also it
might have unintended interaction with metrics.
This patch introduces a canonical method for settings fragments to
declare that they are finished and the settings activity should show the
previous fragment.
We added the new method to SettingsLauncher because existing methods are
somewhat similar to the new one (handling navigation). In a later change
we plan to rename it to reflect the new addition.
Bug: b/356743945
List of the fixed warning types:
warning: [ClassCanBeStatic] Inner class is non-static but does not reference enclosing class
warning: [AlmostJavadoc] This comment contains Javadoc or HTML tags, but isn't started with a double asterisk
warning: [EmptyBlockTag] A block tag (@param, @return, @throws, @deprecated) has an empty description. Block tags without descriptions don't add much value for future readers of the code; consider removing the tag entirely or adding a description.
warning: [ObjectToString] DisplayAd is final and does not override Object.toString, so converting it to a string will print its identity (e.g. `DisplayAd@4488aabb`) instead of useful information.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/79741f6bd5052dbfb30025c44f4b6851cb664e38
[Settings] Rename SettingsLauncher to SettingsNavigation
Now that SettingsLauncher provides a method to go back to the previous
page, it makes more sense to replace "launcher" in its name to something
more generic.
This patch renames SettingsLauncher and its friends to
SettingsNavigation. Also, methods in the interface are renamed to drop
mentions of "activity" since they don't necessarily start a new activity
in the single-activity mode.
Summary of changes:
- SettingsLauncher -> SettingsNavigation (w/ variants)
- launchSettingsActivity -> startSettings
- createSettingsActivityIntent -> createSettingsIntent
- finishCurrentFragment -> finishCurrentSettings
Bug: b/356743945
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/78b03df18d4625181de54bf6a7efa805c20b367d
Move base.cached_flags to components.cached_flags
We will need to depend on components/variations to support
fieldtrial_testing_config.json.
Since base can't use cached flags, and many clients of base won't
either, it makes more sense to put it in components.
Bug: 370797986
There were added new lint checks in C131. This commit fixes the following warnings:
warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
warning: [OperatorPrecedence] Use grouping parenthesis to make the operator precedence explicit
warning: [NarrowCalculation] This product of integers could overflow before being implicitly cast to a long
warning: [NarrowCalculation] This division will discard the fractional part of the result, despite being assigned to a float
warning: [ImmutableEnumChecker] enums should be immutable
warning: [Finalize] Do not override finalize
warning: [DoubleBraceInitialization] Prefer collection factory methods or builders to the double-brace initialization pattern
warning: [UnusedTypeParameter] This type parameter is unused and can be removed
warning: [UnnecessaryStringBuilder] Prefer string concatenation over explicitly using `StringBuilder#append`, since `+` reads better and has equivalent or better performance
Presubmit:
../../brave/android/java/org/chromium/base/BraveReflectionUtil.java:43: warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
assert (false);
^
(see https://errorprone.info/bugpattern/UnnecessaryParentheses)
Did you mean 'assert false;'?
Upstream's logic in `AppLocaleUtils` for `getApplicationLocales` and `setApplicationLocales` is the same as it was in our patch, so we don't need it anymore.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/826aadf32e2ebec6a4086d97937f345ea5f3f912
Android: Adopt ServiceLoaderUtil for LanguageProfileDelegate
And upstreams & inlines the logic from LocaleManagerDelegate, which
existed only to work around Android T SDK not yet being available.
Also adds some @JniType annotations to LanguageBridge to simplify
changes there.
Bug: 40901855