Bug 765220 - Remove use of String.isEmpty. r=margaret a=lsblakk
authorWes Johnston <wjohnston@mozilla.com>
Fri, 15 Jun 2012 08:58:13 -0700
changeset 100496 7b5be4d31c684170b4a7d5596646feb806b85590
parent 100495 09e2ae3132295ef8efcaec9f10b1f3d1d3e6382b
child 100497 949b2aff531c0a3588a6729f1cba9f2031f79346
push id1272
push usermleibovic@mozilla.com
push dateTue, 14 Aug 2012 14:45:50 +0000
treeherdermozilla-beta@7b5be4d31c68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret, lsblakk
bugs765220
milestone15.0
Bug 765220 - Remove use of String.isEmpty. r=margaret a=lsblakk
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -16,16 +16,17 @@ import android.content.res.Configuration
 import android.graphics.Color;
 import android.graphics.drawable.AnimationDrawable;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.os.Build;
 import android.os.Handler;
 import android.os.SystemClock;
+import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
 import android.util.Log;
 import android.view.animation.TranslateAnimation;
 import android.view.ContextMenu;
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.MenuInflater;
@@ -115,17 +116,17 @@ public class BrowserToolbar implements V
             }
         });
         mAwesomeBar.setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() {
             public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
                 MenuInflater inflater = GeckoApp.mAppContext.getMenuInflater();
                 inflater.inflate(R.menu.titlebar_contextmenu, menu);
 
                 String clipboard = GeckoAppShell.getClipboardText();
-                if (clipboard == null || clipboard.isEmpty()) {
+                if (clipboard == null || TextUtils.isEmpty(clipboard)) {
                     menu.findItem(R.id.pasteandgo).setVisible(false);
                     menu.findItem(R.id.paste).setVisible(false);
                 }
 
                 Tab tab = Tabs.getInstance().getSelectedTab();
                 if (tab != null) {
                     String url = tab.getURL();
                     if (url == null) {