diff options
author | Leon Scroggins <scroggo@google.com> | 2010-12-08 15:28:33 -0500 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-12-08 15:28:33 -0500 |
commit | c112990af09d3e15f8503b863f1d8088c258995e (patch) | |
tree | d0e46d2058f1f8335fbf549742b9c334551aa722 /src/com/android/browser/AddBookmarkPage.java | |
parent | a941f6e87e73c15219042714745d1897cbd13582 (diff) | |
download | packages_apps_Browser-c112990af09d3e15f8503b863f1d8088c258995e.zip packages_apps_Browser-c112990af09d3e15f8503b863f1d8088c258995e.tar.gz packages_apps_Browser-c112990af09d3e15f8503b863f1d8088c258995e.tar.bz2 |
Do not show allow placing a folder inside itself.
Bug:3263141
Change-Id: I0e070fbab798fe8c439b8ef0e6785b4a06e29466
Diffstat (limited to 'src/com/android/browser/AddBookmarkPage.java')
-rw-r--r-- | src/com/android/browser/AddBookmarkPage.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java index 24a8cd5..2bfcbb4 100644 --- a/src/com/android/browser/AddBookmarkPage.java +++ b/src/com/android/browser/AddBookmarkPage.java @@ -339,11 +339,16 @@ public class AddBookmarkPage extends Activity BrowserContract.Bookmarks.TITLE, BrowserContract.Bookmarks.IS_FOLDER }; + String where = BrowserContract.Bookmarks.IS_FOLDER + " != 0"; + if (mEditingFolder) { + where += " AND " + BrowserContract.Bookmarks._ID + " != " + + mMap.getLong(BrowserContract.Bookmarks._ID); + } return new CursorLoader(this, BrowserContract.Bookmarks.buildFolderUri( mCurrentFolder), projection, - BrowserContract.Bookmarks.IS_FOLDER + " != 0", + where, null, null); default: @@ -452,6 +457,7 @@ public class AddBookmarkPage extends Activity } } + @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); if (DEBUG_CRASH) { |