Quellcode durchsuchen

Optimized imports

Sebastián Katzer vor 10 Jahren
Ursprung
Commit
52054f5d0c

+ 0 - 1
src/android/LocalNotification.java

@@ -36,7 +36,6 @@ import org.json.JSONObject;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 import de.appplant.cordova.plugin.notification.Manager;

+ 6 - 6
src/android/notification/Builder.java

@@ -157,14 +157,14 @@ public class Builder {
         if (clearReceiver == null)
             return;
 
-        Intent deleteIntent = new Intent(context, clearReceiver)
+        Intent intent = new Intent(context, clearReceiver)
                 .setAction(options.getIdStr())
                 .putExtra(Options.EXTRA, options.toString());
 
-        PendingIntent dpi = PendingIntent.getBroadcast(
-                context, 0, deleteIntent, PendingIntent.FLAG_UPDATE_CURRENT);
+        PendingIntent deleteIntent = PendingIntent.getBroadcast(
+                context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
 
-        builder.setDeleteIntent(dpi);
+        builder.setDeleteIntent(deleteIntent);
     }
 
     /**
@@ -183,10 +183,10 @@ public class Builder {
                 .putExtra(Options.EXTRA, options.toString())
                 .setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
 
-        int requestCode = new Random().nextInt();
+        int reqCode = new Random().nextInt();
 
         PendingIntent contentIntent = PendingIntent.getActivity(
-                context, requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT);
+                context, reqCode, intent, PendingIntent.FLAG_UPDATE_CURRENT);
 
         builder.setContentIntent(contentIntent);
     }

+ 0 - 1
src/android/notification/Manager.java

@@ -30,7 +30,6 @@ import android.content.SharedPreferences;
 import org.json.JSONException;
 import org.json.JSONObject;
 
-import java.lang.NumberFormatException;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;