diff options
author | John Reck <jreck@google.com> | 2011-05-13 11:25:33 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-05-13 11:26:02 -0700 |
commit | ddf4a474080aa126dead6dc590caa6a7c3059eea (patch) | |
tree | e30ae7837d2b711f514989593e5873be6a9b31bf /src/com/android/browser/AddBookmarkPage.java | |
parent | 6d45e134f2fd61e85b219e3fde7de796961bdd67 (diff) | |
download | packages_apps_Browser-ddf4a474080aa126dead6dc590caa6a7c3059eea.zip packages_apps_Browser-ddf4a474080aa126dead6dc590caa6a7c3059eea.tar.gz packages_apps_Browser-ddf4a474080aa126dead6dc590caa6a7c3059eea.tar.bz2 |
Prevent adding a folder to itself recursively
Prevent the last used folder from being listed if the user
is editing that folder. Otherwise it would try to set a folder's
parent to itself, not cool
Change-Id: Ia0578436f0c5270663d7908000139816bcfaf163
Diffstat (limited to 'src/com/android/browser/AddBookmarkPage.java')
-rw-r--r-- | src/com/android/browser/AddBookmarkPage.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java index 3524c22..3a98846 100644 --- a/src/com/android/browser/AddBookmarkPage.java +++ b/src/com/android/browser/AddBookmarkPage.java @@ -405,7 +405,7 @@ public class AddBookmarkPage extends Activity mCurrentFolder = info.parentId; onCurrentFolderFound(); } - if (info.lastUsedId != -1) { + if (info.lastUsedId != -1 && info.lastUsedId != info.id) { if (setAccount && info.lastUsedId != mRootFolder && TextUtils.equals(info.lastUsedAccountName, info.accountName) && TextUtils.equals(info.lastUsedAccountType, info.accountType)) { |