Commit Graph
40 Commits
Author SHA1 Message Date
AlexeyBarabash 68bc172dee [Android] Fix crash after cr128 upgrade at TabSwitcherPaneCoordinator (#25130)
* [Android] Fix for crash after cr128 upgrade when pressing back at tab switcher

Forced invoke of `createTabSwitcherPaneCoordinator` before `TabSwitcherPaneBase.requestAnimationData()` to avoid null access crash.

Fixes brave/brave-browser#40422
2024-08-15 17:41:38 +03:00
AlexeyBarabash 42194fc146 Fixed toolbar background color
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7c065994b4014bb6e352c90c1df8e4e1a2bc1e83

[SurfacePolish][CleanUp] Clean up surface polish code related to toolbar and real omnibox appearance.

	This CL cleans up code related to the toolbar and real omnibox
	appearance, including color, icon background, hint text typeface, and
	button end margin. This CL does not include the change in animation.
	Additionally, it makes a small adjustment to the size of the Google icon
	background in the real omnibox.
	Here is a comparison:
	Original: https://drive.google.com/file/d/1ZAu3svqTXe0bjABFgudgv8XnZNO_fph6/view?usp=sharing&resourcekey=0-Rxyvdlg9na3n-M1Jd9VNKQ
	After this CL:
	https://drive.google.com/file/d/1zBX-rTgUz2VNHwHp9NMBIaVklx-VSaol/view?usp=sharing&resourcekey=0--L7FH_jIss1VFlauBEMFVQ

	Bug: 331667743
	Change-Id: I863d9e333fe21509f92f05da73a13d3070fc3bfe
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5688899
2024-08-07 21:31:50 -04:00
Artem Samoilenko f295edd810 [Android] Adjustments for the new tab switcher UI
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c717fb07aed0f4756b9306ae0e55fa8f897bb1dc

[Hub] Cleanup legacy tab switcher code in toolbar

The feature flag controlling Hub was removed and isHubEnabled defaults
to true. Tests were already updated see:
https://chromium-review.googlesource.com/c/chromium/src/+/5634047

Toolbar no longer has a tab switcher mode as the toolbar is now
overlaid when the Hub is visible. Remove the legacy toolbar code related
to this now deprecated UI.

This is a follow up to
https://chromium-review.googlesource.com/c/chromium/src/+/5666417
which removed the StartSurface related code and significantly simplified
this cleanup.

Fixed: 350704312
2024-08-07 21:31:32 -04:00
Serg ac53eefb6f Adds CastOptionsProvider to proguard rule on Android 2024-07-05 13:47:15 -04:00
Artem Samoilenko 255ee41630 [Android] Changed fix for copied URL for typed URLs 2024-06-27 13:23:39 -04:00
AlexeyBarabash de75edfe8e Force export passwords to local storage on Android; fixes brave/brave… (#23901)
Force export passwords to local storage on Android

fixes brave/brave-browser#38655
2024-05-30 00:58:27 +03:00
tapanmodh 7cc27094a2 fix multiple windows close/merge android 2024-05-09 16:13:02 +05:30
Artem Samoilenko 0a098b001f [Android] Fix getTabGroupCount for tab groups with size 1
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/57a7761b2055997dccd9b566e1c42226734a1dbe

[Tab Group] Fix getTabGroupCount for tab groups with size 1

TabGroupModelFilter wasn't correctly tracking tab groups with size 1.

Increment when:
* Creating a single tab group.
* Adding a single tab that is in a tab group.

Decrement when:
* Closing the last tab in a group rather than when size becomes 1.
* Removing the last tab from a tab group with size 1.

Modify logic when adding a tab to the tab model as part of a group
so that the group is created later and we can properly signal if a
new group was created or not.

Bug: 41496693
2024-04-08 23:09:27 -04:00
Artem Samoilenko 540523cc81 [Android] Add Token-based ID support for Tab Groups
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/4dfe0238c9391e5b9a4284072e7d07926171215b

[Tab Groups] add Token-based ID support behind flag

Add and manage Token-based TabGroupIds for Tabs in TabGroupModelFilter.

RootId must be the TabId of one of the tabs in the group. This is
unstable because if the Tab with the TabId corresponding to the RootId
of the group is removed from the group the group must elect a new
TabId from among its tabs to be the new RootId. This leads to issues
with managing the state of a tab group over time.

Under the RootId paradigm every tab was associated with a TabGroup
object and only tab groups with > 1 tab were considered "real" tab
groups. In an effort to support tab groups with a single tab it is
necessary to come up with a new approach.

This CL introduces TabGroupId. This ID is stable in that it is tied
to the group the tabs are in and can only be destroyed if all tabs
are removed from the tab group OR two groups with TabGroupIds are
merged resulting in one of the two TabGroupIds going away.

Tabs only have a TabGroupId if they are associated with a "real"
tab group of size 1 or larger. Otherwise this field will be null.
This means that TabGroup objects will only contain tabs with a
TabGroupId if the group is > size 1 OR that single tab is to be
treated as a real tab group.

If the flag AndroidTabGroupStableIds is enabled then after
tab state initialization all tabs that are part of "real" tab
groups under the old definition will be allocated TabGroupIds
in a 1:1 manner with old RootIds. When the flag is disabled
the TabGroupIds will all be reset instead.

Logic for maintaining TabGroupIds is as follows:
* A Tab Group Id is allocated when:
  * A single tab is turned into a single tab group.
  * A single tab is merged with another single tab to form a
    group.
  * A list of tabs is merged to a single tab to form a group.
    If a group is merged to a single tab its Tab Group Id is
    preserved.
* Tab Group Ids are removed from tabs when:
  * Ungrouping a tab from a group.
* Tab Group Ids are lost entirely when:
  * Merging two tab groups both with tab group ids (only one ID will
    continue to exist).
  * Removing the last tab from a group.
  * Deleting an entire tab group.

Bug: b/41496693
2024-03-08 14:56:12 -05:00
Artem Samoilenko a887a787e1 [Android] Remove set/get RootId from TabGroupModelFilter
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/060b709e560aae61e4e5cdb2c34175a9d53aa610

[Tab Groups] Remove set/get RootId from TabGroupModelFilter

Cleanup to remove redundant set/get RootId methods from
TabGroupModelFilter.

Bug: None
2024-03-08 14:56:04 -05:00
Darnell Andries 475535344c Add Android tab usage metrics 2023-11-09 14:29:24 -08:00
AlexeyBarabash bcb5018842 Cleanup sync v1 migration (#20906)
* Removed Sync V1 => V2 migration code
* Moved obsolete sync prefs registration to RegisterProfilePrefsForMigration
2023-11-09 22:11:49 +02:00
Artem Samoilenko 091abcce96 [Android] Moved onNewIntent method
Chromium change:
https://github.com/brave/chromium/commit/2dde79ed20e6534fca02aa1216541df76f14c589

Delete IntentHandlerDelegate
processUrlViewIntent was only implemented by ChromeTabbedActivity and so
having ChromeActivity call IntentHandler#onNewIntent was confusing and
hard to reason about.

This change moves the ChromeTabbedActivity-only code from IntentHandler
into ChromeTabbedActivity.

Change-Id: I38e46830f66488a822ab3e2ec85d4f90d4fd9a52
2023-10-23 13:19:04 +01:00
deeppandya fbbe42f030 Add deps to base module 2023-09-15 12:28:28 -04:00
deeppandya df65b1113a Add proguard rule for datatransport runtime 2023-09-14 03:12:08 -04:00
Darnell Andries 0576c813d2 Create AutocompleteMediator super class instead of patching, for capturing Android URL events in P3A 2023-09-12 13:19:55 -07:00
Artem Samoilenko 145681c02a [Android] Remove tab groups auto creation
Chromium change:
https://github.com/brave/chromium/commit/aa78b431380e08988cccde7e6e2a167568da64a9

[Tab Groups] Remove auto creation and menu order params
Remove tab group auto creation and menu order params as these are
launched in their current and final states.

Tab Group Auto Creation is disabled.
New Tab In Group is first in the context menu.

Bug: 1188370
2023-09-06 12:38:48 +01:00
Simone Arpe 471bc97c26 Keep HideBottomViewOnScrollBehavior (#19764)
Keep `HideBottomViewOnScrollBehavior` class that was removed by Proguard optimizations. 
This class is referenced in an XML layout under the attribute `app:layout_behavior`, in particular in the main Brave Wallet layout (`activity_brave_wallet.xml`). 
Proguard is not able to determine whether this class is used and was removing it in release builds only.
2023-08-18 15:41:34 +02:00
Artem Samoilenko 8dacb326c8 [Android] Removed excessive proguard rule
Otherwise there is an error:
Warning in ../../brave/android/java/proguard.flags at line 46, column 1:

Proguard configuration rule does not match anything: `-keep,allowrepackaging,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken {

  <init>();

}`
2023-07-26 16:50:25 -04:00
wchen342 46c8d55ad7 [Android] remove redundant BraveTemplateUrlServiceFactory and relative codes
Chromium changes:
chromium/chromium@f40ea91

Remove hardcoded profile from android TemplateUrlServiceFactory.
Migrates the easier (e.g. already had an Profile reference) usages
to the new method that takes a Profile.

Adds a PRESUBMIT to try and prevent additional getLastUsedRegularProfile()
calls.

BUG=1410601

Change-Id: I65a63d02eacb3459367ad3e6cf056d346aac8044

chromium/chromium@05f85c3

Pass an explicit Profile reference to TemplateUrlServiceFactory
from SearchEngine settings.

BUG=1410601

Change-Id: Id6dbf39632d028838acefb529e029eb0d447cda5
2023-04-20 23:56:04 -04:00
deeppandya 51062bf1c8 Add strings from kotlin module
Add patch for suppresing string warnings

Update default playlist code

Intial work for light mode UI
2023-03-26 15:24:35 +05:30
AlexeyBarabash f6a266f250 Revert "Reland Disable ChromePreferenceKeyChecker to avoid crashes on Nightly"
This reverts commit de51521bf4.
2023-03-08 08:43:17 +02:00
wchen342 bea06accca Merge pull request #17383 from brave/android_speedreader_panel
[Android] Add message UI for speedreader
2023-03-07 11:48:07 +00:00
wchen342 04ab04e829 Add prompt for speedreader 2023-03-07 13:04:22 +02:00
AlexeyBarabash de51521bf4 Reland Disable ChromePreferenceKeyChecker to avoid crashes on Nightly
Fixes brave/brave-browser#28890
2023-03-04 00:06:05 +02:00
wchen342 212ac0cd18 Add separate JNI getter for OTR profile based TemplateUrlService 2022-11-08 06:07:25 +02:00
AlexeyBarabash 89303faf6d Revert "Merge pull request #14402 from brave/sync_dse_android"
This reverts commit 826c6f8b0d, reversing
changes made to 68ea3e2e85.
2022-09-06 20:02:33 +03:00
tapanmodh 48776e9daf fix crash omnibox search banner android 2022-08-30 15:53:06 +05:30
AlexeyBarabash ceff26d476 Override SearchEngineAdapter.didSearchEnginesChange
This allows to refresh DSE chenged by sync in browser settings UI on Android

Bytecode asm test for SearchEngineAdapter.didSearchEnginesChange override
2022-08-12 15:35:32 +03:00
tapanmodh 54c44d2352 Address PR Comments 2022-08-04 13:34:05 +05:30
wchen342 d21977e52d patch and bytecode test fixes 2021-09-27 21:40:21 +03:00
wchen342 4117806719 Add bytecode tests 2021-09-27 21:39:42 +03:00
samartnik 54ad1c0db1 [Android] Simplified object casting for bytecode 2021-04-12 18:15:55 -04:00
samartnik 91fd473075 [Android] Added exceptions to proguard for methods for invocation 2021-02-17 10:33:38 -05:00
AlexeyBarabash 190c647d00 Fix to make build of Android apk with enable_brave_sync=false 2020-07-28 17:23:15 +03:00
AlexeyBarabash 12a8db2ef6 Remove obsolete proguard rules used for sync v1 js stuff 2020-07-28 17:20:13 +03:00
samartnik 1c594d8e6e [Android] Reverted proguard rule for BottomSheetBehavior 2020-05-26 10:02:29 -04:00
samartnik c782e5da7a [Android] Removed obsolete proguard rule 2020-05-26 10:02:28 -04:00
Deep 78b9732cf3 Add background images code for NTP
Add resources for ntp

Add QA pref for NTP

Add string resources

Update patches
2020-03-09 16:19:36 -04:00
SergeyZhukovsky 83f900ecee adds proguard file for Android sync 2020-01-08 12:08:45 -05:00