-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt Android for sync v2 #5361
Conversation
8977ebb
to
f64ec2a
Compare
e93b6cc
to
0a9b7e6
Compare
128b438
to
628bb08
Compare
4088d45
to
a04d159
Compare
351d4c9
to
b863fa5
Compare
b863fa5
to
833df59
Compare
Related required brave-browser PR is brave/brave-browser#10203 . |
…phrase work (Addressed review comment)
Such messages will be removed by proguard on release build. (Adressed review feedback)
(Addressed review)
…n now (Addressed review comment)
Modification to force act as AndroidSyncSettings.mChromeSyncEnabled is always true
(According to the review)
7d0af48
to
0f0b680
Compare
CI status is unstable Android, iOS, Windows - succeeded Linux - failed test-browser
macOS - failed test-install
Adding skip-per-os labels, restarting CI. |
macOS succeeded Linux failed again
Adding skip for macOS, restarting CI |
Resolves brave/brave-browser#10203
In this PR:
Issues required to be resolved to complete the task, but will be made as a separate PRs:
redo removes unneeded permiossions on Android #5096 as Android Sync v2 required ([Android] Redo brave-core PR #5096 (about Android permissions) brave-browser#10417)
implement infobars similar to [sync-v2 base] Sync: Show an infobar at startup for sync v1 users #5804 for Android systems ([Android] Implement infobar for Android sync v1 users about v1 will be deprecated brave-browser#10416)
update device list when device leaving the chain
([Android] Sync v2 update device list when device leaving the chain brave-browser#10460)
consider use Chromium java methods for sync v2 instead of native calls at brave_sync_worker.cc
([Android] Consider use Chromium java methods for sync v2 instead of native calls at brave_sync_worker.cc brave-browser#10454)
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
I. Migrating from sync v1
You will need the rooted device to verify fully all prefs are set after migration, otherwise it is possible to verify till pt 7 and not pt8
With file explorer on rooted device check these files:
/data/data/com.brave.browser_default/shared_prefs/SyncPreferences.xml
contain only<string name="Seed">
element/data/data/com.brave.browser_default/app_chrome/Default/Preferences
contain entry"brave_sync_v2":{"v1_meta_info_cleared":true,"v1_migrated":true}
II. Create sync chain on Android and connect desktop
III. Create sync chain on Desktop and connect Android
IV. Connect to the chain through QR code
V. Leave and re-connect to the chain
three devices (for now)two (device now send self-delete record when leaving the chain) in the list of devices both on Device1 and Device2// ^ This test (V) in half of cases fails with info in chrome://sync-internalsGenerateCryptoErrorsForTypes
and encryption statePassphrase Required true
. This is blocker. Investigating.This is fixed
VI. Sync types
Setup sync chain between desktop and mobile.
Switch sync everything and all other categories into position off on both devices.
A. Autofill
0. Ensure Autofill switch is turned off on both devices
1. On desktop go to https://www.computerhope.com/jargon/a/autofill.htm , write data to
First Name field
, press Submit and ensure Autofill works;On mobile do the same, use
Last name
field2. Wait 2 minutes, ensure Autofill was not synced by clicking on corresponding fields -
First Name
on desktop andLast name
on mobile.3. Switch Autofill into position on on both devices
4. Wait 2 minutes, ensure Autofill was synced by clicking on corresponding fields - it should display Autofill hint on both
B. Bookmarks
0. Ensure Bookmarks switch is turned off on both devices
1. Create bookmarks on mobile and desktop
2. Wait 2 minutes, ensure bookmarks are not synced
3. Switch Bookmarks into position on on both devices
4. Wait 2 minutes, ensure bookmarks are synced
C. History
0. Ensure History switch is turned off on both devices
1. Browse some different sites both on mobile and desktop
2. Wait 2 minutes, ensure history is not synced
3. Switch History into position on on both devices
4. Wait 2 minutes, update history page, ensure history is synced
// ^ Desktop got history entries from mobile, but mobile - didn't. Investigating.this is fixed, was related to situation when sync stopped work after app restartD. Open tabs
0. Ensure
Open tabs
switch is turned off on both devices1. Open several tabs on desktop
2. Right click on tab and choose menu option
Send to Phone
3. Wait 2 minutes, ensure nothing happens
4. Switch
Open tabs
into position on on both devices5. Right click on tab and choose menu option
Send to Phone
, ensure you see notification on phone and the tab is opened by click onthe notificationE. Passwords
0. Ensure Passwords switch is turned off on both devices
1. On mobile login to some website
2. Wait 2 minutes
3. Check the page brave://settings/passwords - should not be any passwords
4. Switch on Passwords option on both devices
5. Wait two minutes and password should be available on desktop
F. Settings
0. Install browser on phone1 and phone2
1. Ensure
Settings
switch is turned off on both devices2. Go to Settings=>Privacy; ensure
Preload pages for faster browsing and searching
is turned off3. On phone1 change that setting to on
4. Wait 2 minutes, re-enter Settings=>Privacy, ensure on phone2 this is still off
5. Switch on Settings on both phones
6. On phone1 switch
Privacy => Preload pages ...
to on7. Wait 2 minutes,re-enter Settings=>Privacy and ensure
Privacy => Preload pages ...
is on on device2// ^ Now this appears not working on Android. Investigating.settings category works between phone and phoneReviewer Checklist:
After-merge Checklist:
changes has landed on.