Commit Graph

40 Commits

Author SHA1 Message Date
Tommy Webb
2db34a23d7 Check biometrics availability when relevant
Check the availability of biometrics when we need to know, waiting until
then to decide the presence of ScreenLockActivity, rather than checking
once during initialization and permanently disabling pages of the setup
wizard. Otherwise, a race condition may cause the system to report that
the hardware is unavailable, even though it will be ready when needed.

Reorder pages such that biometrics comes first, allowing screen lock
to act as the fallback.

Issue: calyxos#2544
Change-Id: I654ce25569b983035f1df453623c7a4acd54931d
2024-07-19 17:21:34 -04:00
Oliver Scott
ecaeda6224 Simplify exit code
Change-Id: Ied4a7cb143ef979fd70da81cda6472f85e750739
2024-05-18 12:27:11 +03:00
Oliver Scott
3616338149 Replace hardcoded references to Settings intents
Where required, move hardcoded strings into the files which use them

Change-Id: I411d18739459b46095667f85cf5e0a82fd52b0d2
2024-05-18 12:27:11 +03:00
Oliver Scott
12c7da294f Fix improper SIM Missing automatic navigation
* Properly allow the user to go backwards to prior to the SIM Missing
  page, if it had ever appeared and then a SIM became available.
* Ignore the activity result. Wizard remains on SIM Missing page until
  user chooses to leave or returns to wizard with SIM present.

Change-Id: I3edac6cbb03d76c66b04673d6104e98189ce365c
2024-05-18 12:27:11 +03:00
Bruno Martins
5dd3549573 SetupWizardUtils: Check if active Ethernet network reaches the Internet
Extend the current Ethernet connectivity validation to check
if network is active (can receive and send data).

Change-Id: I1017df7740000774acc713a419c8572ee4ea588f
2024-04-27 15:58:48 +01:00
Bruno Martins
2ec7da3228 SetupWizardUtils: Properly test for Ethernet transport presence
NetworkCapabilities#hasCapability tests for the presence of a
capability, not of a transport. Use the proper method to fix the
Ethernet connectivity validation.

Change-Id: I7e1828cca420e9a84080ede51807ab12ec9eedcb
2024-04-27 15:52:33 +01:00
Michael Bestas
f3d2943c38 Remove unused import
Change-Id: I7660d5e51aa8a063ba118caa57d7d6898e5211f4
2024-03-02 03:39:04 +02:00
Tom Pratt
ab27e602cb Don't disable mobile data, AOSP has props for this
Mobile data during and after setupwizard can be controlled with:

ro.com.android.mobiledata
ro.com.android.prov_mobiledata

Change-Id: Ia4ef25f55ab32e8c13f9683b5db73438a29a192b
2024-02-28 17:05:26 +02:00
Michael Bestas
ec05005cfe SetupWizard: Make it REUSE compliant
* Ignored all the strings.xml since they are auto-synced

Change-Id: I5d9e7aa5ae7b0079f792450f7e6dbf83216ebac4
2024-02-26 00:25:43 +02:00
Oliver Scott
fd0fdb8a49 Fix various java warnings
Change-Id: I4c4381e1755831df2c4f41279800fd6af173e4ed
2024-02-26 00:22:03 +02:00
Tommy Webb
63bbec0258 Only finish Setup Wizard Activity when fully done
Wait for the ACTION_FINISHED broadcast before finishing the Activity.
This prevents the Setup Wizard from being re-launched when it is still
set as the default home screen, which it continues to be until the
exit worker changes as part of its finishSetupWizard call.

Skip SetupWizardExitActivity during the normal finish process, moving
common exit operations to SetupWizardUtils.

Change-Id: I1c59553e7dcaf934fb81dce9bf901ec0f2bb7b59
2024-02-26 00:19:22 +02:00
Oliver Scott
f58c0f4b83 Update deprecated code
Change-Id: I1b128b0f8b654c5c76464c12145d927ec10da26e
2024-02-25 23:45:38 +02:00
Tommy Webb
83338c4ae6 Consolidate PhoneMonitor into SetupWizardUtils
Moved and refactored missingSim and its helper functions into
SetupWizardUtils, making them static. This was the only part of
PhoneMonitor that was used anymore.

