diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 1871af7..484c033 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -20,7 +20,7 @@
-
+
@@ -77,6 +77,8 @@
- true
+ - @android:color/transparent
\ No newline at end of file
diff --git a/android/src/org/exobel/routerkeygen/AutoConnectManager.java b/android/src/org/exobel/routerkeygen/AutoConnectManager.java
index 86ae53e..f571e96 100644
--- a/android/src/org/exobel/routerkeygen/AutoConnectManager.java
+++ b/android/src/org/exobel/routerkeygen/AutoConnectManager.java
@@ -39,7 +39,8 @@ public void onReceive(Context context, Intent intent) {
SupplicantState state = intent
.getParcelableExtra(WifiManager.EXTRA_NEW_STATE);
if (state != null) {
- Log.d(this.getClass().getSimpleName(), state.name());
+ if (BuildConfig.DEBUG)
+ Log.d(this.getClass().getSimpleName(), state.name());
if (state.equals(SupplicantState.COMPLETED)) {
listener.onSuccessfulConection();
return;
diff --git a/android/src/org/exobel/routerkeygen/AutoConnectService.java b/android/src/org/exobel/routerkeygen/AutoConnectService.java
index 4aa7efe..9e15c78 100644
--- a/android/src/org/exobel/routerkeygen/AutoConnectService.java
+++ b/android/src/org/exobel/routerkeygen/AutoConnectService.java
@@ -19,9 +19,10 @@
package org.exobel.routerkeygen;
import java.util.List;
+
import org.exobel.routerkeygen.AutoConnectManager.onConnectionListener;
+
import android.annotation.TargetApi;
-import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
@@ -38,9 +39,8 @@
import android.os.Handler;
import android.os.IBinder;
import android.provider.Settings;
-import android.support.v4.app.NotificationCompat;
import android.util.Log;
-import android.widget.RemoteViews;
+
import com.farproc.wifi.connecter.Wifi;
public class AutoConnectService extends Service implements onConnectionListener {
@@ -55,6 +55,7 @@ public class AutoConnectService extends Service implements onConnectionListener
+ AutoConnectService.class.getName().hashCode();
private NotificationManager mNotificationManager;
+ private Handler handler;
final private Binder mBinder = new LocalBinder();
private ScanResult network;
@@ -66,6 +67,12 @@ public class AutoConnectService extends Service implements onConnectionListener
private int currentNetworkId = -1;
private boolean cancelNotification = true;
+ private Runnable tryAfterDisconnecting = new Runnable() {
+ public void run() {
+ tryingConnection();
+ }
+ };
+
@Override
public IBinder onBind(Intent intent) {
return mBinder;
@@ -84,6 +91,7 @@ AutoConnectService getService() {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
@SuppressWarnings("deprecation")
public void onCreate() {
+ handler = new Handler();
wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
@@ -118,21 +126,23 @@ public int onStartCommand(Intent intent, int flags, int startId) {
network.capabilities);
mNotificationManager
.notify(UNIQUE_ID,
- createProgressBar(
- getString(R.string.app_name),
- getString(R.string.not_auto_connect_waiting),
- 0));
- final Handler handler = new Handler();
- handler.postDelayed(new Runnable() {
- public void run() {
- tryingConnection();
- }
- }, DISCONNECT_WAITING_TIME);
+ NotificationUtils
+ .createProgressBar(
+ this,
+ getString(R.string.app_name),
+ getString(R.string.not_auto_connect_waiting),
+ keys.size(),
+ 0,
+ false,
+ getDefaultPendingIntent(getApplicationContext())));
+ handler.postDelayed(tryAfterDisconnecting,
+ DISCONNECT_WAITING_TIME);
cancelNotification = true;
} else {
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_error_key_testing))
.build());
cancelNotification = false;
@@ -154,19 +164,23 @@ private void tryingConnection() {
if (currentNetworkId != -1) {
lastTimeDisconnected = System.currentTimeMillis();
- registerReceiver(mReceiver, new IntentFilter(
- WifiManager.SUPPLICANT_STATE_CHANGED_ACTION));
- mNotificationManager.notify(
- UNIQUE_ID,
- createProgressBar(
+ if (attempts == 1)// first try, we register the listener
+ registerReceiver(mReceiver, new IntentFilter(
+ WifiManager.SUPPLICANT_STATE_CHANGED_ACTION));
+ mNotificationManager.notify(UNIQUE_ID, NotificationUtils
+ .createProgressBar(
+ this,
getString(R.string.app_name),
getString(R.string.not_auto_connect_key_testing,
- keys.get(attempts - 1)), attempts));
+ keys.get(attempts - 1)), keys.size(),
+ attempts, false,
+ getDefaultPendingIntent(getApplicationContext())));
cancelNotification = true;
} else {
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_error_key_testing)).build());
cancelNotification = false;
stopSelf();
@@ -174,10 +188,12 @@ private void tryingConnection() {
}
public void onDestroy() {
+ super.onDestroy();
+ handler.removeCallbacks(tryAfterDisconnecting);
+ if (cancelNotification)
+ mNotificationManager.cancel(UNIQUE_ID);
+ reenableAllHotspots();
try {
- if (cancelNotification)
- mNotificationManager.cancel(UNIQUE_ID);
- reenableAllHotspots();
unregisterReceiver(mReceiver);
} catch (Exception e) {
e.printStackTrace();
@@ -198,7 +214,8 @@ public void onFailedConnection() {
reenableAllHotspots();
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_no_correct_keys)).build());
cancelNotification = false;
stopSelf();
@@ -211,7 +228,8 @@ public void onSuccessfulConection() {
reenableAllHotspots();
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(
+ NotificationUtils.getSimple(
+ this,
getString(R.string.app_name),
getString(R.string.not_correct_key_testing,
keys.get(attempts - 1))).build());
@@ -230,55 +248,17 @@ private void reenableAllHotspots() {
}
}
- private NotificationCompat.Builder getSimple(CharSequence title,
- CharSequence context) {
- return new NotificationCompat.Builder(this)
- .setSmallIcon(R.drawable.ic_notification).setTicker(title)
- .setContentTitle(title).setContentText(context)
- .setContentIntent(getPendingIntent());
- }
-
- private Notification createProgressBar(CharSequence title,
- CharSequence content, int progress) {
- final NotificationCompat.Builder builder = getSimple(title, content);
- final PendingIntent i = PendingIntent.getActivity(
- getApplicationContext(),
- 0,
- new Intent(this, CancelOperationActivity.class)
- .putExtra(CancelOperationActivity.SERVICE_TO_TERMINATE,
- AutoConnectService.class.getName())
- .putExtra(CancelOperationActivity.MESSAGE,
- getString(R.string.cancel_auto_test))
- .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+ private static PendingIntent getDefaultPendingIntent(Context context) {
+ final Intent i = new Intent(context, CancelOperationActivity.class)
+ .putExtra(CancelOperationActivity.SERVICE_TO_TERMINATE,
+ AutoConnectService.class.getName())
+ .putExtra(CancelOperationActivity.MESSAGE,
+ context.getString(R.string.cancel_auto_test))
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB)
+ i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
+ return PendingIntent.getActivity(context, 0, i,
PendingIntent.FLAG_UPDATE_CURRENT);
- builder.setContentIntent(i);
- builder.setOngoing(true);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- builder.setProgress(keys.size(), progress, false);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
- builder.addAction(
- android.R.drawable.ic_menu_close_clear_cancel,
- getString(android.R.string.cancel), i);
- }
- } else {
- final RemoteViews contentView = new RemoteViews(getPackageName(),
- R.layout.notification);
- contentView.setTextViewText(R.id.text1, content);
- contentView.setProgressBar(R.id.progress, keys.size(), progress,
- false);
- final Notification not = builder.build();
- not.contentView = contentView;
- return not;
- }
- return builder.build();
}
-
- private PendingIntent getPendingIntent() {
- return PendingIntent.getActivity(getApplicationContext(), 0,
- new Intent(), // add this
- // pass null
- // to intent
- PendingIntent.FLAG_UPDATE_CURRENT);
- }
-
}
diff --git a/android/src/org/exobel/routerkeygen/CancelOperationActivity.java b/android/src/org/exobel/routerkeygen/CancelOperationActivity.java
index 2949bdb..65a1d29 100644
--- a/android/src/org/exobel/routerkeygen/CancelOperationActivity.java
+++ b/android/src/org/exobel/routerkeygen/CancelOperationActivity.java
@@ -34,7 +34,6 @@ protected Dialog onCreateDialog(int id) {
String message = getIntent().getStringExtra(MESSAGE);
if (message == null)
message = getString(android.R.string.cancel) + "?";
-
builder.setTitle(R.string.app_name)
.setNegativeButton(android.R.string.no,
new DialogInterface.OnClickListener() {
diff --git a/android/src/org/exobel/routerkeygen/DictionaryDownloadService.java b/android/src/org/exobel/routerkeygen/DictionaryDownloadService.java
index f1c4f1e..02f1c12 100644
--- a/android/src/org/exobel/routerkeygen/DictionaryDownloadService.java
+++ b/android/src/org/exobel/routerkeygen/DictionaryDownloadService.java
@@ -22,8 +22,6 @@
import android.os.Build;
import android.os.Environment;
import android.preference.PreferenceManager;
-import android.support.v4.app.NotificationCompat;
-import android.widget.RemoteViews;
import android.widget.Toast;
public class DictionaryDownloadService extends IntentService {
@@ -43,10 +41,10 @@ public DictionaryDownloadService() {
}
private NotificationManager mNotificationManager;
+ private Notification update;
@Override
public void onCreate() {
- // TODO Auto-generated method stub
super.onCreate();
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
}
@@ -59,10 +57,12 @@ public void onCreate() {
private boolean stopRequested = false;
public void onDestroy() {
+ super.onDestroy();
stopRequested = true;
mNotificationManager.cancel(UNIQUE_ID);
}
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
@SuppressWarnings("deprecation")
@Override
protected void onHandleIntent(Intent intent) {
@@ -78,7 +78,8 @@ protected void onHandleIntent(Intent intent) {
Environment.MEDIA_MOUNTED)) {
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_nosdcard)).build());
return;
}
@@ -103,7 +104,8 @@ protected void onHandleIntent(Intent intent) {
if (stat.getBlockSize() * stat.getAvailableBlocks() < fileLen) {
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_nomemoryonsdcard))
.build());
fos.close();
@@ -126,7 +128,8 @@ protected void onHandleIntent(Intent intent) {
if (!canWrite(dicFile)) {
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_no_write_permissions))
.build());
dis.close();
@@ -135,10 +138,23 @@ protected void onHandleIntent(Intent intent) {
return;
}
- mNotificationManager.notify(
- UNIQUE_ID,
- createProgressBar(getString(R.string.msg_dl_dlingdic), "",
- myProgress, false));
+ final Intent i = new Intent(getApplicationContext(),
+ CancelOperationActivity.class)
+ .putExtra(CancelOperationActivity.SERVICE_TO_TERMINATE,
+ AutoConnectService.class.getName())
+ .putExtra(
+ CancelOperationActivity.MESSAGE,
+ getApplicationContext().getString(
+ R.string.cancel_auto_test))
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB)
+ i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
+ update = NotificationUtils.createProgressBar(this,
+ getString(R.string.msg_dl_dlingdic), "", fileLen,
+ myProgress, false, PendingIntent.getActivity(
+ getApplicationContext(), 0, i,
+ PendingIntent.FLAG_UPDATE_CURRENT));
+ mNotificationManager.notify(UNIQUE_ID, update);
long lastNotificationTime = System.currentTimeMillis();
buf = new byte[1024 * 512];
while (myProgress < fileLen) {
@@ -160,21 +176,31 @@ protected void onHandleIntent(Intent intent) {
myProgress = fileLen;
}
if ((System.currentTimeMillis() - lastNotificationTime) > MIN_TIME_BETWWEN_UPDATES) {
- mNotificationManager.notify(UNIQUE_ID,
- updateProgressBar(myProgress, false));
+ mNotificationManager.notify(UNIQUE_ID, NotificationUtils
+ .updateProgressBar(update, fileLen, myProgress,
+ false));
lastNotificationTime = System.currentTimeMillis();
}
}
- mNotificationManager.notify(
- UNIQUE_ID,
- createProgressBar(getString(R.string.msg_dl_dlingdic),
- getString(R.string.msg_wait), myProgress, true));
+ mNotificationManager
+ .notify(UNIQUE_ID,
+ NotificationUtils
+ .createProgressBar(
+ this,
+ getString(R.string.msg_dl_dlingdic),
+ getString(R.string.msg_wait),
+ 0,
+ 0,
+ true,
+ NotificationUtils
+ .getDefaultPendingIntent(getApplicationContext())));
if (!HashUtils.checkDicMD5(dicTemp, DICTIONARY_HASH)) {
new File(dicTemp).delete();
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_err_unkown)).build());
return;
}
@@ -182,26 +208,30 @@ protected void onHandleIntent(Intent intent) {
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.pref_msg_err_rename_dic))
.build());
return;
}
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.app_name),
+ NotificationUtils.getSimple(this,
+ getString(R.string.app_name),
getString(R.string.msg_dic_updated_finished))
.build());
} catch (FileNotFoundException e) {
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_nosdcard)).build());
e.printStackTrace();
} catch (Exception e) {
mNotificationManager.notify(
UNIQUE_ID,
- getSimple(getString(R.string.msg_error),
+ NotificationUtils.getSimple(this,
+ getString(R.string.msg_error),
getString(R.string.msg_err_unkown)).build());
e.printStackTrace();
}
@@ -248,71 +278,4 @@ private boolean renameFile(String file, String toFile, boolean saveOld) {
return true;
}
- private NotificationCompat.Builder getSimple(CharSequence title,
- CharSequence context) {
- return new NotificationCompat.Builder(this)
- .setSmallIcon(R.drawable.ic_notification).setTicker(title)
- .setContentTitle(title).setContentText(context)
- .setContentIntent(getPendingIntent());
- }
-
- private Notification update;
-
- @TargetApi(16)
- private Notification updateProgressBar(int progress, boolean indeterminate) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
- update.contentView.setProgressBar(android.R.id.progress, fileLen,
- progress, indeterminate);
- else
- update.contentView.setProgressBar(R.id.progress, fileLen, progress,
- indeterminate);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
- update.bigContentView.setProgressBar(android.R.id.progress,
- fileLen, progress, indeterminate);
- return update;
- }
-
- private Notification createProgressBar(CharSequence title,
- CharSequence content, int progress, boolean indeterminate) {
- final NotificationCompat.Builder builder = getSimple(title, content);
- final PendingIntent i = PendingIntent.getActivity(
- getApplicationContext(),
- 0,
- new Intent(this, CancelOperationActivity.class).putExtra(
- CancelOperationActivity.SERVICE_TO_TERMINATE,
- DictionaryDownloadService.class.getName()).putExtra(
- CancelOperationActivity.MESSAGE,
- getString(R.string.cancel_download)),
- PendingIntent.FLAG_UPDATE_CURRENT);
- builder.setContentIntent(i);
- builder.setOngoing(true);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- builder.setProgress(fileLen, progress, indeterminate);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN
- && !indeterminate) {
- builder.addAction(
- android.R.drawable.ic_menu_close_clear_cancel,
- getString(android.R.string.cancel), i);
- }
- update = builder.build();
- } else {
- RemoteViews contentView = new RemoteViews(getPackageName(),
- R.layout.notification);
- contentView.setTextViewText(R.id.text1, content);
- contentView.setProgressBar(R.id.progress, fileLen, progress,
- indeterminate);
- update = builder.build();
- update.contentView = contentView;
- }
- return update;
- }
-
- private PendingIntent getPendingIntent() {
- return PendingIntent.getActivity(getApplicationContext(), 0,
- new Intent(), // add this
- // pass null
- // to intent
- PendingIntent.FLAG_UPDATE_CURRENT);
- }
-
}
diff --git a/android/src/org/exobel/routerkeygen/NotificationUtils.java b/android/src/org/exobel/routerkeygen/NotificationUtils.java
new file mode 100644
index 0000000..d7ca226
--- /dev/null
+++ b/android/src/org/exobel/routerkeygen/NotificationUtils.java
@@ -0,0 +1,79 @@
+package org.exobel.routerkeygen;
+
+import org.exobel.routerkeygen.ui.NetworksListActivity;
+
+import android.annotation.TargetApi;
+import android.app.Notification;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Build;
+import android.support.v4.app.NotificationCompat;
+import android.widget.RemoteViews;
+
+public final class NotificationUtils {
+
+ public static NotificationCompat.Builder getSimple(Context context,
+ CharSequence title, CharSequence text) {
+ return new NotificationCompat.Builder(context)
+ .setSmallIcon(R.drawable.ic_notification).setTicker(title)
+ .setContentTitle(title).setContentText(text)
+ .setContentIntent(getDefaultPendingIntent(context));
+ }
+
+ @TargetApi(16)
+ public static Notification updateProgressBar(Notification update, int max,
+ int progress, boolean indeterminate) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
+ update.contentView.setProgressBar(android.R.id.progress, max,
+ progress, indeterminate);
+ else
+ update.contentView.setProgressBar(R.id.progress, max, progress,
+ indeterminate);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
+ update.bigContentView.setProgressBar(android.R.id.progress, max,
+ progress, indeterminate);
+ return update;
+ }
+
+ public static Notification createProgressBar(Context context,
+ CharSequence title, CharSequence content, int max, int progress,
+ boolean indeterminate, PendingIntent i) {
+ final NotificationCompat.Builder builder = getSimple(context, title,
+ content);
+ builder.setContentIntent(i);
+ builder.setOngoing(true);
+ final Notification update;
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ builder.setProgress(max, progress, indeterminate);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN
+ && !indeterminate) {
+ builder.addAction(
+ android.R.drawable.ic_menu_close_clear_cancel,
+ context.getString(android.R.string.cancel), i);
+ }
+ update = builder.build();
+ } else {
+ RemoteViews contentView = new RemoteViews(context.getPackageName(),
+ R.layout.notification);
+ contentView.setTextViewText(R.id.text1, content);
+ contentView.setProgressBar(R.id.progress, max, progress,
+ indeterminate);
+ update = builder.build();
+ update.contentView = contentView;
+ }
+ return update;
+ }
+
+ public static PendingIntent getDefaultPendingIntent(Context context) {
+ return PendingIntent.getActivity(context, 0, new Intent(context,
+ NetworksListActivity.class)
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK), // add this
+ // pass null
+ // to intent
+ PendingIntent.FLAG_UPDATE_CURRENT);
+ }
+
+ private NotificationUtils() {
+ }
+}
diff --git a/android/src/org/exobel/routerkeygen/RouterKeygenApplication.java b/android/src/org/exobel/routerkeygen/RouterKeygenApplication.java
index 9fc04a6..d3247cb 100644
--- a/android/src/org/exobel/routerkeygen/RouterKeygenApplication.java
+++ b/android/src/org/exobel/routerkeygen/RouterKeygenApplication.java
@@ -17,7 +17,7 @@
ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA,
ReportField.STACK_TRACE, ReportField.LOGCAT }, mode = ReportingInteractionMode.TOAST, resToastText = R.string.crash_toast_text)
public class RouterKeygenApplication extends Application {
- @TargetApi(Build.VERSION_CODES.GINGERBREAD)
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
public void onCreate() {
super.onCreate();
@@ -36,8 +36,19 @@ public void onCreate() {
StrictMode
.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectAll().penaltyLog().build());
- StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
- .detectAll().penaltyLog().penaltyDeath().build());
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
+ .detectAll()
+ .penaltyLog()
+ .penaltyDeath()
+ .setClassInstanceLimit(
+ CancelOperationActivity.class, 2).build());
+ } else {
+ StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
+ .detectLeakedSqlLiteObjects().penaltyLog()
+ .penaltyDeath().build());
+
+ }
}
}
}
diff --git a/android/src/org/exobel/routerkeygen/WifiScanReceiver.java b/android/src/org/exobel/routerkeygen/WifiScanReceiver.java
index 8ae9ef9..e759d43 100644
--- a/android/src/org/exobel/routerkeygen/WifiScanReceiver.java
+++ b/android/src/org/exobel/routerkeygen/WifiScanReceiver.java
@@ -27,7 +27,7 @@
import org.exobel.routerkeygen.algorithms.WiFiNetwork;
-import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -39,7 +39,6 @@
import android.os.Build;
import android.widget.Toast;
-@SuppressLint("InlinedApi")
public class WifiScanReceiver extends BroadcastReceiver {
final private OnScanListener[] scanListeners;
final private WifiManager wifi;
@@ -55,6 +54,7 @@ public WifiScanReceiver(WifiManager wifi, OnScanListener... scanListener) {
this.wifi = wifi;
}
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onReceive(Context context, Intent intent) {
if (intent == null
|| !intent.getAction().equals(
diff --git a/icon/icon_notification.svg b/icon/icon_notification.svg
index 92c4410..e6275e2 100644
--- a/icon/icon_notification.svg
+++ b/icon/icon_notification.svg
@@ -18,9 +18,9 @@
sodipodi:docname="icon_notification.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.0"
- inkscape:export-filename="/home/ruka/Projectos/routerkeygenAndroid/android/res/drawable-hdpi/ic_notification_holo.png"
- inkscape:export-xdpi="12.03"
- inkscape:export-ydpi="12.03">
+ inkscape:export-filename="/home/ruka/Projectos/routerkeygenAndroid/android/res/drawable-xxhdpi-v11/ic_notification.png"
+ inkscape:export-xdpi="16.045071"
+ inkscape:export-ydpi="16.045071">