* 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
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
* 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
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
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
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
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
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
This sets the partner customization flag to allow adding hooks
later if necessary.
Change-Id: Ie8dcb0f2eae8916ef00f812ea85661c020dce53b
(cherry picked from commit 68b11675e1)
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
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
The material_light theme causes gms to crash with "Error inflating
class TextView" when attempting to do a device to device restore in
google suw. This change allows it to use the default glif_light.
Also removed the "Partner SUW Strings" comment, as the theme_type
was the only one.
Change-Id: I287f201799aba81c19869000e3aadb47ef67299b
The google suw flow has changed a little bit and added some new flow
choices in Pie, so our scripts need to be updated to match it. This
fixes the restore choice screen being shown twice.
Also reorganized the order of the wizard action results to move the
resultcode from the beginning to the end. This is a noop change that's
just to bring it inline with google's suw scripts.
Change-Id: Ia3ac9d1fdae62132c377e8ac2f767a795790d092
Google's suw handles the LOAD and NEXT actions, so this creates
duplicate tasks and crashes google suw when finish() is attempted.
Change-Id: Ifdbd9365fba7f299dc041e42ae27a91da071aa99
* Check if the value for the setting is already applied and do not
attempt to write it again. During the testing of SuW it was found out
that there can be an edgecase where softkeys don't show up neither
hardware keys work, even though the setting is applied (judging
by the status of the KeyDisabler switch).
Change-Id: I902f26fe131e508974116f7607fd0b88921395d9