Change-Id: I220e82e83bdb301206c4286b562f69c223de56e2
2024-02-25 23:45:38 +02:00
Oliver Scott
51fde0aa49 Automated code cleanup + copyright update
Change-Id: I6deb788643d639f11ce9a5dc09eda701a2664c4a
2024-02-25 23:45:38 +02:00
Oliver Scott
86ed621eff Launch Settings activities for lockscreen and biometrics setup
Issue: calyxos#1420
Change-Id: If6145a7f5a8bd0acc648a3b3ce4aa0d59a5157e0
2024-02-25 23:02:28 +02:00
Oliver Scott
0dc2e90fad fixup! Simplify biometric detection
Change-Id: Idff88839377f78b86f469dd744115ba0d55f9d46
2024-01-05 11:12:24 -05:00
Oliver Scott
5fb7fc2f4b Simplify biometric detection
Change-Id: I078c269d1463fbbb69685970d32702715ad325ac
2023-12-11 19:23:32 -05:00
Michael Bestas
0ace5b6bd4 SetupWizard: Fix build after getDefaultDataPhoneId removal
40dfa97392

Change-Id: Ie853c7e789023814c83fed5f318c4910a1169a04
2023-10-22 12:33:26 +00:00
Oliver Scott
fb6285a35e Add API to query managed profiles
Replace mIsPrimaryUser and UserManager calls with API

Change-Id: I4c9661c6daf3dcb714db01d5229bf4cee37648c2
2023-06-06 22:10:00 +02:00
Nicholas Lim
2af9f05f0d SuW: Disable BluetoothSetupActivity component with prop
* Checks if config.disable_bluetooth=true is set
* Some leanback devices do not have bluetooth chips

Change-Id: Id4d3445e24d9888e186b69a959dbaf54fc9bf31e
2022-06-08 20:51:32 +08:00
Timi Rautamäki
3484c40778 Revert "SUW: fix setting USER_SETUP_COMPLETE"
This reverts commit 7ffdf8d12c.

Reason for revert: 
The code change was not changing the behaviour after all.

Change-Id: Ibe335a2b94d5120b9c3f1a247d8153a0d791b796
2022-04-27 17:42:29 +02:00
Timi Rautamäki
7ffdf8d12c SUW: fix setting USER_SETUP_COMPLETE
This setting needs to be set per user.

Change-Id: I5a312fab472d4d5f5bbe8424ddff6f34148ce69f
2022-04-13 10:31:56 +00:00
Bruno Martins
2c963229ec SetupWizardUtils: Remove unused isMobileDataEnabled method
Last usage was before commit 334cd1b.

Change-Id: Ic59a47a62bb439db5d7859ea136c3334ae5257fa
2022-03-30 21:22:07 +01:00
Michael Bestas
334cd1bce7 Changes for new network setup flow
* Remove mobile data/choose data sim pages
* Rename Wi-Fi setup to network setup
* Switch to the new NetworkProviderSettings which contains
  both Wi-Fi and mobile data setup.

Change-Id: I1c618d629628740e39dbed313d468d1efe971ed7
2021-12-29 01:05:24 +02:00
Michael Bestas
b7b34b96a9 The big code style cleanup
* Format using AOSP code style in Android Studio,
  excluding `Rearrange entries` option.
* Rename static variables to use proper naming scheme
* Remove empty lines

Change-Id: I0d193e35f071bc288050e587b1693844d68865e1
2021-09-03 11:58:29 +00:00
Artem Borisov
fbf886e808 SetupWizard: Fix status bar managing workflow
StatusBarManager uses tokens in binder connections to identify
disable records and queue each of them accordingly. New record creates
each time an application connects to StatusBarManager and tries to change
the state. New records don't activate until previous ones are destroyed.
Records can be destroyed either when app binder dies, or when the same
binder ticket reverts its previous changes.
To accomodate this behavior, StatusBarManager was moved to a static class
that initializes first when status bar gets disabled, and then gets destroyed
when status bar is re-enabled.
While we're at it, also fix race condition between main and exit activites
by moving status bar disabling code to the application class.

