Skip to content

Commit

Permalink
unify empty string compare
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Mueller <tschenser@gmx.de>
  • Loading branch information
jmue committed Apr 18, 2019
1 parent 8bb654b commit b69169f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/owncloud/android/datamodel/OCFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public String getLocalId() {
}

public boolean isInConflict() {
return etagInConflict != null && !"".equals(etagInConflict);
return !TextUtils.isEmpty(etagInConflict);
}

public boolean isSharedWithMe() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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;
Expand Down Expand Up @@ -204,7 +205,7 @@ protected void setTextListeners() {

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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
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;
Expand Down Expand Up @@ -750,7 +751,7 @@ private void populateDirectoryList() {
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);
Expand Down

0 comments on commit b69169f

Please sign in to comment.