Cache proxied apps for even better performance

This commit is contained in:
Mygod
2015-12-05 22:07:25 +08:00
parent dd4206613f
commit c6a7560bae
5 changed files with 58 additions and 58 deletions
@@ -0,0 +1,11 @@
package com.github.shadowsocks
import android.content.{Intent, Context, BroadcastReceiver}
/**
* @author Mygod
*/
class AppManagerReceiver extends BroadcastReceiver {
override def onReceive(context: Context, intent: Intent) = if (intent.getAction != Intent.ACTION_PACKAGE_REMOVED ||
!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) AppManager.cachedApps = null
}