From a95aa6e89bb4f45a2f006b6d8fe7e8cb296d3cb9 Mon Sep 17 00:00:00 2001
From: sponge <sponge@mail.i2p>
Date: Mon, 23 Jul 2012 09:33:42 +0000
Subject: [PATCH] Janitorial work, imports and some warnings

---
 src/net/i2p/android/apps/EepGetFetcher.java   |  7 +--
 src/net/i2p/android/apps/NewsFetcher.java     | 12 ++---
 .../router/activity/AddressbookActivity.java  | 10 +---
 .../router/activity/I2PActivityBase.java      |  7 +--
 .../router/activity/I2PWebViewClient.java     | 18 +++----
 .../router/activity/LicenseActivity.java      |  1 -
 .../android/router/activity/LogActivity.java  |  4 --
 .../android/router/activity/MainActivity.java |  3 +-
 .../android/router/activity/NewsActivity.java | 14 ++----
 .../router/activity/PeersActivity.java        |  7 +--
 .../router/activity/SettingsActivity.java     |  1 -
 .../router/activity/TextResourceActivity.java |  8 ++--
 .../android/router/activity/WebActivity.java  |  7 +--
 .../android/router/binder/RouterBinder.java   |  1 -
 .../router/provider/CacheProvider.java        |  2 -
 .../android/router/receiver/I2PReceiver.java  | 10 +---
 src/net/i2p/android/router/service/Init.java  | 48 ++++++++-----------
 .../android/router/service/RouterService.java |  8 ----
 .../i2p/android/router/service/StatusBar.java |  3 --
 src/net/i2p/android/router/util/AppCache.java | 14 ++----
 src/net/i2p/android/router/util/Util.java     |  1 -
 src/net/i2p/util/LogWriter.java               |  2 -
 src/net/i2p/util/SecureFileOutputStream.java  |  2 -
 23 files changed, 48 insertions(+), 142 deletions(-)

diff --git a/src/net/i2p/android/apps/EepGetFetcher.java b/src/net/i2p/android/apps/EepGetFetcher.java
index 983bf400d..e7861d91e 100644
--- a/src/net/i2p/android/apps/EepGetFetcher.java
+++ b/src/net/i2p/android/apps/EepGetFetcher.java
@@ -1,11 +1,6 @@
 package net.i2p.android.apps;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
+import java.io.*;
 import net.i2p.I2PAppContext;
 import net.i2p.data.DataHelper;
 import net.i2p.util.EepGet;
diff --git a/src/net/i2p/android/apps/NewsFetcher.java b/src/net/i2p/android/apps/NewsFetcher.java
index 6ce2af50e..5ac712e52 100644
--- a/src/net/i2p/android/apps/NewsFetcher.java
+++ b/src/net/i2p/android/apps/NewsFetcher.java
@@ -1,14 +1,7 @@
 package net.i2p.android.apps;
 
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
 import net.i2p.data.DataHelper;
-import net.i2p.router.Router;
 import net.i2p.router.RouterContext;
 import net.i2p.router.util.RFC822Date;
 import net.i2p.util.EepGet;
@@ -104,6 +97,7 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
     private static final long INITIAL_DELAY = 5*60*1000;
     private static final long RUN_DELAY = 30*60*1000;
 
