From 57e39f9e46091750c8a07895531446a7f0efdb21 Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 3 Mar 2011 15:30:26 -0800 Subject: Fix isValidParent check Bug: 3506038 Lookup the parent itself, not the children of the parent in isValidParent check. Also, adds testing to watch for regressions Change-Id: I59f00094f862f2e9cd4b4f9fd92d370b87e612e5 --- src/com/android/browser/provider/BrowserProvider2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com/android/browser/provider') diff --git a/src/com/android/browser/provider/BrowserProvider2.java b/src/com/android/browser/provider/BrowserProvider2.java index 94b1651..c6b1bc7 100644 --- a/src/com/android/browser/provider/BrowserProvider2.java +++ b/src/com/android/browser/provider/BrowserProvider2.java @@ -1236,7 +1236,7 @@ public class BrowserProvider2 extends SQLiteContentProvider { private boolean isValidParent(String accountType, String accountName, long parentId) { - Uri uri = Bookmarks.buildFolderUri(parentId); + Uri uri = ContentUris.withAppendedId(Bookmarks.CONTENT_URI, parentId); Cursor c = query(uri, new String[] { Bookmarks.ACCOUNT_NAME, Bookmarks.ACCOUNT_TYPE }, null, null, null); -- cgit v1.1