unify empty string compare

Signed-off-by: Jens Mueller <tschenser@gmx.de>
This commit is contained in:
Jens Mueller 2019-04-17 22:43:22 +02:00
parent 8bb654b5ef
commit b69169f457
3 changed files with 5 additions and 3 deletions

View file

@ -493,7 +493,7 @@ public class OCFile implements Parcelable, Comparable<OCFile>, ServerFileInterfa
}
public boolean isInConflict() {
return etagInConflict != null && !"".equals(etagInConflict);
return !TextUtils.isEmpty(etagInConflict);
}
public boolean isSharedWithMe() {

View file

@ -26,6 +26,7 @@ import android.content.Intent;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
@ -204,7 +205,7 @@ public class PassCodeActivity extends AppCompatActivity implements Injectable {
private void onPassCodeEditTextFocusChange(final int passCodeIndex) {
for (int i = 0; i < passCodeIndex; i++) {
if ("".equals(mPassCodeEditTexts[i].getText().toString())) {
if (TextUtils.isEmpty(mPassCodeEditTexts[i].getText())) {
mPassCodeEditTexts[i].requestFocus();
break;
}

View file

@ -43,6 +43,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.text.TextUtils;
import android.text.format.DateFormat;
import android.view.LayoutInflater;
import android.view.Menu;
@ -750,7 +751,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
boolean notRoot = mParents.size() > 1;
if (actionBar != null) {
if ("".equals(current_dir)) {
if (TextUtils.isEmpty(current_dir)) {
ThemeUtils.setColoredTitle(actionBar, R.string.uploader_top_message, this);
} else {
ThemeUtils.setColoredTitle(actionBar, current_dir, this);