Some minor cleanups
This commit is contained in:
parent
1a114c6c45
commit
8f0488aa6a
@ -276,7 +276,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
}
|
||||
|
||||
// Disable it all if it isn't compatible...
|
||||
View[] views = {
|
||||
final View[] views = {
|
||||
convertView,
|
||||
holder.version,
|
||||
holder.status,
|
||||
@ -287,7 +287,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
holder.nativecode
|
||||
};
|
||||
|
||||
for (View v : views) {
|
||||
for (final View v : views) {
|
||||
v.setEnabled(apk.compatible);
|
||||
}
|
||||
|
||||
@ -295,21 +295,21 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
}
|
||||
}
|
||||
|
||||
private static final int INSTALL = Menu.FIRST;
|
||||
private static final int UNINSTALL = Menu.FIRST + 1;
|
||||
private static final int IGNOREALL = Menu.FIRST + 2;
|
||||
private static final int IGNORETHIS = Menu.FIRST + 3;
|
||||
private static final int WEBSITE = Menu.FIRST + 4;
|
||||
private static final int ISSUES = Menu.FIRST + 5;
|
||||
private static final int SOURCE = Menu.FIRST + 6;
|
||||
private static final int LAUNCH = Menu.FIRST + 7;
|
||||
private static final int SHARE = Menu.FIRST + 8;
|
||||
private static final int DONATE = Menu.FIRST + 9;
|
||||
private static final int BITCOIN = Menu.FIRST + 10;
|
||||
private static final int LITECOIN = Menu.FIRST + 11;
|
||||
private static final int DOGECOIN = Menu.FIRST + 12;
|
||||
private static final int FLATTR = Menu.FIRST + 13;
|
||||
private static final int DONATE_URL = Menu.FIRST + 14;
|
||||
private static final int INSTALL = Menu.FIRST;
|
||||
private static final int UNINSTALL = Menu.FIRST + 1;
|
||||
private static final int IGNOREALL = Menu.FIRST + 2;
|
||||
private static final int IGNORETHIS = Menu.FIRST + 3;
|
||||
private static final int WEBSITE = Menu.FIRST + 4;
|
||||
private static final int ISSUES = Menu.FIRST + 5;
|
||||
private static final int SOURCE = Menu.FIRST + 6;
|
||||
private static final int LAUNCH = Menu.FIRST + 7;
|
||||
private static final int SHARE = Menu.FIRST + 8;
|
||||
private static final int DONATE = Menu.FIRST + 9;
|
||||
private static final int BITCOIN = Menu.FIRST + 10;
|
||||
private static final int LITECOIN = Menu.FIRST + 11;
|
||||
private static final int DOGECOIN = Menu.FIRST + 12;
|
||||
private static final int FLATTR = Menu.FIRST + 13;
|
||||
private static final int DONATE_URL = Menu.FIRST + 14;
|
||||
private static final int SEND_VIA_BLUETOOTH = Menu.FIRST + 15;
|
||||
|
||||
private App app;
|
||||
|
@ -43,7 +43,7 @@ public class NfcHelper {
|
||||
ApplicationInfo appInfo;
|
||||
try {
|
||||
appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
|
||||
Uri uris[] = {
|
||||
Uri[] uris = {
|
||||
Uri.parse("file://" + appInfo.publicSourceDir),
|
||||
};
|
||||
nfcAdapter.setBeamPushUris(uris, activity);
|
||||
|
@ -136,7 +136,7 @@ public final class Utils {
|
||||
* Read the input stream until it reaches the end, ignoring any exceptions.
|
||||
*/
|
||||
public static void consumeStream(InputStream stream) {
|
||||
final byte buffer[] = new byte[256];
|
||||
final byte[] buffer = new byte[256];
|
||||
try {
|
||||
int read;
|
||||
do {
|
||||
|
@ -52,7 +52,7 @@ public class FileCompat extends Compatibility {
|
||||
}
|
||||
|
||||
protected static void symlinkRuntime(SanitizedFile source, SanitizedFile dest) {
|
||||
String commands[] = {
|
||||
String[] commands = {
|
||||
"/system/bin/ln",
|
||||
source.getAbsolutePath(),
|
||||
dest.getAbsolutePath()
|
||||
|
@ -177,7 +177,7 @@ public class LocalRepoActivity extends ActionBarActivity {
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (resultCode != Activity.RESULT_OK)
|
||||
if (resultCode != RESULT_OK)
|
||||
return;
|
||||
if (requestCode == SET_IP_ADDRESS) {
|
||||
setUIFromWifi();
|
||||
|
@ -167,7 +167,7 @@ public class ManageReposActivity extends ActionBarActivity {
|
||||
public void finish() {
|
||||
Intent ret = new Intent();
|
||||
markChangedIfRequired(ret);
|
||||
setResult(Activity.RESULT_OK, ret);
|
||||
setResult(RESULT_OK, ret);
|
||||
super.finish();
|
||||
}
|
||||
|
||||
@ -573,7 +573,7 @@ public class ManageReposActivity extends ActionBarActivity {
|
||||
addRepoDialog.dismiss();
|
||||
}
|
||||
if (isImportingRepo) {
|
||||
setResult(Activity.RESULT_OK);
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
||||
.commit();
|
||||
}
|
||||
|
||||
String[] projection = {
|
||||
final String[] projection = {
|
||||
RepoProvider.DataColumns.NAME,
|
||||
RepoProvider.DataColumns.ADDRESS,
|
||||
RepoProvider.DataColumns.FINGERPRINT
|
||||
|
Loading…
x
Reference in New Issue
Block a user