From 70a7f91e862d84a32f9b9e46c271b28e04bf86af Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Tue, 18 Dec 2018 07:40:57 -0800 Subject: [PATCH] Fix linter errors in ResourceUpdater (flutter/engine#7240) --- .../platform/android/io/flutter/view/ResourceUpdater.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/view/ResourceUpdater.java b/engine/src/flutter/shell/platform/android/io/flutter/view/ResourceUpdater.java index d627ad0524..66af727f3c 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/view/ResourceUpdater.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/view/ResourceUpdater.java @@ -9,10 +9,7 @@ import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.AsyncTask; import android.os.Bundle; -import android.os.Handler; import android.util.Log; -import android.widget.Toast; -import java.io.BufferedInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; @@ -22,7 +19,6 @@ import java.net.HttpURLConnection; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; -import java.net.URLConnection; import java.util.Date; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; @@ -30,7 +26,7 @@ import java.util.concurrent.ExecutionException; public final class ResourceUpdater { private static final String TAG = "ResourceUpdater"; - private class DownloadTask extends AsyncTask { + private static class DownloadTask extends AsyncTask { @Override protected Void doInBackground(String... args) { try { @@ -72,7 +68,7 @@ public final class ResourceUpdater { Log.i(TAG, "Downloading update " + unresolvedURL); try (OutputStream output = new FileOutputStream(localFile)) { int count; - byte data[] = new byte[1024]; + byte[] data = new byte[1024]; while ((count = input.read(data)) != -1) { output.write(data, 0, count); }