+    @SuppressWarnings("SleepWhileInLoop")
     public void run() {
         try {
             Thread.sleep(INITIAL_DELAY);
@@ -164,8 +158,8 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
             _tempFile.delete();
         
         try {
-            EepGet get = null;
-            get = new EepGet(_context, true, proxyHost, proxyPort, 0, _tempFile.getAbsolutePath(), newsURL, true, null, _lastModified);
+            // EepGet get = null;
+            EepGet get = new EepGet(_context, true, proxyHost, proxyPort, 0, _tempFile.getAbsolutePath(), newsURL, true, null, _lastModified);
             get.addStatusListener(this);
             if (get.fetch()) {
                 _lastModified = get.getLastModified();
diff --git a/src/net/i2p/android/router/activity/AddressbookActivity.java b/src/net/i2p/android/router/activity/AddressbookActivity.java
index cd8074a14..73f010d97 100644
--- a/src/net/i2p/android/router/activity/AddressbookActivity.java
+++ b/src/net/i2p/android/router/activity/AddressbookActivity.java
@@ -9,15 +9,9 @@ import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import net.i2p.android.router.R;
+import java.util.*;
 import net.i2p.I2PAppContext;
+import net.i2p.android.router.R;
 import net.i2p.client.naming.NamingService;
 
 public class AddressbookActivity extends ListActivity {
diff --git a/src/net/i2p/android/router/activity/I2PActivityBase.java b/src/net/i2p/android/router/activity/I2PActivityBase.java
index e56dc41c0..848e8741b 100644
--- a/src/net/i2p/android/router/activity/I2PActivityBase.java
+++ b/src/net/i2p/android/router/activity/I2PActivityBase.java
@@ -10,16 +10,11 @@ import android.os.IBinder;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
-
 import net.i2p.android.router.R;
 import net.i2p.android.router.binder.RouterBinder;
 import net.i2p.android.router.service.RouterService;
 import net.i2p.android.router.util.Util;
-import net.i2p.router.CommSystemFacade;
-import net.i2p.router.NetworkDatabaseFacade;
-import net.i2p.router.Router;
-import net.i2p.router.RouterContext;
-import net.i2p.router.TunnelManagerFacade;
+import net.i2p.router.*;
 import net.i2p.router.peermanager.ProfileOrganizer;
 import net.i2p.router.transport.FIFOBandwidthLimiter;
 import net.i2p.stat.StatManager;
diff --git a/src/net/i2p/android/router/activity/I2PWebViewClient.java b/src/net/i2p/android/router/activity/I2PWebViewClient.java
index 5129d2f83..4703c6542 100644
--- a/src/net/i2p/android/router/activity/I2PWebViewClient.java
+++ b/src/net/i2p/android/router/activity/I2PWebViewClient.java
@@ -1,6 +1,5 @@
 package net.i2p.android.router.activity;
 
-import android.app.Dialog;
 import android.app.ProgressDialog;
 import android.content.Context;
 import android.content.DialogInterface;
@@ -13,14 +12,7 @@ import android.webkit.HttpAuthHandler;
 import android.webkit.WebView;
 import android.webkit.WebViewClient;
 import android.widget.Toast;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
+import java.io.*;
 import net.i2p.android.apps.EepGetFetcher;
 import net.i2p.android.router.provider.CacheProvider;
 import net.i2p.android.router.util.AppCache;
@@ -280,9 +272,12 @@ class I2PWebViewClient extends WebViewClient {
             return Integer.valueOf(0);
         }
 
+        @Override
         protected void onProgressUpdate(Integer... progress) {
-            if (isCancelled())
-                return;
+            //if (isCancelled())
+            //    return;
+
+            
             //if (progress[0].intValue() < 0) {
             //    _dialog = ProgressDialog.show(_view.getContext(), "Loading", "some url");
             //    _dialog.setOnCancelListener(this);
@@ -401,6 +396,7 @@ class I2PWebViewClient extends WebViewClient {
             return Integer.valueOf(0);
         }
 
+        @Override
         protected void onProgressUpdate(Integer... progress) {
             if (isCancelled())
                 return;
diff --git a/src/net/i2p/android/router/activity/LicenseActivity.java b/src/net/i2p/android/router/activity/LicenseActivity.java
index a99a2335a..3efb5757a 100644
--- a/src/net/i2p/android/router/activity/LicenseActivity.java
+++ b/src/net/i2p/android/router/activity/LicenseActivity.java
@@ -7,7 +7,6 @@ import android.view.View;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.ListView;
-
 import net.i2p.android.router.R;
 
 public class LicenseActivity extends ListActivity {
diff --git a/src/net/i2p/android/router/activity/LogActivity.java b/src/net/i2p/android/router/activity/LogActivity.java
index 41fe5d3eb..a5756bc95 100644
--- a/src/net/i2p/android/router/activity/LogActivity.java
+++ b/src/net/i2p/android/router/activity/LogActivity.java
@@ -4,15 +4,11 @@ import android.app.ListActivity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Handler;
-import android.view.View;
-import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
-
 import java.util.Collections;
 import java.util.List;
-
 import net.i2p.I2PAppContext;
 import net.i2p.android.router.R;
 
diff --git a/src/net/i2p/android/router/activity/MainActivity.java b/src/net/i2p/android/router/activity/MainActivity.java
index 9eb863f9b..3a47d9085 100644
--- a/src/net/i2p/android/router/activity/MainActivity.java
+++ b/src/net/i2p/android/router/activity/MainActivity.java
@@ -10,9 +10,7 @@ import android.os.Handler;
 import android.view.View;
 import android.widget.Button;
 import android.widget.TextView;
-
 import java.text.DecimalFormat;
-
 import net.i2p.android.router.R;
 import net.i2p.android.router.service.RouterService;
 import net.i2p.android.router.util.Util;
@@ -334,6 +332,7 @@ public class MainActivity extends I2PActivityBase {
         }
     }
 
+    @Override
     protected Dialog onCreateDialog(int id) {
         final String currentVersion = Util.getOurVersion(this);
         Dialog rv = null;
diff --git a/src/net/i2p/android/router/activity/NewsActivity.java b/src/net/i2p/android/router/activity/NewsActivity.java
index 9a63ca91e..f6d5a2d28 100644
--- a/src/net/i2p/android/router/activity/NewsActivity.java
+++ b/src/net/i2p/android/router/activity/NewsActivity.java
@@ -4,18 +4,10 @@ import android.content.res.Resources;
 import android.os.Bundle;
 import android.view.KeyEvent;
 import android.webkit.WebView;
-import android.webkit.WebViewClient;
 import android.widget.TextView;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-
-import net.i2p.android.router.R;
+import java.io.*;
 import net.i2p.android.apps.NewsFetcher;
+import net.i2p.android.router.R;
 
 public class NewsActivity extends I2PActivityBase {
 
@@ -76,7 +68,7 @@ public class NewsActivity extends I2PActivityBase {
                 in = getResources().openRawResource(R.raw.initialnews_html);
             }
             
-            int read = 0;
+            int read;
             while ( (read = in.read(buf)) != -1)
                 out.write(buf, 0, read);
 
diff --git a/src/net/i2p/android/router/activity/PeersActivity.java b/src/net/i2p/android/router/activity/PeersActivity.java
index 2bbc3e664..73aec24aa 100644
--- a/src/net/i2p/android/router/activity/PeersActivity.java
+++ b/src/net/i2p/android/router/activity/PeersActivity.java
@@ -4,13 +4,8 @@ import android.os.Bundle;
 import android.view.KeyEvent;
 import android.view.MenuItem;
 import android.webkit.WebView;
-import android.webkit.WebViewClient;
-import android.widget.TextView;
-
-import java.io.StringWriter;
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-
+import java.io.StringWriter;
 import net.i2p.android.router.R;
 import net.i2p.android.router.service.RouterService;
 import net.i2p.router.CommSystemFacade;
diff --git a/src/net/i2p/android/router/activity/SettingsActivity.java b/src/net/i2p/android/router/activity/SettingsActivity.java
index a7aca9e58..2533f9eae 100644
--- a/src/net/i2p/android/router/activity/SettingsActivity.java
+++ b/src/net/i2p/android/router/activity/SettingsActivity.java
@@ -2,7 +2,6 @@ package net.i2p.android.router.activity;
 
 import android.os.Bundle;
 import android.preference.PreferenceActivity;
-
 import net.i2p.android.router.R;
 
 public class SettingsActivity extends PreferenceActivity {
diff --git a/src/net/i2p/android/router/activity/TextResourceActivity.java b/src/net/i2p/android/router/activity/TextResourceActivity.java
index d77962f61..b9c2ed33d 100644
--- a/src/net/i2p/android/router/activity/TextResourceActivity.java
+++ b/src/net/i2p/android/router/activity/TextResourceActivity.java
@@ -1,16 +1,14 @@
 package net.i2p.android.router.activity;
 
-import android.content.res.Resources;
 import android.content.Intent;
+import android.content.res.Resources;
 import android.os.Bundle;
 import android.text.method.ScrollingMovementMethod;
 import android.widget.TextView;
-
 import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
-
 import net.i2p.android.router.R;
 import net.i2p.android.router.util.Util;
 
@@ -45,7 +43,7 @@ public class TextResourceActivity extends I2PActivityBase {
         try {
             in = getResources().openRawResource(id);
             
-            int read = 0;
+            int read;
             while ( (read = in.read(buf)) != -1)
                 out.write(buf, 0, read);
             
diff --git a/src/net/i2p/android/router/activity/WebActivity.java b/src/net/i2p/android/router/activity/WebActivity.java
index 14655ac3a..b1953ff1f 100644
--- a/src/net/i2p/android/router/activity/WebActivity.java
+++ b/src/net/i2p/android/router/activity/WebActivity.java
@@ -7,14 +7,11 @@ import android.os.Bundle;
 import android.view.KeyEvent;
 import android.view.MenuItem;
 import android.webkit.WebView;
-import android.webkit.WebViewClient;
 import android.widget.TextView;
-
 import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
-
 import net.i2p.android.router.R;
 
 public class WebActivity extends I2PActivityBase {
@@ -62,7 +59,7 @@ public class WebActivity extends I2PActivityBase {
         try {
             in = getResources().openRawResource(id);
             
-            int read = 0;
+            int read;
             while ( (read = in.read(buf)) != -1)
                 out.write(buf, 0, read);
             
diff --git a/src/net/i2p/android/router/binder/RouterBinder.java b/src/net/i2p/android/router/binder/RouterBinder.java
index ad6df2877..2fa03f97b 100644
--- a/src/net/i2p/android/router/binder/RouterBinder.java
+++ b/src/net/i2p/android/router/binder/RouterBinder.java
@@ -1,7 +1,6 @@
 package net.i2p.android.router.binder;
 
 import android.os.Binder;
-
 import net.i2p.android.router.service.RouterService;
 
 public class RouterBinder extends Binder {
diff --git a/src/net/i2p/android/router/provider/CacheProvider.java b/src/net/i2p/android/router/provider/CacheProvider.java
index 5d7a9404e..85ee19c7c 100644
--- a/src/net/i2p/android/router/provider/CacheProvider.java
+++ b/src/net/i2p/android/router/provider/CacheProvider.java
@@ -6,7 +6,6 @@ import android.content.SharedPreferences;
 import android.database.Cursor;
 import android.net.Uri;
 import android.os.ParcelFileDescriptor;
-
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -14,7 +13,6 @@ import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-
 import net.i2p.android.apps.EepGetFetcher;
 import net.i2p.android.router.util.AppCache;
 import net.i2p.android.router.util.Util;
diff --git a/src/net/i2p/android/router/receiver/I2PReceiver.java b/src/net/i2p/android/router/receiver/I2PReceiver.java
index cbfa6354f..fe76031c3 100644
--- a/src/net/i2p/android/router/receiver/I2PReceiver.java
+++ b/src/net/i2p/android/router/receiver/I2PReceiver.java
@@ -1,15 +1,9 @@
 package net.i2p.android.router.receiver;
 
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
+import android.content.*;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.os.IBinder;
-
 import net.i2p.android.router.binder.RouterBinder;
 import net.i2p.android.router.service.RouterService;
 import net.i2p.android.router.util.Util;
@@ -32,7 +26,7 @@ public class I2PReceiver extends BroadcastReceiver {
         intents.addAction(Intent.ACTION_TIME_CHANGED);
         intents.addAction(Intent.ACTION_TIME_TICK);  // once per minute, for testing
         intents.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
-        context.registerReceiver(this, intents);
+        Intent registerReceiver = context.registerReceiver(this, intents);
         _wasConnected = Util.isConnected(context);
     }
 
diff --git a/src/net/i2p/android/router/service/Init.java b/src/net/i2p/android/router/service/Init.java
index 38cb6e5c0..549a2bec6 100644
--- a/src/net/i2p/android/router/service/Init.java
+++ b/src/net/i2p/android/router/service/Init.java
@@ -2,22 +2,15 @@ package net.i2p.android.router.service;
 
 import android.content.Context;
 import android.content.res.Resources;
-import android.content.res.Resources.NotFoundException;
 import android.os.Build;
-
 import java.io.*;
-import java.util.List;
 import java.util.Properties;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 import net.i2p.android.router.R;
 import net.i2p.android.router.util.Util;
 import net.i2p.data.DataHelper;
-import net.i2p.router.Router;
-import net.i2p.router.RouterContext;
-import net.i2p.router.RouterLaunch;
 import net.i2p.util.FileUtil;
-import net.i2p.util.NativeBigInteger;
 import net.i2p.util.OrderedProperties;
 
 class Init {
@@ -141,7 +134,7 @@ class Init {
             in = ctx.getResources().openRawResource(resID);
             out = new FileOutputStream(new File(myDir, f));
             
-            int read = 0;
+            int read;
             while ( (read = in.read(buf)) != -1)
                 out.write(buf, 0, read);
             
@@ -166,35 +159,32 @@ class Init {
             // Context methods
             in = ctx.getResources().openRawResource(resID);
             zis = new ZipInputStream((in));
-            try {
-                ZipEntry ze;
-                while ((ze = zis.getNextEntry()) != null) {
-                    out = null;
-                    try {
-                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                        byte[] buffer = new byte[1024];
-                        int count;
-                        while ((count = zis.read(buffer)) != -1) {
-                            baos.write(buffer, 0, count);
-                        }
-                        String filename = ze.getName();
-                        Util.i("Creating file " + myDir + "/" + f +"/" + filename + " from resource");
-                        byte[] bytes = baos.toByteArray();
-                        out = new FileOutputStream(new File(myDir + "/" + f +"/" + filename));
-                        out.write(bytes);
-                    } catch (IOException ioe) {
-                    } finally {
-                        if (out != null) try { out.close(); } catch (IOException ioe) {}
+            ZipEntry ze;
+            while ((ze = zis.getNextEntry()) != null) {
+                out = null;
+                try {
+                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                    byte[] buffer = new byte[1024];
+                    int count;
+                    while ((count = zis.read(buffer)) != -1) {
+                        baos.write(buffer, 0, count);
                     }
+                    String filename = ze.getName();
+                    Util.i("Creating file " + myDir + "/" + f +"/" + filename + " from resource");
+                    byte[] bytes = baos.toByteArray();
+                    out = new FileOutputStream(new File(myDir + "/" + f +"/" + filename));
+                    out.write(bytes);
+                } catch (IOException ioe) {
+                } finally {
+                    if (out != null) { try { out.close(); } catch (IOException ioe) {} out = null; }
                 }
-            } finally {
-                if (zis != null) zis.close();
             }
         } catch (IOException ioe) {
         } catch (Resources.NotFoundException nfe) {
         } finally {
             if (in != null) try { in.close(); } catch (IOException ioe) {}
             if (out != null) try { out.close(); } catch (IOException ioe) {}
+            if (zis != null) try { zis.close(); } catch (IOException ioe) {}
         }
     }
     
diff --git a/src/net/i2p/android/router/service/RouterService.java b/src/net/i2p/android/router/service/RouterService.java
index 300fe2f80..b304e5f50 100644
--- a/src/net/i2p/android/router/service/RouterService.java
+++ b/src/net/i2p/android/router/service/RouterService.java
@@ -1,19 +1,12 @@
 package net.i2p.android.router.service;
 
 import android.app.Service;
-import android.content.BroadcastReceiver;
-import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
-
-import java.io.File;
 import java.text.DecimalFormat;
 import java.util.List;
-
-import net.i2p.android.router.R;
 import net.i2p.android.router.binder.RouterBinder;
 import net.i2p.android.router.receiver.I2PReceiver;
 import net.i2p.android.router.util.Util;
@@ -22,7 +15,6 @@ import net.i2p.router.Job;
 import net.i2p.router.Router;
 import net.i2p.router.RouterContext;
 import net.i2p.router.RouterLaunch;
-import net.i2p.util.NativeBigInteger;
 
 /**
  *  Runs the router
diff --git a/src/net/i2p/android/router/service/StatusBar.java b/src/net/i2p/android/router/service/StatusBar.java
index d456fe130..5967ebeb7 100644
--- a/src/net/i2p/android/router/service/StatusBar.java
+++ b/src/net/i2p/android/router/service/StatusBar.java
@@ -5,9 +5,6 @@ import android.app.NotificationManager;
 import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
-
-import java.lang.Thread.UncaughtExceptionHandler;
-
 import net.i2p.android.router.R;
 import net.i2p.android.router.activity.MainActivity;
 
diff --git a/src/net/i2p/android/router/util/AppCache.java b/src/net/i2p/android/router/util/AppCache.java
index 0fcd3dee1..4c81d7c36 100644
--- a/src/net/i2p/android/router/util/AppCache.java
+++ b/src/net/i2p/android/router/util/AppCache.java
@@ -4,20 +4,12 @@ import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.content.Context;
 import android.net.Uri;
-
-import java.io.IOException;
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
+import java.util.*;
 import net.i2p.android.router.provider.CacheProvider;
-import net.i2p.android.router.util.Util;
 
 /**
  *  A least recently used cache with a max number of entries
@@ -122,7 +114,7 @@ public class AppCache {
     public Uri getCacheUri(Uri key) {
         int hash = toHash(key);
         // poke the LRU
-        Object present = null;
+        Object present;
         synchronized(_cache) {
             present = _cache.get(Integer.valueOf(hash));
         }
diff --git a/src/net/i2p/android/router/util/Util.java b/src/net/i2p/android/router/util/Util.java
index e1a32cdb7..1902f9e34 100644
--- a/src/net/i2p/android/router/util/Util.java
+++ b/src/net/i2p/android/router/util/Util.java
@@ -6,7 +6,6 @@ import android.content.pm.PackageManager;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.os.Build;
-
 import net.i2p.I2PAppContext;
 import net.i2p.util.Log;
 
diff --git a/src/net/i2p/util/LogWriter.java b/src/net/i2p/util/LogWriter.java
index 22dcf9c7d..4ef93622a 100644
--- a/src/net/i2p/util/LogWriter.java
+++ b/src/net/i2p/util/LogWriter.java
@@ -6,10 +6,8 @@ package net.i2p.util;
  */
 
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.List;
 import java.util.Queue;
 
 /**
diff --git a/src/net/i2p/util/SecureFileOutputStream.java b/src/net/i2p/util/SecureFileOutputStream.java
index e45798cf9..899f7ab6a 100644
--- a/src/net/i2p/util/SecureFileOutputStream.java
+++ b/src/net/i2p/util/SecureFileOutputStream.java
@@ -4,8 +4,6 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 
-import net.i2p.I2PAppContext;
-
 /**
  *  setXXX() not available until API level 9 (Platform Version 2.3)
  *  @since 0.8.7
-- 
GitLab