Commit Graph

17 Commits

Author SHA1 Message Date
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
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
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
Aaron Kling
6cb268b222 BluetoothSetupActivity: ignore cancel results
Change-Id: I9e7f62b2a11d8b2af0c075b0151a29c4485e8931
2024-03-05 15:19:43 -05: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
Jake Florence
9e8aa8c9ff SetupWizard: skip missing subactivities
when a subactivity is missing the setup wizard crashes and puts the user back to the previous page

this patch allows the user to continue as if they skipped

Change-Id: Icb4937b1751d9612c32cb3012f9fc05de2640891
2024-02-26 00:19:23 +02:00
Oliver Scott
f58c0f4b83 Update deprecated code
Change-Id: I1b128b0f8b654c5c76464c12145d927ec10da26e
2024-02-25 23:45:38 +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
Timi Rautamäki
5e2f7f2dfe SUW: use setupdesign layout & theming
Change-Id: I4841b701a8952035bd633d73368e80075d17e42a
2021-09-03 11:24:25 +00:00
Alessandro Astone
35eda3a50b SetupWizard: Distinguish interactive and wrapper subactivities
We were using the SubBaseActivity class for two different kind of
activities:
 (1) "Wrapper" activities, where we define an activity that on
     start simply launches another one
 (2) "Interactive" activities, where the user has to manually
     trigger the start of the subactivity, or skip the step.

When the subactivity ends, only in case (1) we want to finish our
activity as well, since we wouldn't have anything to show.

Change-Id: I1a3ae51f6146ac32b5e7542d9a18b0b032efe144
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 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
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