X-Git-Url: http://git.joshuawise.com/dumload.git/blobdiff_plain/0763e16da0e84b68e675fbf61342dd1e47755f47..7d9c89759bf8da6e82a57ef43e6471c5b5b794f1:/src/com/joshuawise/dumload/NotifSlave.java?ds=inline diff --git a/src/com/joshuawise/dumload/NotifSlave.java b/src/com/joshuawise/dumload/NotifSlave.java index 21af25e..15d1ad1 100644 --- a/src/com/joshuawise/dumload/NotifSlave.java +++ b/src/com/joshuawise/dumload/NotifSlave.java @@ -1,23 +1,18 @@ package com.joshuawise.dumload; -import java.io.InputStream; - import android.app.Activity; -import android.app.Service; +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.DialogInterface; import android.content.Intent; -import android.net.Uri; import android.os.Bundle; -import android.os.IBinder; -import android.widget.TextView; -import android.widget.Button; +import android.os.Message; +import android.os.Messenger; +import android.util.Log; import android.view.View; +import android.widget.Button; +import android.widget.TextView; import android.widget.Toast; -import android.util.Log; -import android.os.Messenger; -import android.os.Message; -import android.app.AlertDialog; -import android.app.Dialog; -import android.content.DialogInterface; public class NotifSlave extends Activity { /** Called when the activity is first created. */ @@ -62,7 +57,12 @@ public class NotifSlave extends Activity { final Messenger m = (Messenger)i.getParcelableExtra("com.joshuawise.dumload.returnmessenger"); String reqtype = i.getStringExtra("com.joshuawise.dumload.reqtype"); String prompt = i.getStringExtra("com.joshuawise.dumload.prompt"); - /* If any of these were null, we'll just take the exception. */ + + if (prompt == null || reqtype == null || m == null) /* i.e., we got called by a dummy notification */ + { + this.finish(); + return; + } if (reqtype.equals("yesno")) { AlertDialog.Builder builder = new AlertDialog.Builder(this);