From ddf4a474080aa126dead6dc590caa6a7c3059eea Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 13 May 2011 11:25:33 -0700 Subject: 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 --- src/com/android/browser/AddBookmarkPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com/android/browser/AddBookmarkPage.java') 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)) { -- cgit v1.1