DeviceOwnerReceiver: Add minimal support for device owner API
SessionInstaller can commit silent installs if the app is device owner. Implemented on request of users. This still needs user to set the app as device owner manually using ADB (only possible if the device has no accounts setup yet). Co-authored-by: Syuugo <pub@s1204.me> Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -58,6 +58,10 @@
|
||||
android:name="android.hardware.gamepad"
|
||||
android:required="false"/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.software.device_admin"
|
||||
android:required="false" />
|
||||
|
||||
<application
|
||||
android:name=".AuroraApp"
|
||||
android:allowBackup="true"
|
||||
@@ -142,5 +146,18 @@
|
||||
<receiver
|
||||
android:name=".data.receiver.InstallerStatusReceiver"
|
||||
android:exported="false" />
|
||||
|
||||
<!-- SessionInstaller (as device owner) -->
|
||||
<receiver
|
||||
android:name=".data.receiver.DeviceOwnerReceiver"
|
||||
android:permission="android.permission.BIND_DEVICE_ADMIN"
|
||||
android:exported="true">
|
||||
<meta-data
|
||||
android:name="android.app.device_admin"
|
||||
android:resource="@xml/device_owner_receiver" />
|
||||
<intent-filter>
|
||||
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
Reference in New Issue
Block a user