[Android] Replace string .equals("") tests in conditionals with .isEmpty()
This commit is contained in:
parent
7924f11284
commit
d90243a2c9
|
@ -139,7 +139,7 @@ public class AboutFragment extends Fragment {
|
|||
R.id.revision_text);
|
||||
String revision = parentActivity.getString(R.string.revision_text,
|
||||
versionName, String.valueOf(versionCode));
|
||||
if (!buildId.equals("")) {
|
||||
if (!buildId.isEmpty()) {
|
||||
revision = parentActivity.getString(R.string.revision_text,
|
||||
versionName, buildId.substring(0,7));
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ public class GitAdapter extends BaseAdapter {
|
|||
final String current = commit.get("Build");
|
||||
|
||||
RelativeLayout item = (RelativeLayout) vi.findViewById(R.id.change);
|
||||
if (current != null && !current.equals("") && current.equals(sha)) {
|
||||
if (current != null && !current.isEmpty() && current.equals(sha)) {
|
||||
item.getBackground().setColorFilter(0xFF00FF00,
|
||||
PorterDuff.Mode.MULTIPLY);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue