Commit Graph

647 Commits

Author SHA1 Message Date
Michael Bestas
ade1361e3b Remove whitespace
Change-Id: Iaf9a56b1f8646bff8eb505050f15c24626acf47d
2021-09-03 11:58:29 +00:00
Michael Bestas
8723edec03 Ensure all files have a newline at the end
Change-Id: I55990ff367addbc24b34abe8da7fa6d52604a0d2
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
Timi Rautamäki
ab4f1231ae SUW: rearrange welcome activity
Hide navigation bar and relocate buttons

Change-Id: I0202c18dbcf08bac31707b7b43f10b59d88be7f2
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
Timi Rautamäki
ab4d6d383f SUW: use GLIF v3 light -theme
Change-Id: I3684279ad87c82b85c93267e959e9faa2dabfdc3
2021-09-03 11:24:25 +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
Daniel Micay
d186af21f8 Replace LOCAL_MAC_ADDRESS with NETWORK_SETTINGS
ConnectivityManager.getCaptivePortalServerUrl now requires
NETWORK_SETTINGS instead of LOCAL_MAC_ADDRESS.

Change-Id: Idd9b7b683a48e49d97fca90bb62d81ee0629b672
2021-09-03 11:24:25 +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
Michael W
8dc3cf8f47 SetupWizard: Use SettingsLib for Timezones
* Currently we are storing a copy of timezones.xml ourselves and parsing
  it manually
* Use ZoneGetter from SettingsLib instead to get the list of TimeZones
* That way we have less code to maintain and updates to the list are easier
  as well
* Also simplify constructTimezoneAdapter -> we never sort by name

Change-Id: Ifd690ed28c6fbecaee895b4063137e86c059e314
2021-09-02 12:24:00 +00:00
Michael Bestas
d23252fbc2 Automatic translation import
Change-Id: I8cea787038231d0b77ed6108fd153178a0077897
2021-08-21 04:07:27 +03:00
Timi Rautamäki
c84c112f8b SetupWizard: LineageSettings: fix padding on summary
Change-Id: Id99e5999f0e97990d319fe252d075b5d1d21ab70
2021-06-13 22:07:39 +02:00
Timi Rautamäki
e278fd6c1a SetupWizard: LineageSettings: correct privacy policy link span
* Some languages don't have the ´Privacy policy´-text
   as the last word of the sentence.

Change-Id: I74e342c8d6bbb038db11538905a12c7fef5a84de
2021-06-13 22:06:59 +02:00
LineageOS Builder
bee667cfd3 Automatic translation import
Change-Id: I774d03f02870c2c2189a52213b990e6968f791cc
2021-05-01 15:56:37 +00:00
Luca Stefani
6b9de1c6ee SetupWizard: Move to system_ext
* This is where system _extensions_
  should live

Change-Id: I1fc0dbf73c63e92525c8837a19b8f750fab55271
2021-03-23 22:20:19 +01:00
Luca Stefani
c102a32744 SetupWizard: Convert to Android.bp
* This allows us to move it to system_ext
  that wasn't possible to .mk

Change-Id: I3fcdfd2566b8518a921e18a39c60e69beab4cf86
2021-03-23 22:20:19 +01:00
Michael W
29e77749c5 SetupWizard: Disable mobile data at least once
* Right now, the user has to set the toggle on and off to actually get
  the setting set to "off", since the underlying default value is "on"
* Make sure to send an "off" initially right at the beginning of SuW

Change-Id: Iec2fd05ea341351f3e6d4b195a1a385f9d88d4f7
2021-03-23 22:19:55 +01:00
Luca Stefani
bc224d5750 SetupWizard: Remove libphonenumber dep
* This is likely an artifact of the {cm,lineage}sdk
  transition that included this lib

* Now the lib is only included in a separate library
  to avoid unnecessary disk waste

Change-Id: Ib12acac080f4a2271a118470951a06cd014a91aa
2021-03-17 23:18:20 +01:00
Michael Bestas
f1b90986a8 Automatic translation import
Change-Id: I1d89185ee1a43a2894bf9f42d06dda43c808e5af
2021-02-28 02:40:42 +02:00
Michael W
2b90a7f7d8 SetupWizard: Add device specific hook page
* Add a new activity DeviceSpecificActivity which acts as a jumppad
  into an activity using "org.lineageos.settings.device.SUW_SETTINGS"
  * Handles navigation (back / next)
  * Handles cases where the script contains the page but SUW_SETTINGS
    don't exist
* In order to use this, devices need to provide an activity that:
  * at least shows a back and continue button
  * returns Activity.RESULT_OK and Activity.RESULT_CANCELLED for the
    buttons
  * does whatever you need to specifically have done in setup!

Change-Id: I4956c8f5f1ad13b9adf2e5604fd4a728e261336b
2021-02-04 15:04:32 +01:00
Bruno Martins
da735e0ab3 SuW: Avoid showing exceptions if packages are not installed
Just check if the package is installed before trying to disable it.

Test: Observe that the following exception is not longer shown.

  Exception occurred while executing 'disable':
  java.lang.IllegalArgumentException: Unknown package: com.android.provision
	at com.android.server.pm.PackageManagerService.setEnabledSetting(PackageManagerService.java:21052)
	at com.android.server.pm.PackageManagerService.setApplicationEnabledSetting(PackageManagerService.java:20910)
	at com.android.server.pm.PackageManagerShellCommand.runSetEnabledSetting(PackageManagerShellCommand.java:2151)
	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:231)
	at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
	at android.os.ShellCommand.exec(ShellCommand.java:44)
	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21736)
	at android.os.Binder.shellCommand(Binder.java:929)
	at android.os.Binder.onTransact(Binder.java:813)
	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4621)
	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4361)
	at android.os.Binder.execTransactInternal(Binder.java:1159)
	at android.os.Binder.execTransact(Binder.java:1123)

