Browse Source

added content URIs for Chrome dev and beta and debug methods

master
Anthony Restaino 9 years ago
parent
commit
290e77e696
  1. 26
      app/src/main/java/acr/browser/lightning/database/BookmarkLocalSync.java

26
app/src/main/java/acr/browser/lightning/database/BookmarkLocalSync.java

@ -19,6 +19,8 @@ public class BookmarkLocalSync { @@ -19,6 +19,8 @@ public class BookmarkLocalSync {
private static final String STOCK_BOOKMARKS_CONTENT = "content://browser/bookmarks";
private static final String CHROME_BOOKMARKS_CONTENT = "content://com.android.chrome.browser/bookmarks";
private static final String CHROME_BETA_BOOKMARKS_CONTENT = "content://com.chrome.beta.browser/bookmarks";
private static final String CHROME_DEV_BOOKMARKS_CONTENT = "content://com.chrome.dev.browser/bookmarks";
private static final String COLUMN_TITLE = "title";
private static final String COLUMN_URL = "url";
@ -142,4 +144,28 @@ public class BookmarkLocalSync { @@ -142,4 +144,28 @@ public class BookmarkLocalSync {
return cursor;
}
public void printAllColumns(){
printColumns(CHROME_BETA_BOOKMARKS_CONTENT);
printColumns(CHROME_BOOKMARKS_CONTENT);
printColumns(CHROME_DEV_BOOKMARKS_CONTENT);
printColumns(STOCK_BOOKMARKS_CONTENT);
}
public void printColumns(String contentProvider) {
Cursor cursor = null;
Log.e(TAG, contentProvider);
Uri uri = Uri.parse(contentProvider);
try {
cursor = mContext.getContentResolver().query(uri, null, null, null, null);
} catch (Exception e) {
Log.e(TAG, "Error Occurred", e);
}
if (cursor != null) {
for (int n = 0; n < cursor.getColumnCount(); n++) {
Log.d(TAG, cursor.getColumnName(n));
}
cursor.close();
}
}
}

Loading…
Cancel
Save