summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/AddBookmarkPage.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-11-09 17:53:10 -0800
committerJohn Reck <jreck@google.com>2011-11-09 17:53:10 -0800
commit903a0724c7cfd7c8d8eca790622d96d2c3ce63df (patch)
tree4e6a8f2d7c02973e5515264d20559f60d4628b55 /src/com/android/browser/AddBookmarkPage.java
parent50c04abe67ac1eebd5a07777b5395b244d90b9ac (diff)
downloadpackages_apps_Browser-903a0724c7cfd7c8d8eca790622d96d2c3ce63df.zip
packages_apps_Browser-903a0724c7cfd7c8d8eca790622d96d2c3ce63df.tar.gz
packages_apps_Browser-903a0724c7cfd7c8d8eca790622d96d2c3ce63df.tar.bz2
Special case the root folder in add bookmarks
Bug: 5505282 The special "Other Bookmarks" folder isn't a child of the special "Bookmarks" folder. The merging of those two is only handled if the URI is CONTENT_URI_DEFAULT_FOLDER, not if a specific folder id is given. Thus we need to special case that in the AddBookmarkPage loader. Change-Id: Ic92fba5ea8c758fc153a9cfd0c567bcfdcbc524d
Diffstat (limited to 'src/com/android/browser/AddBookmarkPage.java')
-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;
}
}