summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-11-10 15:44:17 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-10 15:44:17 -0800
commit4409358ac603ec61f42a1b40f90d8b2893d9ad0b (patch)
tree4e6a8f2d7c02973e5515264d20559f60d4628b55
parent90cb7324f228b27ac6d84ed37b39b9f887a5a316 (diff)
parent903a0724c7cfd7c8d8eca790622d96d2c3ce63df (diff)
downloadpackages_apps_browser-4409358ac603ec61f42a1b40f90d8b2893d9ad0b.zip
packages_apps_browser-4409358ac603ec61f42a1b40f90d8b2893d9ad0b.tar.gz
packages_apps_browser-4409358ac603ec61f42a1b40f90d8b2893d9ad0b.tar.bz2
Merge "Special case the root folder in add bookmarks" into ics-mr1
-rw-r--r--src/com/android/browser/AddBookmarkPage.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index ae5ae69..fdb34c4 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -145,6 +145,13 @@ public class AddBookmarkPage extends Activity
}
private Uri getUriForFolder(long folder) {
+ BookmarkAccount account =
+ (BookmarkAccount) mAccountSpinner.getSelectedItem();
+ if (folder == mRootFolder && account != null) {
+ return BookmarksLoader.addAccount(
+ BrowserContract.Bookmarks.CONTENT_URI_DEFAULT_FOLDER,
+ account.accountType, account.accountName);
+ }
return BrowserContract.Bookmarks.buildFolderUri(folder);
}
@@ -437,8 +444,8 @@ public class AddBookmarkPage extends Activity
BookmarkAccount account = mAccountAdapter.getItem(i);
if (TextUtils.equals(account.accountName, accountName)
&& TextUtils.equals(account.accountType, accountType)) {
- onRootFolderFound(account.rootFolderId);
mAccountSpinner.setSelection(i);
+ onRootFolderFound(account.rootFolderId);
return;
}
}