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
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 43d0881..cdf7291 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 The CyanogenMod Project
- Copyright (C) 2017,2019 The LineageOS Project
+ Copyright (C) 2017-2021 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -235,6 +235,17 @@
</intent-filter>
</activity>
+ <activity android:name=".DeviceSpecificActivity"
+ android:label="@string/activity_label_empty"
+ android:excludeFromRecents="true"
+ android:immersive="true"
+ android:windowSoftInputMode="stateAlwaysHidden">
+ <intent-filter>
+ <action android:name="org.lineageos.setupwizard.DEVICE_SPECIFIC"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ </intent-filter>
+ </activity>
+
<activity android:name=".LineageSettingsActivity"
android:label="@string/activity_label_empty"
android:excludeFromRecents="true"