Commit Graph

625 Commits

Author SHA1 Message Date
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
Bruno Martins
5b49c1fa4c BaseSetupWizardActivity: Handle NPE when WiFi service is unavailable
Do not let SetupWizard crash in case the WiFi service is not available,
which can happen in case of devkits without built-in WiFi support.

Change-Id: Iba72e941b5e4995e865c70cb6c2b6be9a721addc
2024-04-27 14:21:05 +01:00
LineageOS Infra
6665ca7958 Automatic translation import
Change-Id: I994ed355617fc673c9872cdff3584a9b0684f57e
2024-04-15 12:55:29 +00:00
Oliver Scott
d9d285909a Fix system locale
System locale update API isn't deprecated. Call was erroneously replaced in https://review.lineageos.org/c/LineageOS/android_packages_apps_SetupWizard/+/379324/12/src/org/lineageos/setupwizard/LocaleActivity.java#b65

Issue: calyxos#2265
Change-Id: Ic4b4e7ce70f0eb9106401da95feabc576954e381
2024-04-09 19:45:23 +00:00
LineageOS Infra
10343a5e1f Automatic translation import
Change-Id: Ifd4ac5636c1a8d87e6ca8d365f64e1fab11d2b1f
2024-03-27 09:21:50 +00:00
Michael Bestas
79e9f1cdbd Fix QPR2 build
Change-Id: I03bdfacf5d8432ac9e4c66723ecacbf5a4464154
2024-03-20 19:06:16 +00:00
Timi Rautamäki
935ba6902d SUW: center welcome text on TV
Change-Id: I4c984d78137b65e29f60769d3c5a368568c7e79c
2024-03-05 15:20:42 -05:00
Aaron Kling
6cb268b222 BluetoothSetupActivity: ignore cancel results
Change-Id: I9e7f62b2a11d8b2af0c075b0151a29c4485e8931
2024-03-05 15:19:43 -05:00
Aaron Kling
a09594c415 WelcomeActivity: do nothing on back press
Devices with a hardware back button, such as atv remotes, can press back
on the welcome screen and trigger a transition to a waiting screen then
back to welcome. This should not be allowed.

Change-Id: I2273d0d74fb1ef018074d4facc8e3793e7470f6f
2024-03-05 15:14:58 -05:00
razorloves
112f926f77 fixup! Remove unused colors
Change-Id: Id28f03acaa50663748617d94bc1c390424348e60
2024-03-01 21:48:40 -06:00
Chirayu Desai
2b605d17bb welcome: Use a separate string for work profile start
* Intentionally not touching this for secondary users
  so that it doesn't look different from the main user.
* We don't explicitly support that, but let's also not
  go out of our way to break something like this.

Change-Id: I374b45feb7d6dd17e5d03d0f7fbaf6d9e22f1d55
2024-03-02 03:39:05 +02:00
Michael Bestas
db86c22c41 Remove unused View
Change-Id: I2625cd9a3d59afded84621f0ceea4984d755eb5a
2024-03-02 03:39:05 +02:00
Michael Bestas
b69c30c4ed Remove unused colors
Change-Id: I91f16a43c935d8c6d52e6d3ff665145df1466a88
2024-03-02 03:39:05 +02: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
95cf350cc0 SetupWizard: Update backup page description
Seedvault backups can be restored from any OS that includes Seedvault,
they are not restricted to LineageOS.

Change-Id: Ie3d896d0377c8d2fe47558ae6a2bb54a0864498c
2024-02-26 00:25:44 +02:00