Change-Id: I646f2803f95817d7d9f2b1dfe54a9c1f8c9988e7
2021-01-31 21:31:03 +00:00
Bruno Martins
21ae606b71 UpdateRecoveryActivity: Don't force recovery update by default
Change-Id: I0992bd257a3acc7ca6872744478121ba7f001ea0
2021-01-10 14:40:54 +00:00
Timi
e90cf31f27 SetupWizard: update recovery after setup
* Instead of doing it when going to next page

Change-Id: I65c5ca1bab1d79c8fd5906b36a02fd74547827ac
2020-12-31 18:18:24 +01:00
Timi
459dec482c SetupWizard: center text next to checkbox in recovery update -activity
Change-Id: I121c5ea0c39eef2d7eb87950432e5ec64b8edfa1
Signed-off-by: Timi <timi.rautamaki@gmail.com>
2020-12-13 15:06:31 +01:00
Alessandro Astone
d93e0e1bbd SetupWizard: Add activity to toggle recovery updates
Change-Id: I8157d812c1b616b10dd4204d12cc8fb21d4eee50
2020-11-19 01:26:28 +02:00
Michael Bestas
7423d88cd0 SetupWizard: Add seedvault restore page in GMS flow
Change-Id: I1ce86864b4a8d0477cd2db77a3820583e24c758a
2020-11-18 22:40:56 +01:00
Chirayu Desai
c61ad50de9 translations: Rename fingerprint setup string to biometric setup
For: I9ddd7b46548c8107239fdec457bbaae6b12876e6
Change-Id: Ic315f4ccf97edda45de000f41ba4cb456c249d29
2020-11-13 22:29:36 +01: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
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
Christian Oder
b05350b920 LSW: Fix backtrack to LineageSettings fragment
The current handling results in the followup activity to ignore it for
backtracks which means when going from Location -> LineageSettings -> Fingerprint
the move backwards from Fingerprint leads up in Location and not the expected
LineageSettings.

The custom handling is necessary to process the result in the Google SUW,
so it has been fixed to properly work now.

Change-Id: Ifae5dc8fda07b61bd0271da1d1589059ab40cd39
2020-11-13 22:29:36 +01:00
Arne Coucheron
48f460889b Remove save/restore of button brightness timeouts
This is not really needed.

Change-Id: I826c31f484d745d6176105856fa9ddeb66673f1f
2020-11-12 01:08:35 +01:00
razorloves
64dd898409 suw: Update wizard scripts for R
The google suw flow has changed a little bit in Android 11, so
this change syncs our scripts to google's so that they match.

Change-Id: I59e9643fad8c48c22a090a29e621e2761ef7e0d0
2020-11-03 02:31:55 +02:00
Renlord
4027defd55 Update api usage for android 11
Change-Id: I50ff347c2c75afa43f462ce57329090ecf40a2dd
2020-11-03 02:31:55 +02:00
Daniel Micay
c2b6a18b9b Use system captive portal URL
The captive_portal_server setting is deprecated, and hard-wiring it as a
string is also probably a bad idea. Since it's deprecated, this code
will miss an override via the modern settings. This also hard-wired a
slightly different fallback than ConnectivityService, and simply
adjusting it here wouldn't stop that from happening again. It's best to
just use the privileged API for obtaining the proper value. The choice
of LOCAL_MAC_ADDRESS as the permission for this is a bit strange, but
that's what is required, probably because a better fit didn't exist.

Change-Id: I78d07d5ff96598cebf6d4ed032fe1516791836fe
2020-11-03 02:31:55 +02:00
LineageOS Builder
f1bfe7e2de Automatic translation import
Change-Id: I53493956b430e361439075d55bb1d73cd072ed9e
2020-11-01 11:28:17 +00:00
Torsten Grote
fc026fcadc Add an activity for launching a restore from backup
Change-Id: Ibd73f8549bb3ec9e829ad9082399dbbf0a6ca4f5
2020-10-26 18:20:34 +02:00
LineageOS Builder
a96ccce7b3 Automatic translation import
Change-Id: Ic89eb7cb05f0963234df509cf999a0532d92ecc7
2020-09-20 10:11:21 +00:00
LineageOS Builder
d63ae5e692 Automatic translation import
Change-Id: Ib26dafca8e3eed3fb88a8a5f177a2c73446b184c
2020-09-12 02:53:19 +00: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
Michael Bestas
0523274cc8 Automatic translation import
Change-Id: I71a33469e9df5ff49f187536d986546571479c22
2020-06-22 00:57:02 +03:00
Chirayu Desai
297b16f4bc tests: Add privapp permissions whitelist
Change-Id: I080784198bdc726e49ed8d2c3fd9874220548b0f
2020-06-01 20:37:44 +03:00
Michael Bestas
dd5da5e0e2 Automatic translation import
Change-Id: I93568bd54e0117dcf5d6cb5ba64c01a415b67b6f
2020-05-23 18:21:37 +03:00
Michael Bestas
7e295e98ed SetupWizard: Add privapp permissions xml
Change-Id: Ib4d54f12a40eda3a4d2f8811d804ac98f82b8850
2020-05-06 20:43:06 +03:00
Michael Bestas
222d58e56e Automatic translation import
Change-Id: I5d49cc8b2a645023521e236c5dd383ce79a613b4
2020-04-23 16:49:12 +03:00