Commit 31fee38d by Sebastián Katzer

Optimize imports

parent e00467af
......@@ -23,7 +23,8 @@
package de.appplant.cordova.plugin.localnotification;
import de.appplant.cordova.plugin.notification.*;
import de.appplant.cordova.plugin.notification.Builder;
import de.appplant.cordova.plugin.notification.Notification;
import de.appplant.cordova.plugin.notification.TriggerReceiver;
/**
......
......@@ -23,8 +23,7 @@
package de.appplant.cordova.plugin.localnotification;
import java.util.ArrayList;
import java.util.List;
import android.os.Build;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaInterface;
......@@ -35,9 +34,11 @@ import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.os.Build;
import java.util.ArrayList;
import java.util.List;
import de.appplant.cordova.plugin.notification.*;
import de.appplant.cordova.plugin.notification.Manager;
import de.appplant.cordova.plugin.notification.Notification;
/**
* This plugin utilizes the Android AlarmManager in combination with local
......
......@@ -23,7 +23,8 @@
package de.appplant.cordova.plugin.localnotification;
import de.appplant.cordova.plugin.notification.*;
import de.appplant.cordova.plugin.notification.Builder;
import de.appplant.cordova.plugin.notification.Notification;
/**
* The alarm receiver is triggered when a scheduled alarm is fired. This class
......
......@@ -23,16 +23,6 @@
package de.appplant.cordova.plugin.notification;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import android.content.Context;
import android.content.res.AssetManager;
import android.content.res.Resources;
......@@ -43,6 +33,16 @@ import android.net.Uri;
import android.os.StrictMode;
import android.util.Log;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Util class to map unified asset URIs to native URIs. URIs like file:///
* map to absolute paths while file:// point relatively to the www folder
......@@ -60,7 +60,7 @@ class AssetUtil {
// Ref to the context passed through the constructor to access the
// resources and app directory.
private final Context context;
/**
* Constructor
*
......@@ -102,7 +102,7 @@ class AssetUtil {
/**
* The URI for a path.
*
*
* @param path
* The given path
*/
......@@ -120,15 +120,15 @@ class AssetUtil {
return Uri.EMPTY;
}
/**
* URI for a file.
*
*
* @param path
* Absolute path like file:///...
*
*
* @return
* URI pointing to the given path
*/
......@@ -146,10 +146,10 @@ class AssetUtil {
/**
* URI for an asset.
*
*
* @param path
* Asset path like file://...
*
*
* @return
* URI pointing to the given path
*/
......@@ -191,10 +191,10 @@ class AssetUtil {
/**
* The URI for a resource.
*
*
* @param path
* The given relative path
*
*
* @return
* URI pointing to the given path
*/
......@@ -240,7 +240,7 @@ class AssetUtil {
return Uri.EMPTY;
}
/**
* Uri from remote located content.
*
......@@ -286,11 +286,11 @@ class AssetUtil {
outStream.flush();
outStream.close();
return Uri.fromFile(file);
} catch (MalformedURLException e) {
Log.e("Asset", "Incorrect URL");
Log.e("Asset", "Incorrect URL");
e.printStackTrace();
} catch (FileNotFoundException e) {
Log.e("Asset", "Failed to create new File from HTTP Content");
......@@ -305,7 +305,7 @@ class AssetUtil {
/**
* Copy content from input stream into output stream.
*
*
* @param in
* The input stream
* @param out
......
......@@ -23,8 +23,6 @@
package de.appplant.cordova.plugin.notification;
import java.util.Random;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
......@@ -33,6 +31,8 @@ import android.support.v4.app.NotificationCompat;
import org.json.JSONObject;
import java.util.Random;
/**
* Builder class for local notifications. Build fully configured local
* notification specified by JSON object passed from JS side.
......
......@@ -23,8 +23,6 @@
package de.appplant.cordova.plugin.notification;
import static de.appplant.cordova.plugin.notification.Notification.PREF_KEY;
import android.app.NotificationManager;
import android.content.Context;
import android.content.SharedPreferences;
......@@ -34,12 +32,13 @@ import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static de.appplant.cordova.plugin.notification.Notification.PREF_KEY;
/**
* Central way to access all or single local notifications set by specific
* state like triggered or scheduled. Offers shortcut ways to schedule,
......
......@@ -23,16 +23,16 @@
package de.appplant.cordova.plugin.notification;
import java.util.Date;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.AlarmManager;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Date;
/**
* Wrapper around the JSON object passed through JS which contains all
* possible option values. Class provides simple readers and more advanced
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment