diff options
-rw-r--r-- | res/layout/title_bar.xml | 10 | ||||
-rw-r--r-- | src/com/android/browser/BrowserBackupAgent.java | 11 |
2 files changed, 12 insertions, 9 deletions
diff --git a/res/layout/title_bar.xml b/res/layout/title_bar.xml index 01ff0ae..422458f 100644 --- a/res/layout/title_bar.xml +++ b/res/layout/title_bar.xml @@ -22,7 +22,7 @@ android:paddingLeft="8dip" android:paddingRight="12dip" android:paddingTop="2dip" - android:paddingBottom="0dip" + android:paddingBottom="1dip" android:background="@drawable/search_plate_browser" > <ProgressBar android:id="@+id/progress_horizontal" @@ -45,7 +45,6 @@ android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" - android:layout_marginBottom="2dip" > <ImageView android:id="@+id/favicon" android:layout_width="20dip" @@ -75,11 +74,12 @@ <ImageView android:id="@+id/rt_btn" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="fill_parent" android:layout_marginLeft="8dip" - android:layout_marginTop="2dip" + android:scaleType="center" + android:layout_marginBottom="4dip" android:background="@drawable/btn_bookmark" - android:src="@drawable/ic_btn_bookmark_browsertab" + android:src="@drawable/ic_tab_bookmarks_unselected" /> </LinearLayout> </LinearLayout> diff --git a/src/com/android/browser/BrowserBackupAgent.java b/src/com/android/browser/BrowserBackupAgent.java index fe3b7ea..387555d 100644 --- a/src/com/android/browser/BrowserBackupAgent.java +++ b/src/com/android/browser/BrowserBackupAgent.java @@ -46,8 +46,8 @@ import java.util.zip.CRC32; * @hide */ public class BrowserBackupAgent extends BackupAgent { - static final String TAG = "BrowserBookmarkAgent"; - static final boolean DEBUG = true; + static final String TAG = "BrowserBackupAgent"; + static final boolean DEBUG = false; static final String BOOKMARK_KEY = "_bookmarks_"; /** this version num MUST be incremented if the flattened-file schema ever changes */ @@ -147,6 +147,7 @@ public class BrowserBackupAgent extends BackupAgent { // Okay, we have all the bookmarks -- now see if we need to add // them to the browser's database int N = bookmarks.size(); + int nUnique = 0; if (DEBUG) Log.v(TAG, "Restoring " + N + " bookmarks"); String[] urlCol = new String[] { BookmarkColumns.URL }; for (int i = 0; i < N; i++) { @@ -158,16 +159,18 @@ public class BrowserBackupAgent extends BackupAgent { BookmarkColumns.BOOKMARK + " == 1 ", null, null); // if not, insert it if (cursor.getCount() <= 0) { - Log.v(TAG, "Did not see url: " + mark.url); + if (DEBUG) Log.v(TAG, "Did not see url: " + mark.url); // Right now we do not reconstruct the db entry in its // entirety; we just add a new bookmark with the same data Bookmarks.addBookmark(null, getContentResolver(), mark.url, mark.title, null, false); + nUnique++; } else { - Log.v(TAG, "Skipping extant url: " + mark.url); + if (DEBUG) Log.v(TAG, "Skipping extant url: " + mark.url); } cursor.close(); } + Log.i(TAG, "Restored " + nUnique + " of " + N + " bookmarks"); } catch (IOException ioe) { Log.w(TAG, "Bad backup data; not restoring"); crc = -1; |