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