Use PACKAGE_FULLY_REMOVED for magiskhide

Remove from magiskhide only if pkg fully deleted
This commit is contained in:
vvb2060 2021-09-02 17:15:25 +08:00 committed by GitHub
parent 933f020b3c
commit dcc1fd3ee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View File

@ -54,6 +54,7 @@
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
<data android:scheme="package" />
</intent-filter>

View File

@ -40,6 +40,8 @@ open class Receiver : BaseReceiver() {
}
Intent.ACTION_UID_REMOVED -> {
getUid(intent)?.let { rmPolicy(it) }
}
Intent.ACTION_PACKAGE_FULLY_REMOVED -> {
getPkg(intent)?.let { Shell.su("magiskhide rm $it").submit() }
}
Intent.ACTION_LOCALE_CHANGED -> Shortcuts.setupDynamic(context)

View File

@ -54,6 +54,7 @@
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
<data android:scheme="package" />
</intent-filter>