Ignore intents other than ACTION_INSTALL

This commit is contained in:
Peter Serwylo 2016-05-12 12:11:07 +10:00
parent 4f6910fca7
commit ef75f30701

View File

@ -15,6 +15,7 @@ import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import android.support.v4.content.LocalBroadcastManager;
import android.text.TextUtils;
import android.util.Log;
import org.fdroid.fdroid.AppDetails;
import org.fdroid.fdroid.R;
@ -132,6 +133,12 @@ public class InstallManagerService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Utils.debugLog(TAG, "onStartCommand " + intent);
if (!ACTION_INSTALL.equals(intent.getAction())) {
Log.i(TAG, "Ignoring " + intent + " as it is not an " + ACTION_INSTALL + " intent");
return START_NOT_STICKY;
}
String urlString = intent.getDataString();
Apk apk = ACTIVE_APKS.get(urlString);