Set higher priority for ADD_DEVICE_ADMIN intent

Settings should set android:priority of the intent-filter > 1
so that regular apps can't provide an alternative.

Test: Rebuilt apk
Fix: 197960672
Change-Id: Ic12db4fa5e6a5f803930deba2a81254c375403df
This commit is contained in:
Tsung-Mao Fang
2022-03-16 18:03:40 +08:00
parent b65ba00903
commit 56e9b25b5f

View File

@@ -1846,7 +1846,7 @@
android:exported="true" android:exported="true"
android:clearTaskOnLaunch="true" android:clearTaskOnLaunch="true"
android:theme="@style/Theme.Settings.NoActionBar"> android:theme="@style/Theme.Settings.NoActionBar">
<intent-filter> <intent-filter android:priority="1000">
<action android:name="android.app.action.ADD_DEVICE_ADMIN" /> <action android:name="android.app.action.ADD_DEVICE_ADMIN" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>