Change-Id: I3b33e628da1e1881181cbe665e6aaccee3dd19ef
2021-09-03 11:58:29 +00:00
Oliver Scott
7e04f9c361 Disable ChooseDataSimActivity if single SIM detected
Change-Id: I963a7b4f268698c048cf0eccb15198412b3e2ab3
2021-09-02 12:24:00 +00:00
Oliver Scott
1167c047be Fix SimMissingActivity never showing
Change-Id: I1a9d2539db96046c472f17a21932bc720c00eb26
2021-09-02 12:24:00 +00:00
Michael Bestas
c5232fcebd Rework isMultiSimDevice check
Move it to PhoneMonitor to be consistent with other checks

Change-Id: I560048ebdf318a92747a70ffb6fa8027b4589c1a
2021-09-02 12:24:00 +00:00
Alessandro Astone
d93e0e1bbd SetupWizard: Add activity to toggle recovery updates
Change-Id: I8157d812c1b616b10dd4204d12cc8fb21d4eee50
2020-11-19 01:26:28 +02:00
Chirayu Desai
e372bc0542 Switch fingerprint setup to biometric setup instead
* Generic, handles both face and fingerprint
* Works the same as before for fingerprint
* Works the same as fingerprint for face
* What else could one ask for?

Change-Id: I9ddd7b46548c8107239fdec457bbaae6b12876e6
2020-11-13 22:29:36 +01:00
Aaron Kling
5d1780f595 ATV: Disable custom SUW if GMS SetupWraith is available
This sets the partner customization flag to allow adding hooks
later if necessary.

Change-Id: Ie8dcb0f2eae8916ef00f812ea85661c020dce53b
(cherry picked from commit 68b11675e1)
2020-09-10 23:34:31 +02:00
Chirayu Desai
ec3e5ccaaa Account for PhoneMonitor API change
* Needed after:
84a90870aa

Change-Id: Ie6c28388f28b97af273f7c93fc6b5b56b518370a
2020-01-22 23:25:50 +02:00
razorloves
85465bc433 SUW: Change WizardManager activity default state to disabled
Google's suw handles the LOAD and NEXT actions, so this creates
duplicate tasks and crashes google suw when finish() is attempted.

Change-Id: Ifdbd9365fba7f299dc041e42ae27a91da071aa99
2019-02-12 09:31:47 -06:00
Michael W
2236d29199 SUW: (Not-really-)Spring Cleanup
* Remove unused imports
* Fix a few line length issues
* Convert a few anonymous classes to lambda expressions
* Convert a few global vars to locals
* Remove unused methods
* Add a small local method in MobileDataActivity to shorten repeated calls

Change-Id: Ia10be8b8c98ef3956949f913ddb6bddc185cf1a5
2018-07-25 13:34:51 +02:00
Aaron Kling
e7ec39571e Remove code to disable setupwraith
Setupwraith from 8.0 no longer needs to be platform signed

This reverts commit e0605c03f4.
This reverts commit 092d0fa892.

Change-Id: Ic9801ee52d931e87b6568a1faa4de39b32c3629d
2018-03-20 01:15:58 +00:00
Abhisek Devkota
7a315e894f ATV: Also set TV_USER_SETUP_COMPLETE
New provisioning flag was introduced in f/w/b
  0390fff82c37c705670a6c8937c11b52e2af4cb6

Change-Id: I342681927bd4f8d3f73dd8b0e0047eb8e1db6d2c
2018-03-04 20:09:13 -08:00
Michael Bestas
709054b0dd SUW: Fix crash on fingerprint capability check
* Check if the device supports the fingerprint feature before proceeding

Change-Id: I9cda52500c1e45499b5647fccff3d7d37c8311ef
2018-02-05 15:55:39 -08:00
Michael Bestas
c83309e963 SUW: rebrand step 2: update file contents
Change-Id: Ic04f03f82242608960bd6d9c4c2561c2bbdda1da
2018-02-05 15:55:31 -08:00
Michael Bestas
fbae0863a6 SUW: rebrand step 1: update paths
Change-Id: Ic63e83de56659750a9d75fe577187c0d9f25147f
2018-02-05 15:55:24 -08:00