Fix package change broadcast receiving

This commit is contained in:
Ciaran Gultnieks 2012-10-19 08:39:56 +01:00
parent 1a9f86dc9d
commit a456a9b8d9
2 changed files with 3 additions and 2 deletions

View File

@ -76,14 +76,13 @@
<category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.HOME" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver android:name="PackageReceiver" > <receiver android:name="PackageReceiver" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" /> <action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_UPGRADED" /> <action android:name="android.intent.action.PACKAGE_UPGRADED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" /> <action android:name="android.intent.action.PACKAGE_REMOVED" />
<category android:name="android.intent.category.HOME" /> <data android:scheme="package" />
</intent-filter> </intent-filter>
</receiver> </receiver>

View File

@ -21,11 +21,13 @@ package org.fdroid.fdroid;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.util.Log;
public class PackageReceiver extends BroadcastReceiver { public class PackageReceiver extends BroadcastReceiver {
@Override @Override
public void onReceive(Context ctx, Intent intent) { public void onReceive(Context ctx, Intent intent) {
Log.d("FDroid", "PackageReciever invalidating apps");
((FDroidApp) ctx.getApplicationContext()).invalidateApps(); ((FDroidApp) ctx.getApplicationContext()).invalidateApps();
} }