Remove debug code

Change-Id: I53236e23990e996b86944214b45a9af014b296f6
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8adc741..90ec428 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -591,8 +591,6 @@
     <string name="pref_development_error_console" translatable="false">Show JavaScript Console</string>
     <!-- Do not translate. Development option to reset the prologin time [CHAR LIMIT=20] -->
     <string name="pref_development_reset_prelogin" translatable="false">Reset prelogin</string>
-    <!-- Do not translate. Development option to add more bookmarks [CHAR LIMIT=20] -->
-    <string name="pref_development_add_bookmarks" tranlsatable="false">Moar bookmarks!</string>
     <!-- Settings screen, setting option name -->
     <string name="pref_default_text_encoding">Text encoding</string>
     <!-- Options in the Default encoding dialog box -->
diff --git a/res/xml/debug_preferences.xml b/res/xml/debug_preferences.xml
index 1653549..029bc4f 100644
--- a/res/xml/debug_preferences.xml
+++ b/res/xml/debug_preferences.xml
@@ -91,8 +91,4 @@
         android:key="reset_prelogin"
         android:title="@string/pref_development_reset_prelogin" />
 
-    <Preference
-        android:key="add_bookmarks"
-        android:title="@string/pref_development_add_bookmarks" />
-
 </PreferenceScreen>
diff --git a/src/com/android/browser/PreferenceKeys.java b/src/com/android/browser/PreferenceKeys.java
index f7dc0e0..ff42aaf 100644
--- a/src/com/android/browser/PreferenceKeys.java
+++ b/src/com/android/browser/PreferenceKeys.java
@@ -76,7 +76,6 @@
     static final String PREF_SMALL_SCREEN = "small_screen";
     static final String PREF_WIDE_VIEWPORT = "wide_viewport";
     static final String PREF_RESET_PRELOGIN = "reset_prelogin";
-    static final String PREF_ADD_BOOKMARKS = "add_bookmarks";
 
     // ----------------------
     // Keys for lab_preferences.xml
diff --git a/src/com/android/browser/preferences/DebugPreferencesFragment.java b/src/com/android/browser/preferences/DebugPreferencesFragment.java
index 80347bd..24821d1 100644
--- a/src/com/android/browser/preferences/DebugPreferencesFragment.java
+++ b/src/com/android/browser/preferences/DebugPreferencesFragment.java
@@ -25,7 +25,6 @@
 import com.android.browser.GoogleAccountLogin;
 import com.android.browser.PreferenceKeys;
 import com.android.browser.R;
-import com.android.browser.provider.BrowserProvider2;
 
 public class DebugPreferencesFragment extends PreferenceFragment
         implements OnPreferenceClickListener {
@@ -38,8 +37,6 @@
 
         Preference e = findPreference(PreferenceKeys.PREF_RESET_PRELOGIN);
         e.setOnPreferenceClickListener(this);
-        e = findPreference(PreferenceKeys.PREF_ADD_BOOKMARKS);
-        e.setOnPreferenceClickListener(this);
     }
 
     @Override
@@ -50,11 +47,6 @@
                     .apply();
             return true;
         }
-        if (PreferenceKeys.PREF_ADD_BOOKMARKS.equals(preference.getKey())) {
-            getActivity().getContentResolver().insert(
-                    BrowserProvider2.DEBUG_ADD_BOOKMARKS_URI, null);
-            return true;
-        }
         return false;
     }
 }
diff --git a/src/com/android/browser/provider/BrowserProvider2.java b/src/com/android/browser/provider/BrowserProvider2.java
index 34a153e..a66c333 100644
--- a/src/com/android/browser/provider/BrowserProvider2.java
+++ b/src/com/android/browser/provider/BrowserProvider2.java
@@ -75,9 +75,6 @@
     static final Uri LEGACY_AUTHORITY_URI = new Uri.Builder()
             .authority(LEGACY_AUTHORITY).scheme("content").build();
 
-    public static final Uri DEBUG_ADD_BOOKMARKS_URI = Uri.withAppendedPath(
-            BrowserContract.AUTHORITY_URI, "debug-add-bookmarks");
-
     public static interface Thumbnails {
         public static final Uri CONTENT_URI = Uri.withAppendedPath(
                 BrowserContract.AUTHORITY_URI, "thumbnails");
@@ -152,7 +149,6 @@
     static final int THUMBNAILS = 10;
     static final int THUMBNAILS_ID = 11;
     static final int OMNIBOX_SUGGESTIONS = 20;
-    static final int DEBUG_ADD_BOOKMARKS = 30;
 
     static final int BOOKMARKS = 1000;
     static final int BOOKMARKS_ID = 1001;
@@ -234,9 +230,6 @@
         matcher.addURI(authority, "thumbnails/#", THUMBNAILS_ID);
         matcher.addURI(authority, "omnibox_suggestions", OMNIBOX_SUGGESTIONS);
 
-        // Debug
-        matcher.addURI(authority, "debug-add-bookmarks", DEBUG_ADD_BOOKMARKS);
-
         // Legacy
         matcher.addURI(LEGACY_AUTHORITY, "searches", SEARCHES);
         matcher.addURI(LEGACY_AUTHORITY, "searches/#", SEARCHES_ID);
@@ -1489,11 +1482,6 @@
                 break;
             }
 
-            case DEBUG_ADD_BOOKMARKS: {
-                mOpenHelper.addDefaultBookmarks(db, FIXED_ID_ROOT);
-                break;
-            }
-
             default: {
                 throw new UnsupportedOperationException("Unknown insert URI " + uri);
             }
diff --git a/src/com/android/browser/util/ThreadedCursorAdapter.java b/src/com/android/browser/util/ThreadedCursorAdapter.java
index d0bf715..b70ca36 100644
--- a/src/com/android/browser/util/ThreadedCursorAdapter.java
+++ b/src/com/android/browser/util/ThreadedCursorAdapter.java
@@ -37,7 +37,6 @@
 
     private static final String LOGTAG = "BookmarksThreadedAdapter";
     private static final boolean DEBUG = false;
-    private static boolean sEnableBitmapRecycling = true;
 
     private Context mContext;
     private Object mCursorLock = new Object();
@@ -49,13 +48,6 @@
     private boolean mHasCursor;
     private long mGeneration;
 
-    static {
-        // TODO: Remove this once recycling is either stabilized or scrapped
-        sEnableBitmapRecycling = SystemProperties
-                .getBoolean("com.android.browser.recycling", sEnableBitmapRecycling);
-        Log.d(LOGTAG, "Bitmap recycling enabled: " + sEnableBitmapRecycling);
-    }
-
     private class LoadContainer {
         WeakReference<View> view;
         int position;
@@ -160,9 +152,7 @@
             if (c == null || c.isClosed()) {
                 return;
             }
-            final T recycleObject = sEnableBitmapRecycling
-                    ? container.bind_object : null;
-            container.bind_object = getRowObject(c, recycleObject);
+            container.bind_object = getRowObject(c, container.bind_object);
         }
         mHandler.obtainMessage(position, container).sendToTarget();
     }