Commit Graph

640 Commits

Author SHA1 Message Date
LineageOS Infra
ffa77d88a0 Automatic translation import
Change-Id: I16393162e7993f8b33741921675a72ef99ad51f2
2025-05-01 16:33:26 +00:00
LineageOS Infra
d2781869ea Automatic translation import
Change-Id: If27f457717647152a797316ed5ac7486449e1964
2025-04-15 13:55:31 +00:00
LineageOS Infra
1813dd7ac7 Automatic translation import
Change-Id: I7c20858068c3943071c3e35c9aac00ba2f9df0ef
2025-04-07 16:25:35 +00:00
Tommy Webb
bd87362c56 FinishActivity: Also hide Back button
At the point of no return, also hide the Back button, not just Next.

Change-Id: Ic7b2bf443306b49d7771eaf69e6fdede3fb41fa9
2025-03-28 07:59:12 +00:00
Tommy Webb
6d0cc50670 FinishActivity: Don't crash if exit animation fails somehow
Change-Id: Iaf15de9db82e625ecbbf1cb63d2e9f93b8c1625f
2025-03-28 07:59:12 +00:00
Tommy Webb
3a5b46f9a0 FinishActivity: Track state of finish process
* Keep track of the state of the finish process to ensure things happen
  when expected and as expected. Helps with debugging.
* A little refactoring and additional comments.

Change-Id: Ia9a70cb2148c9870ccffc15f1de3dae927b2710d
2025-03-28 07:59:12 +00:00
LuK1337
94eec15634 SetupWizard: Set FEATURE_KEY_DISABLE too
Change-Id: I44e2dc6958c949a489d1a4a4d458cc0b728d5db6
2025-03-27 23:53:16 +08:00
Michael Bestas
01e4669a68 SetupWizard: Cleanup imports
find . -name "*.java" | xargs java -jar \
~/bin/google-java-format-1.25.2-all-deps.jar \
--aosp --fix-imports-only --replace

Change-Id: I1cb284de8f9c7de6c12ddabc826f8371e23d90cf
2025-03-26 11:17:27 +02:00
Michael Bestas
81353f65bc SetupWizard: Remove 2 button nav leftovers
Change-Id: I1883a6936b1a17917d1655d15b6c5bf04492a30c
2025-03-25 19:44:28 +02:00
LuK1337
78e7d4e6d0 Revert "Hide navigation hint checkbox when taskbar is enabled"
This reverts commit a5ba5dfaad.

Change-Id: I567fb5dfaa8d937892b9333dd518ce30a9a4949b
2025-03-24 15:17:14 +01:00
LineageOS Infra
eeb98bae9a Automatic translation import
Change-Id: If0bf9c9bb4ee9119a9ddc99c7a218f50e42bd42e
2025-02-15 15:47:28 +00:00
LineageOS Infra
760cfc59f0 Automatic translation import
Change-Id: Ic1b44daae7280784f770d8e9761717066f372614
2025-02-01 14:28:43 +00:00
LineageOS Infra
160ddc5873 Automatic translation import
Change-Id: Ib6a17c152f88cc1a83378259203482b887b9fc47
2025-01-15 20:54:56 +00:00
LineageOS Infra
28bd97d717 Automatic translation import
Change-Id: I474ffc424805aaf82f888ef903acd27d6cf0e97f
2024-12-16 06:30:09 +00:00
LineageOS Infra
205d2e036d Automatic translation import
Change-Id: I2ca0e23f622463523cf8b4e62ad27b6658997565
2024-12-02 02:54:27 +00:00
LineageOS Infra
b5133a44b5 Automatic translation import
Change-Id: I471bc1d0814aac9d0134c07a8a93a36cef6c1701
2024-11-16 06:48:18 +00:00
Michael W
6a8260b7c3 Remove values-lu
* Luxemburgish (lb) was accidentially mapped to "lu" for all of the
  non-AOSP projects.
* Since the next sync will download "lb" now, just remove "lu"

