summaryrefslogtreecommitdiffstats
path: root/src/com/android/calendar/Utils.java
diff options
context:
space:
mode:
authorErik <roboerik@android.com>2010-04-09 16:32:17 -0700
committerErik <roboerik@android.com>2010-04-09 16:32:17 -0700
commiteb10fa8bee049e0052b5cb53dcfbdaccef9f2740 (patch)
tree7f353f1dd109fa20597a4903763c68fa9b24b36e /src/com/android/calendar/Utils.java
parent356204b5e6c5b862442bb7cd9e68163f67af92e3 (diff)
downloadandroid_packages_apps_Calendar-eb10fa8bee049e0052b5cb53dcfbdaccef9f2740.tar.gz
android_packages_apps_Calendar-eb10fa8bee049e0052b5cb53dcfbdaccef9f2740.tar.bz2
android_packages_apps_Calendar-eb10fa8bee049e0052b5cb53dcfbdaccef9f2740.zip
Change to TextUtils.equals instead of .equals
Could crash on a NPE for an empty string without this. Change-Id: I1f88889580cfd30f82e867f403e9466a1d7d7819
Diffstat (limited to 'src/com/android/calendar/Utils.java')
-rw-r--r--src/com/android/calendar/Utils.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/calendar/Utils.java b/src/com/android/calendar/Utils.java
index adba8214..d37c7ffb 100644
--- a/src/com/android/calendar/Utils.java
+++ b/src/com/android/calendar/Utils.java
@@ -26,6 +26,7 @@ import android.database.MatrixCursor;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.net.Uri;
+import android.text.TextUtils;
import android.text.format.Time;
import android.util.Log;
import android.view.animation.AlphaAnimation;
@@ -130,7 +131,7 @@ public class Utils {
c2.moveToPosition(-1);
while(c1.moveToNext() && c2.moveToNext()) {
for(int i = 0; i < numColumns; i++) {
- if(!c1.getString(i).equals(c2.getString(i))) {
+ if(!TextUtils.equals(c1.getString(i), c2.getString(i))) {
return false;
}
}