]> Joshua Wise's Git repositories - dumload.git/blobdiff - src/com/joshuawise/dumload/NotifSlave.java
GPLv3
[dumload.git] / src / com / joshuawise / dumload / NotifSlave.java
index 21af25ec5dab8af991286b04fe72b5df3fde7c4f..ce6bc6f2356a942f6aec58d90d6f8b43ce840e82 100644 (file)
@@ -1,3 +1,19 @@
+/* NotifSlave.java
+ * Notification interface glue for Dumload.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License, version 3, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 package com.joshuawise.dumload;
 
 import java.io.InputStream;
@@ -62,7 +78,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);
This page took 0.02374 seconds and 4 git commands to generate.