summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2010-11-05 14:39:39 -0700
committerJohn Reck <jreck@google.com>2010-11-09 08:41:48 -0800
commite89daa99d144e8cba904f3733147daea093875cc (patch)
treebced59a23612a41e6a54dc9e74701c3e8b53d168
parente92b8865f067583e242ae8774aeb9f87522a829a (diff)
downloadpackages_apps_Browser-e89daa99d144e8cba904f3733147daea093875cc.zip
packages_apps_Browser-e89daa99d144e8cba904f3733147daea093875cc.tar.gz
packages_apps_Browser-e89daa99d144e8cba904f3733147daea093875cc.tar.bz2
Fixed bookmark folder creation bug
Bug: 3052795 AddBookmarksPage would always create new folders with no account set, causing a bug if the browser was set to sync bookmarks. Change-Id: Ie5dc3a5d79e52e21dc1f2cb66e3821c8b9ff790a
-rw-r--r--src/com/android/browser/AddBookmarkPage.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index f8957c9..2b745b1 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -297,6 +297,13 @@ public class AddBookmarkPage extends Activity
values.put(BrowserContract.Bookmarks.TITLE,
name);
values.put(BrowserContract.Bookmarks.IS_FOLDER, 1);
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
+ String accountType = prefs.getString(BrowserBookmarksPage.PREF_ACCOUNT_TYPE, null);
+ String accountName = prefs.getString(BrowserBookmarksPage.PREF_ACCOUNT_NAME, null);
+ if (!TextUtils.isEmpty(accountName) && !TextUtils.isEmpty(accountType)) {
+ values.put(BrowserContract.Bookmarks.ACCOUNT_TYPE, accountType);
+ values.put(BrowserContract.Bookmarks.ACCOUNT_NAME, accountName);
+ }
long currentFolder;
Object data = mCrumbs.getTopData();
if (data != null) {