Add some final keywords
This commit is contained in:
parent
623748091d
commit
1405705fd5
@ -1158,7 +1158,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
|
||||
Apk curApk = null;
|
||||
for (int i = 0; i < getApks().getCount(); i ++) {
|
||||
Apk apk = getApks().getItem(i);
|
||||
final Apk apk = getApks().getItem(i);
|
||||
if (apk.vercode == getApp().suggestedVercode) {
|
||||
curApk = apk;
|
||||
break;
|
||||
@ -1178,7 +1178,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
Iterator<String> permissions = permsList.iterator();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (permissions.hasNext()) {
|
||||
String permissionName = permissions.next();
|
||||
final String permissionName = permissions.next();
|
||||
try {
|
||||
Permission permission = new Permission(getActivity(), permissionName);
|
||||
// TODO: Make this list RTL friendly
|
||||
@ -1205,7 +1205,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
if (getApp().antiFeatures != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String af : getApp().antiFeatures) {
|
||||
String afdesc = descAntiFeature(af);
|
||||
final String afdesc = descAntiFeature(af);
|
||||
if (afdesc != null) {
|
||||
sb.append("\t• ").append(afdesc).append("\n");
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ public class FDroidApp extends Application {
|
||||
// Things can be null if the SD card is not ready - we'll just
|
||||
// ignore that and do it next time.
|
||||
if (local_path != null) {
|
||||
File[] files = local_path.listFiles();
|
||||
final File[] files = local_path.listFiles();
|
||||
if (files != null) {
|
||||
for (File f : files) {
|
||||
if (f.getName().endsWith(".apk")) {
|
||||
|
@ -103,7 +103,7 @@ public class RepoXMLHandler extends DefaultHandler {
|
||||
throws SAXException {
|
||||
|
||||
super.endElement(uri, localName, qName);
|
||||
String curel = localName;
|
||||
final String curel = localName;
|
||||
String str = curchars.toString();
|
||||
if (str != null) {
|
||||
str = str.trim();
|
||||
@ -253,28 +253,28 @@ public class RepoXMLHandler extends DefaultHandler {
|
||||
super.startElement(uri, localName, qName, attributes);
|
||||
|
||||
if (localName.equals("repo")) {
|
||||
String pk = attributes.getValue("", "pubkey");
|
||||
final String pk = attributes.getValue("", "pubkey");
|
||||
if (pk != null)
|
||||
pubkey = pk;
|
||||
|
||||
String maxAgeAttr = attributes.getValue("", "maxage");
|
||||
final String maxAgeAttr = attributes.getValue("", "maxage");
|
||||
if (maxAgeAttr != null) {
|
||||
try {
|
||||
maxage = Integer.parseInt(maxAgeAttr);
|
||||
} catch (NumberFormatException nfe) {}
|
||||
}
|
||||
|
||||
String versionAttr = attributes.getValue("", "version");
|
||||
final String versionAttr = attributes.getValue("", "version");
|
||||
if (versionAttr != null) {
|
||||
try {
|
||||
version = Integer.parseInt(versionAttr);
|
||||
} catch (NumberFormatException nfe) {}
|
||||
}
|
||||
|
||||
String nm = attributes.getValue("", "name");
|
||||
final String nm = attributes.getValue("", "name");
|
||||
if (nm != null)
|
||||
name = cleanWhiteSpace(nm);
|
||||
String dc = attributes.getValue("", "description");
|
||||
final String dc = attributes.getValue("", "description");
|
||||
if (dc != null)
|
||||
description = cleanWhiteSpace(dc);
|
||||
|
||||
|
@ -161,7 +161,7 @@ public class UpdateService extends IntentService implements ProgressListener {
|
||||
|
||||
@Override
|
||||
protected void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
String message = resultData.getString(UpdateService.RESULT_MESSAGE);
|
||||
final String message = resultData.getString(UpdateService.RESULT_MESSAGE);
|
||||
boolean finished = false;
|
||||
if (resultCode == UpdateService.STATUS_ERROR_GLOBAL) {
|
||||
forwardEvent(EVENT_ERROR);
|
||||
|
Loading…
x
Reference in New Issue
Block a user