1:系統(tǒng)預(yù)制App的提權(quán)問題
final ProcessRecord addAppLocked(ApplicationInfo info, boolean isolated,
String abiOverride) {
ProcessRecord app;
...
if ((info.flags & PERSISTENT_MASK) == PERSISTENT_MASK) {
app.persistent = true;
app.maxAdj = ProcessList.PERSISTENT_PROC_ADJ;
}
return app;
}
預(yù)制的App只要在manifest中添加一個persistent屬性就可以了。
<application
android:allowBackup=“true"
android:icon="@mipmap/ic_launcher”
android:persistent=“true"
android:label="@string/app_name”
android:roundIcon="@mipmap/ic_launcher_round”
android:supportsRtl=“true"
android:theme="@style/AppTheme">