Change-Id: I1911df5cec057fd61126109ecacd70f198d0decf
2024-11-01 05:22:00 +02:00
LineageOS Infra
875c71cac3 Automatic translation import
Change-Id: Iab9c2f0c4aeff64e5eb8b08c8f16ef613d46d233
2024-10-31 17:49:44 +00:00
Alexander Koskovich
cae1abc267 SetupWizard: Enable dynamic color in GMS SetupWizard
Change-Id: Ia83d664023f5423f8247df34f544fe3f5438aa3e
2024-10-27 18:29:02 -04:00
Alexander Koskovich
da50cca4ce SetupWizard: Do not advertise Google Pay during setup
This is dependent on working integrity which is broken a lot of
the time, which is bad UX.

Change-Id: I0acf86ad8c08e915ad30877113965fbda6fe7467
2024-10-27 18:26:26 -04:00
Michael Bestas
139ed346e5 SetupWizard: Replace deprecated .reuse/dep5 with REUSE.toml
Test: pipx run reuse lint
Change-Id: Ifa0218ebb1330f2093dc367b52dc9e6a9f7b667a
2024-10-22 03:24:10 +03:00
LineageOS Infra
b7e8fd69f5 Automatic translation import
Change-Id: Ia9264dbdfe2602974c79e7ec98303fb38a08fee8
2024-10-16 21:27:46 +00:00
LineageOS Infra
75fd9fdb15 Automatic translation import
Change-Id: I15ba41138f21eb1907ca41343c910d696c00f3a3
2024-09-15 16:02:36 +00:00
Tommy Webb
0d3264d67f Fix ActivityResultLauncher lifecycle issues
If an activity is re-created, its result launchers that were registered
during instantiation are not available, so register those in onCreate
instead and unregister in onDestroy.

Change-Id: I7fd2a61ddbb056e0bf761b6918dc371db8ddbe33
2024-08-15 19:36:27 +03:00
Tommy Webb
4ed687c330 Workaround for back press through SIM Missing page
Make sure the prior activity (NetworkSetupActivity) knows that back was
pressed - as it must have been - when the user returns to it. Otherwise,
the wizard gets stuck on a "Just a sec" page forever.

Change-Id: I35f7a78c4decc13b9dee267bfaf195fb2241395d
2024-08-15 19:31:17 +03:00
Tommy Webb
8dad806a61 fixup! Rework activity launching and result handling
SubBaseActivity cares if back was pressed, not what the result code was.

Change-Id: If8cc19de6a6300c906228dbe99fc7fdf4e6b47c8
2024-08-15 19:29:35 +03:00
Tommy Webb
a4dd79f78d Adapt FinishActivity and outro for 14 QPR3
windowShowWallpaper behaves unexpectedly with transitions as of 14 QPR3.
As a result, the changes of "Revamp outro animation" were causing the
transition into the final page of the wizard to instantaneously have
a transparent wallpaper background, even before the animation finished.
This was jarring and odd, so now we use a regular theme until we are
ready to start our animation, at which point we recreate the activity
with the EdgeToEdgeWallpaperBackground (windowShowWallpaper) theme
before running the animation.

Change-Id: Ib19918d7d2a615aff44a48066b17ec9d2f04bac6
2024-07-31 20:51:30 +00:00
Tommy Webb
1d833219d8 SimMissingActivity is a regular SUW activity
Remove unused subactivity code and change to BaseSetupWizardActivity.

Change-Id: I50492f6d533543ae1ea46965b299a20ee44d0ca0
2024-07-25 19:25:41 +00:00
Tommy Webb
5948809bb4 Rework activity launching and result handling
* Rename or eliminate methods that could be easily confused for AOSP
  methods due to the reuse of AOSP names.
* Separate out the handling of results for subactivites and for the
  next action (intent), each using its own activity launcher and
  callback.
* Add a StartDecoratedActivityForResult contract to ease the launching
  of activities without the caller needing to add SUW-related extras.

Change-Id: Iffaba4c51b2c90c42b8b243874a62cdea9e0c793
2024-07-25 19:25:37 +00:00
Tommy Webb
635998c42d Refactor activity decorations and transitions
Reuse some code, and prevent the need to have to apply transitions
in multiple places.

