Commit Graph
3352 Commits
Author SHA1 Message Date
Artem Samoilenko cdc8dd7a2f [Android] Fix for bottom controls glitch with bottom toolbar enabled
In C116 `dropCachedBitmap` doesn't trigger bitmap capture of the bottom
controls anymore, so we need to do it explicitly.
2023-07-26 16:51:06 -04:00
Artem Samoilenko d17de3cae0 [Android] Fix for lint error
Error fixed:
public_bundle__lint/config.xml --project gen/chrome/android/monochrome_public_bundle__lint/project.xml
../../brave/android/java/org/chromium/chrome/browser/rewards/onboarding/RewardsOnboarding.java:103: Error: Unexpected implicit cast to Button: layout tag was TextView [WrongViewCast]
        mContinueButton = mLocationChooseLayout.findViewById(R.id.btn_continue);
2023-07-26 16:50:55 -04:00
Artem Samoilenko d59fcc9776 [Android] New c-tor signature for TabbedRootUiCoordinator
Chromium change:
https://github.com/chromium/chromium/commit/8fe1cbc3480be673ef4fe7fd3f71a13b97a6ef0c

Incognito Reauth: Fix reauth screen not restored when activity is killed
Under memory pressure (emulated by the "Don't keep activities" setting), IncognitoReauthController gets killed after starting the reauthentication flow. When restored, savedInstanceState is checked for incognitoReauthPending when re-initializing the IncognitoReauthController, to determine whether to resume the reauthentication flow.

The problem lies when the SavedInstanceState is reset in
ChromeTabbedActivity::onStartWithNative which sets it to null before it
is checked for the incognitoReauthPending key in
RootUiCoordinator::onFinishNativeInitialization, making
mIsIncognitoReauthPendingOnRestore in IncognitoReauthController always
return false and the reauth screen not getting restored when the
activity is killed.

This CL saves the incognitoReauthPending key value from
SavedInstanceState in the the constructor of RootUiCoordinator before
it is reset.

(cherry picked from commit 318d0b3)

Demo: https://drive.google.com/file/d/16nBDAFA3bIk065EsGGmynMLTY_zU7Uop/view?usp=sharing
Bug: 1365633
2023-07-26 16:50:52 -04:00
Artem Samoilenko 500b1fe75e [Android] New signature for SigninManager.create
Chromium change:
https://github.com/chromium/chromium/commit/2e8401354bf3451872450caac741bc87fe84d385

[android] Remove some calls to deprecated SyncServiceFactory.get()
Hopefully no behavior changes. These calls were underlying calls to
getLastUsedRegularProfile(). Instead, call
SyncServiceFactory.getForProfile() and pass an explicit profile
reference. The references are chosen from one of the 4 options below.
The focus is not to accidentally replace the regular profile with the
incognito one.

1. A nearby field/variable which is still getLastUsedRegularProfile()
if you follow the stack trace.
2. Use of TabModelSelectorProfileSupplier + getOriginalProfile().
3. The profile in SigninManagerAndroid, since that service is not
instantiated in incognito.
https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:chrome/browser/signin/signin_manager_android_factory.cc;l=16;drc=b35d0400e78c4216ea3e6941d91373147572953c
4. The profile obtained from the WebContents. This only happens in
AddressEditor.java, where the reference can come from
SaveUpdateAddressProfilePromptViewAndroid. In this particular case there's no need for getOriginalProfile(), because the save prompt is
not shown in incognito.
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/autofill/save_update_address_profile_prompt_view_android.cc;l=57;drc=74077ae07468070edcaac721aef246dd5fcf8092

