ArtistGui icon indicating copy to clipboard operation
ArtistGui copied to clipboard

Only enable PackageUpdatedReceiver when at least one app marked as "keep instrumented"

Open partipan-dot opened this issue 7 years ago • 0 comments

The PackageUpdatedReceiver is declared in the AndroidManifest.xml and listens always for android.intent.action.PACKAGE_REPLACED. Using PackageManager.setComponentEnabledSetting()¹ we can enable the BroadcastReceiver only when at least one app is marked as "keep instrument" instead waking up ArtistGui at each app update.

¹ https://developer.android.com/reference/android/content/pm/PackageManager.html#setComponentEnabledSetting(android.content.ComponentName, int, int)

partipan-dot avatar Nov 05 '17 23:11 partipan-dot