Remove unused imports, variables, declarations

This commit is contained in:
TwistedUmbrella 2018-04-19 16:09:07 -04:00
parent 8cd6953f7c
commit 3183b3185a
3 changed files with 2 additions and 11 deletions

View File

@ -30,9 +30,7 @@ import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.io.BufferedInputStream;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;

View File

@ -41,14 +41,13 @@ public class Config {
public static String readOutput(String command) { public static String readOutput(String command) {
try { try {
Process p = Runtime.getRuntime().exec(command); Process p = Runtime.getRuntime().exec(command);
InputStream is = null; InputStream is;
if (p.waitFor() == 0) { if (p.waitFor() == 0) {
is = p.getInputStream(); is = p.getInputStream();
} else { } else {
is = p.getErrorStream(); is = p.getErrorStream();
} }
BufferedReader br = new BufferedReader(new InputStreamReader(is), BufferedReader br = new BufferedReader(new InputStreamReader(is),2048);
2048);
String line = br.readLine(); String line = br.readLine();
br.close(); br.close();
return line; return line;

View File

@ -31,15 +31,11 @@ import java.util.Vector;
public class OnScreenMenu { public class OnScreenMenu {
private Activity mContext; private Activity mContext;
private SharedPreferences prefs;
private VmuLcd vmuLcd; private VmuLcd vmuLcd;
private Vector<PopupWindow> popups; private Vector<PopupWindow> popups;
private File sdcard = Environment.getExternalStorageDirectory();
private String home_directory = sdcard + "/dc";
private int frames = Emulator.frameskip; private int frames = Emulator.frameskip;
private boolean screen = Emulator.widescreen; private boolean screen = Emulator.widescreen;
private boolean limit = Emulator.limitfps; private boolean limit = Emulator.limitfps;
@ -57,8 +53,6 @@ public class OnScreenMenu {
} }
popups = new Vector<PopupWindow>(); popups = new Vector<PopupWindow>();
if (prefs != null) { if (prefs != null) {
this.prefs = prefs;
home_directory = prefs.getString(Config.pref_home, home_directory);
masteraudio = !Emulator.nosound; masteraudio = !Emulator.nosound;
audio = masteraudio; audio = masteraudio;
syncedrender = Emulator.syncedrender; syncedrender = Emulator.syncedrender;