This CL introduces new SyncService fields/arguments in some layers.
We add @nullable according to whether the existing code handles a
null object, not whether the object can really be null.
Fixing null support is off the scope of this CL. The null SyncService
story is also not ideal IMO (rant, https://crbug.com/1434356#c8)

Disable-Rts: True
Bug: 1380925
2023-07-26 16:50:40 -04:00
Artem Samoilenko 6c9b607a3f [Android] BakedBezierInterpolator was removed
Chromium change:
https://github.com/chromium/chromium/commit/debfcd6f15364600b8791da5fe285b20d07f64f5

[Fixit] Remove BakedBezierInterpolator
Interpolators.java fully replaces BakedBezierInterpolator which is
deprecated. This should save a small amount of memory/binary size
by removing the pre-defined arrays. All Interpolators are now shared
:D

This did require moving Interpolator.java for deps reasons, but that
should be fine.

Low-Coverage-Reason: Large scale change
Bug: 1454611
2023-07-26 16:50:40 -04: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
Artem Samoilenko 37980ea22b [Android] SyncService was moved to components
Chromium change:
https://github.com/chromium/chromium/commit/008f790110002c3427867eea0acfbe23cef83309

Remove dependencies on SyncService in //chrome and move to //components.
Deletes the instance in //chrome.

Inlines the SyncServiceWrapper into FakeSyncServiceImpl.

Where possible, reuses the profile in the existing code to reduce the
usage of the deprecated method that does not take the Profile reference.

Low-Coverage-Reason: Mechanical refactoring
BUG=1380925

Change-Id: I43853ab63e39c53b8d1408f51c998d076d11a7ad
2023-07-26 16:50:24 -04:00
Artem Samoilenko 07d6e6b355 [Android] Fixes for unit tests
Chromium change:
https://github.com/chromium/chromium/commit/7acb8d6bc8401edde79c01e49f6764f821aded8f

Reland "JNI: Only using 1 registration per apk"
This reverts commit 6f773ca.

Reason for revert: Now I'm keeping around the extra jni_registration
until I can migrate all uses off of it.

Original change's description:
> Revert "JNI: Only using 1 registration per apk"
>
> This reverts commit a74d255.
>
> Reason for revert: broke internal bots
>
> Original change's description:
> > JNI: Only using 1 registration per apk
> >
> > We now associate a JNI registration with a native library, via our new
> > native_with_jni template. We no longer have a generate_jni_registration
> > happening with pure Java in the apk template.
> >
> > We now only output 1 GEN_JNI per srcjar, and instead of collecting all
> > JNI from modules and outputting many GEN_JNIs in one srcjar.
> >
> > Bug: 1406611
> > Change-Id: Iec40dc7c443e206f177fa8a7d5f9635cefa4c747
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4219332
> > Commit-Queue: Sam Maier <smaier@chromium.org>
> > Owners-Override: Sam Maier <smaier@chromium.org>
> > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1142236}
>
> Bug: 1406611
> Change-Id: Ifedf95de229bd16039ae026dfe3ccc90b66f154c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4518235
> Commit-Queue: Lijin Shen <lazzzis@google.com>
> Auto-Submit: Sam Maier <smaier@chromium.org>
> Reviewed-by: Lijin Shen <lazzzis@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Lijin Shen <lazzzis@google.com>
> Cr-Commit-Position: refs/heads/main@{#1142294}

Bug: 1406611
2023-07-26 16:50:23 -04:00
Artem Samoilenko 08adad3c51 [Android] Java code adjustments to C116 changes
Minor changes to imports and c-tor signatures.
2023-07-26 16:50:14 -04:00
Anton Paymyshev c2eff206fa Bitcoin UI (#19243) 2023-07-26 15:50:05 +07:00
Sujit Acharya 5ed785dd6b Merge pull request #19382 from brave/30638_manage_ads
30638 manage ads
2023-07-25 19:56:16 +05:30
Simone Arpe be60b7681e (Wallet) Improve flow to manually add NFTs (#19404) 2023-07-25 16:04:54 +02:00
Sujit 11158d91bc Brave Rewards manage ads 2023-07-25 00:22:48 +05:30
Pavneet Singh 777578decb Buy web UI (#19334)
* implement buy screen

* fix style

* Open buy link on android and clean up

* add test

* - Update id (being used by deposit PR) and comment

* fix button width (width is still more than spec)

* update file name to match desktop style

* clean up

* fix security warning with 'noopener'

* clean up and add docs per deposit PR review

* remove router

* update log

* Separate android buy directory to generate resources

* Reduce redundant test code and formatting
2023-07-24 10:44:29 +05:30
Simone Arpe d4e31d00fc (Wallet) Load deposit Web UI (#19256)
Expose deposit Web UI on Android.

The new deposit page can be accessed by navigating to `brave://wallet/deposit-funds` or tapping on the FAB in the Wallet section and selecting Deposit.
2023-07-20 19:24:05 +02:00
Kevin Smith 69b239b79f Merge pull request #18938 from brave/ksmith-ads-control-center
Implement Ads control center on Rewards page
2023-07-20 11:13:27 -04:00
Brian Clifton e2c5b46c8f Merge pull request #19348 from brave/bsc-android-vpn-article
Update URL to be Android specific one
2023-07-19 15:31:10 -07:00
Sujit 4bac5cd3c1 ANR showing rating card in news page 2023-07-19 18:57:34 +05:30
Brian Clifton 1723649d3f Update URL to be Android specific one
Fixes https://github.com/brave/brave-browser/issues/22950
2023-07-18 23:16:49 -07:00
Terry Mancey 93c5e6c095 Implement Ads control center Brave Ads changes 2023-07-18 14:41:17 -04:00
Sangwoo Ko ef4086b650 Implement "Remove from Playlist" from PlaylistActionBubbleView (#19245)
* Make new observer APIs to set parents playlist properly
* Fix bug where download item could be dangled
2023-07-13 15:41:03 +09:00
Kevin Smith 8759f12150 Merge pull request #19122 from brave/ksmith-rename-ledger
Replace ledger terminology in Rewards code
2023-07-12 09:15:23 -04:00
Pavneet Singh 23329321c4 fix overlapping toast security issue (#19231) 2023-07-12 10:35:17 +05:30
zenparsing 2f852e3c6d Replace ledger terminology in Rewards code 2023-07-11 14:47:11 -04:00
Simone Arpe 320adef986 (Wallet) Convert "Add custom asset" dialog to full screen (#19195)
Implements a full screen activity to add custom assets or NFTs.
Fix some minor issues to make it consistant with iOS and Desktop implementation:
* For Solana tokens the label `Token address` becomes `Mint address`.
* The new UI got rid of the cancel button as the same action can be achieved by tapping on the back arrow icon or using the system navigation controls.
* Token ID for ERC-721 is not shown for Solana NFTs.
* Text watcher has been improved moving its implementation into a class interface.
* Minor improvements to `NetworkSpinnerAdapter` class.
2023-07-11 15:14:06 +02:00
Anton Paymyshev 0ecab6c930 Refactor Wallet SelectedAccount (#18930) 2023-07-10 16:01:55 +07:00
Pavneet Singh 51d92422a8 Hide tx,BSS dialogs when wallet is auto-locked (#19178)
* hide tx,BSS dialogs when wallet is auto-locked

* clean up and formatting
2023-07-07 14:26:27 +05:30
Serg a10c760b69 Merge pull request #19148 from brave/android_mojo_separation
Android mojo separation
2023-07-05 12:47:28 -04:00
Sujit 34aca8f2bd Resolve comments 2023-07-05 20:08:40 +05:30
deeppandya 12605c8878 Update onboarding with single popupwindow 2023-07-05 20:08:28 +05:30
Sujit fa88bcc918 Rewards onBoarding 2023-07-05 20:08:23 +05:30
Serg c91cd387e1 Creates a separate mojo ConnectionErrorHandler for Privacy Hub on Android 2023-07-05 10:23:12 -04:00
Serg 77ba6b5120 Creates a separate mojo ConnectionErrorHandler for Brave news on Android 2023-07-05 10:15:27 -04:00
Mark Pilgrimanddeeppandya 87cece9f32 Add Android settings UI and enable Android support for OTR tab (#18931)
* Add Android pref for Request OTR

* Update android UI changes

* .

* exclude browser tests on Android

* build fiddling

* remove platform gate on string resources

* fix Android include

* fix link error

* fix Android test

* normalize capitalization

---------

Co-authored-by: deeppandya <deeppandya91@gmail.com>
2023-07-04 03:49:03 +02:00
5aa9fb10c2 Expose Send web UI on Android (#18984)
Exposes `brave://wallet/send` as a web UI on Android.

Co-authored-by: Douglas Daniel <douglashdaniel@gmail.com>
Co-authored-by: Vadym Struts <vstruts@brave.com>
2023-06-30 17:39:59 +02:00
Pavneet Singh 566fb1edc6 Remove local network assets in GPS variants (#19113)
* - Remove local network assets in GPS variants
- Clean up

* remove unused imports
2023-06-30 18:25:11 +05:30
Tapan Modh f4ec52711c Merge pull request #19107 from brave/deeplinks_android
deferred deeplinks android
2023-06-30 14:17:24 +05:30
tapanmodh 318cd55692 deferred deeplinks android 2023-06-29 22:06:18 +05:30
Pavneet Singh bd757b4e88 Prevent NPE of network (#19063)
* - Prevent NPE of network
- Clean up

* CI fixes
2023-06-28 11:15:52 +05:30
Pavneet Singh 4eca06ff94 show all assets in account screen (#19039) 2023-06-27 10:38:43 +05:30
Deep Pandya f478d8aa3d Merge pull request #18936 from brave/remove_back_dated_grants_notification
Don't show back dated notifications
2023-06-26 11:55:39 -04:00
Deep Pandya 03292511d5 Merge pull request #19005 from brave/resolve_vpn_callout_dialog
Resolve vpn callout dialog
2023-06-26 10:43:30 -04:00
deeppandya f5c2aba28c return if back dated notification id is found 2023-06-26 09:45:49 -04:00
Pavneet Singh 516326b0ff Network filter in edit visible (#19015)
* add network selector in edit visible

* clean up
2023-06-26 11:01:34 +05:30
vadims 6223e41a0c Swap page available for locked wallet (#18998)
fix for the opening swap page for the locked wallet

Signed-off-by: Vadym Struts <vstruts@brave.com>
2023-06-23 23:19:34 +02:00
Simone Arpe da679e8f67 (Wallet) Enable Filecoin support flag (#18881)
Enables Filecoin support flag and implements send action.
2023-06-23 22:06:53 +02:00
deeppandya 030addfa1c Don't show back dated notifications 2023-06-23 14:11:14 -04:00
deeppandya f8b2d376ca Resolve vpn callout dialog 2023-06-23 13:53:18 -04:00
Pavneet Singh 7aee3ddf21 Add network selector in add asset dialog (#18982)
* add network selector in add asset dialog

* fix text and button colors

* fix button spacing

* clean up

* fix typo
2023-06-22 11:38:20 +05:30
Tapan Modh 40f969e17e Merge pull request #18989 from brave/fix_brave_news_card_crash_gps
[Android] fix brave news card crash gps
2023-06-22 01:29:50 +05:30