Change-Id: I5319e49136d6d05de3eb03eff8dae0f3560e509a
2024-07-25 19:25:02 +00:00
Oliver Scott
3ba6626aab Remove unused function disableComponentsForMissingFeatures
Change-Id: Ib4b3099f37ed089809ba5d06dec235512bfe10e3
2024-07-20 11:49:44 +01:00
Oliver Scott
ddd0c8d7ac Check bluetooth status when relevant
Change-Id: Ie67a28cb89bf68ef0d57f36ee2d875cfc44e29cc
2024-07-20 11:49:29 +01:00
Oliver Scott
5584669c2e Check wifi/telephony/ethernet status when relevant
Change-Id: I5d34b0fc5059f2b2eaceaf459180002b525c4249
2024-07-20 11:48:11 +01:00
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
ab9a5ea27b Replace actionId and scriptUri extras with wizardBundle
https://cs.android.com/android/platform/superproject/main/+/main:frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/util/WizardManagerHelperTest.java;l=307;drc=93689222672ea2da9e3948785ab3c8d53d771c84

Change-Id: I084fee70a4fcd4617d788eb6e609e0d00c9ee103
2024-07-19 14:50:22 -04:00
LineageOS Infra
0e299f2129 Automatic translation import
Change-Id: I2347bd4d8e1e1ef040ee9417b6f98589d2f8f5a1
2024-07-01 18:54:41 +00:00
LineageOS Infra
d7dd5b0d0f Automatic translation import
Change-Id: Iea9fb9a5ce56189f03575f3cb0ed7827037b50aa
2024-06-01 22:14:27 +00:00
Oliver Scott
a1a6530ddd Fix restore page back navigation
Issue: calyxos#2284
Change-Id: I72249924d4b0c56b6bcceea1c5a4adbfa5c54fb2
2024-05-18 12:27:11 +03:00
Tommy Webb
ac47a02936 LocaleActivity: Handle unexpected MCC strings
Don't crash if MCC string is empty or not a number.

Issue: calyxos#2269
Change-Id: I5efee6e826600869efe133a8a097d9d24337602c
2024-05-18 12:27:11 +03:00
Oliver Scott
1bbf009729 Keep activities in recents
When exiting, all activities are finished and therefore no longer in recents. For the work profile, we want users to be able to come back to it

Issue: calyxos#2020
Change-Id: Id236c193e5822568dc445ea561fe18a4664e73cc
2024-05-18 12:27:11 +03: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
Oliver Scott
8792be5031 Apply proper backward and forward transitions
Currently, we hardcode TRANSITION_FADE_THROUGH because it is the default
as of now and it is also what Settings uses. It appears to match stock's
transition animations, too.

Issue: calyxos#1743
Change-Id: Iffe19e5b4fd552aab6c5a93bc3788a27b5eba00b
2024-05-18 12:27:11 +03:00
Bruno Martins
8b77e3eea4 SuW: Use the same Welcome activity layout for ATV and tablets
This way platlogo and welcome text is centered and looks
better on tablets.

Change-Id: I77c161a6cde289eb91875d8b6fb26c53f9cffb98
2024-05-16 20:01:52 +00:00
LineageOS Infra
c09271bb1b Automatic translation import
Change-Id: I0c765dcbf6db61dfb87d9f64f2bfdbfacf98abc7
2024-05-15 15:50:37 +00:00
LineageOS Infra
62e48dcaa0 Automatic translation import
Change-Id: Ieee700dd804254b9ed7e7178e3bb0c24b51af49a
2024-05-01 16:33:50 +00:00
Aaron Kling
3ed0a33ee7 Don't start wizard flow on atv when gms is present
This matches the behaviour prior to the Lineage suw revamp on 21.
Setupwraith hooks things in a completely different manner to the mobile
gms suw. The Lineage suw should not run at all when atv gms is present,
but the apk still needs to be available should the tvsetup intent hooks
get implemented.

Change-Id: Ic4943e8fd55d30fbd2856dc5eadc5a0ce6282f29
2024-04-27 15:59:13 +01: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