Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4a36e86 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 26909 into eclair

* changes:
  Not all WebView's host have permission to read the history. Add a security catch and return an empty list.
parents b87f24a6 db674fb4
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -281,11 +281,11 @@ public class Browser {
     */
    public static final String[] getVisitedHistory(ContentResolver cr) {
        try {
	    String[] projection = new String[] { "url" };
	    Cursor c = cr.query(BOOKMARKS_URI,
				projection,
				"visits > 0",
				null, null);
            String[] projection = new String[] {
                "url"
            };
            Cursor c = cr.query(BOOKMARKS_URI, projection, "visits > 0", null,
                    null);
            String[] str = new String[c.getCount()];
            int i = 0;
            while (c.moveToNext()) {
+3 −1
Original line number Diff line number Diff line
@@ -312,7 +312,9 @@ final class WebViewCore {
    }

    protected String[] populateVisitedLinks() {
	return Browser.getVisitedHistory(mContext.getContentResolver());
        // FIXME: getVisitedHistory needs permission and host may not have.
//        return Browser.getVisitedHistory(mContext.getContentResolver());
        return new String[0];
    }

    /**