Commit Graph

432 Commits

Author SHA1 Message Date
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
Bruno Martins
92f16dc6ad LocationSettingsActivity: Account for deprecated location modes
LOCATION_MODE_HIGH_ACCURACY, LOCATION_MODE_SENSORS_ONLY and
LOCATION_MODE_BATTERY_SAVING are deprecated.

Take one further step and refactor the entire logic to call
LocationManager#setLocationEnabledForUser(boolean, int) instead
of setting location mode and LocationManager#isLocationEnabled()
to check if location is enabled.

Change-Id: Ibe1930902f6bfff99eb2c2d852ab600620e25f08
2020-04-19 01:10:04 +01:00
Michael Bestas
011b5e951a Automatic translation import
Change-Id: Ie5abf327b893a763d2f67e3d3317879c4396ec42
2020-03-30 20:29:56 +03:00
Luca Stefani
999d40eb5e Fix build warning
* Missing positional annoation

Change-Id: Ieb167491f28f94fad6a6472eb5ef256b7f2f485b
2020-02-22 14:51:36 +01:00
Michael Bestas
231bcbde0c Automatic translation import
Change-Id: I2e49007812d3178db86123740a15613e73fdca98
2020-02-01 23:17:19 +02:00
Chirayu Desai
ec3e5ccaaa Account for PhoneMonitor API change
* Needed after:
84a90870aa

Change-Id: Ie6c28388f28b97af273f7c93fc6b5b56b518370a
2020-01-22 23:25:50 +02:00
Bruno Martins
b0f5aa9540 SuW: Remove PG bits
Change-Id: Ic7297e0dcf1c9b438171e5ebe688e83e5cb121e9
2019-11-04 22:17:14 +00:00
Chirayu Desai
d463bce3c5 Add new method from ICaptivePortal
Change-Id: I13a5b4b5e2269ac53fd78862defe1ef5edeb1994
2019-10-04 08:51:50 +02: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
Bruno Martins
dc49637898 SetupWizard: Migrate to androidx
Change-Id: Iade6aeca1338c1e543d09aff83f8cf39d7c78e22
2019-09-11 16:03:45 +01:00
Michael Bestas
30b301f1fe Automatic translation import
Change-Id: I0028aa949499e4da41c449d6e9845767ec998b41
2019-08-25 19:27:54 +03:00
Bruno Martins
8b4804d822 SetupWizard: Add tablet specific strings for secure lock screen
Change-Id: Ib09e48953e1ec9af136a96a3715b998083489dd0
2019-08-18 14:29:17 +01:00
Michael Bestas
3a90e81eb2 Automatic translation import
Change-Id: I8321525c67f420f0ad326993bc008260514d40b7
2019-08-04 16:24:30 +03:00
Michael Bestas
9a75b2bd0a Automatic translation import
Change-Id: I4a5fac85dcc331d00d08356ed3af8f9c8cf94da0
2019-06-19 21:21:11 +03:00
Rashed Abdel-Tawab
97b6bc3efe suw: Disable ScreenLockActivity if a secure lockscreen is already set
Currently, devices that have a fingerprint prompt to add a fingerprint and
lockscreen via FingerprintActivity. However, since ScreenLockActivity is
always active, we end up with a second prompt for screen lock security.

This adds a check to see if a secure lockscreen has already been set, and
if so, just skip ScreenLockActivity.

Change-Id: I877835e8fa8628c01c96ab9732146720c1234f31
2019-06-15 21:22:31 -07:00
Michael Bestas
a3c24ddbbc Automatic translation import
Change-Id: I2a1c97c7febd4d305d6e0cc2b8e498248a849b54
2019-06-08 18:58:36 +03:00