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
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 @@
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)) {