Commit Graph

26 Commits

Author SHA1 Message Date
Michael Bestas
965cd0c223 Specify theme when launching external activities
Change-Id: Ia2db8a1b3753bdc3d9bd646be68e98367c2aed39
2024-02-26 00:25:44 +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
feadacc46b Cleanup exit code
Change-Id: I5fe6165d87afa63887025c3635eafae9f968c062
2024-02-26 00:22:27 +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
Oliver Scott
04c9f463d5 Use WizardManagerHelper NEXT intent and result codes
The helper function copies all relevant extras

Change-Id: I1ebb48dd2e2a2ba0881c6a3382996c2243d84140
2024-02-25 23:02:28 +02:00
Oliver Scott
4959595167 Always set EXTRA_IS_SETUP_FLOW when starting activities
Some activities behave differently if launched during setup (e.g. https://cs.android.com/android/platform/superproject/main/+/main:packages/apps/Settings/src/com/android/settings/biometrics/BiometricUtils.java;l=203;drc=7f8197da822dea3ce92d3aedb61715d372d7a8e1 https://cs.android.com/android/platform/superproject/main/+/main:external/setupcompat/main/java/com/google/android/setupcompat/util/WizardManagerHelper.java;l=243;drc=d4035b6eb1192f71af7adae47bf17d22c7356fa1)
This change defaults to using the setup flow variant of all launched activities (if applicable)

Change-Id: I0448f2ec5b2789a094d69b1614596d96260edbf5
2023-12-11 19:23:36 -05:00
Oliver Scott
4c8cc2f348 Do not exit if setup complete for managed profiles
Previously a call to mark user setup as completed for managed profiles
was removed from the device policy manager service to avoid exiting the
setup wizard while launching it after successfully provisioning.
If a the setup wizard did not finish correctly it had side effects
(e.g. work profile apps would not remain in recent activities).

Allow managed profiles to launch the setup wizard even if user setup
is marked as completed.

Issue: calyxos#1024
Issue: calyxos#1123
Change-Id: I940937dd02f2d4991677da886bb3a4f522661210
2023-06-06 22:10:00 +02: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
Oliver Scott
0002daed48 Only modify network settings on system user
Captive portal, wi-fi and mobile data should not be modified for secondary users without user intervention

Issue: calyxos#1025
Change-Id: Ic24d18268d05b5a1535b3993bdd0a614055847f6
2023-06-06 22:10:00 +02:00
Alexander Martinz
f85129e80b FinishActivity: prevent jumping layout when finishing
When setting up the finishing sequence, the navigation bar gets
hidden, resulting in the layout adjusting and moving.

Once the start button is pressed, pressing back on the navigation
bar is ignored.

Change-Id: Ibb961ab059c2b8be38e88db691d4293e180f3b1c
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2023-04-14 01:56:33 +02:00
Michael Bestas
b16ecaf00c SUW: Set EXTRA_IS_SETUP_FLOW for accessibility settings
* Fixes theming of accessibility page

Change-Id: I9739753b8b609772e42a55231bcd878d8d5dbae1
2022-05-05 13:50:26 +03:00
Timi Rautamäki
daef80ecaf SUW: improve navigation on D-pad devices
* Set the initial focus on a usable view instead of a whole layout.
* Set the next focus of the locale selector to next-button.

Change-Id: I4a16127c24e87b52e38892882e44b3a8d24b779b
2022-01-15 22:24:59 +00: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
Timi Rautamäki
f6dbf84363 SUW: add accessibility settings to welcome page
Added icon is from https://materialdesignicons.com/.

Change-Id: I21daa20c59f3deb7ef862fdbe7f7ce9262094c9a
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
Timi Rautamäki
44fb45c421 SUW: use standard navigation method
Use software/hardware back button and add on-screen Next & Skip buttons.

Change-Id: I7bfa052f2217e51ea778df688e7169657aaad2c6
2021-09-03 11:58:28 +00:00
Michael Bestas
885e3b363a SUW: Cleanup intent extras
Remove unused extras:
allowSkip: Removed in 2015
wifi_auto_finish_on_connect: Removed in 2016

Use WizardManagerHelper definitions when possible

Change-Id: I4e6a503ae030b85486921fcacfc4fe03e37c8698
2021-09-03 11:24:25 +00:00
Timi Rautamäki
5e2f7f2dfe SUW: use setupdesign layout & theming
Change-Id: I4841b701a8952035bd633d73368e80075d17e42a
2021-09-03 11:24:25 +00: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
Torsten Grote
da1355a5c5 Hide activities when setup finishes, so they don't pop up at the end
Change-Id: Ica6b5babf7df7a7d8033ecd7694e3f45144b363a
2020-11-13 22:29:36 +01:00
Christian Oder
cff638652a LSW: Properly set page transition and cleanup definitions on the way
Set slide animation by default and use it in all pages.
Fix wrong/missing slide animations on various transitions like WiFi
and the backup subpage.

Change-Id: I78c87f38eb615379d39c89b43a016ed2ffb98695
2020-11-13 22:29:36 +01:00
Chirayu Desai
0ebdabef3c Update for Q setup library changes
setupwizardlib,setupnavigationbar -> setupcompat,setupdesign

Change-Id: I8bf75028984dbf9fc2341990e93bd15ca0ad2af8
2019-10-04 08:51:08 +02: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