am a3a840f9: Merge change 26830 into eclair
Merge commit 'a3a840f9dd13567c31262ea12545ae9f34573739' into eclair-plus-aosp * commit 'a3a840f9dd13567c31262ea12545ae9f34573739': Coloring clicked-on links
This commit is contained in:
@@ -273,6 +273,32 @@ public class Browser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all the URLs in the history.
|
||||||
|
* Requires {@link android.Manifest.permission#READ_HISTORY_BOOKMARKS}
|
||||||
|
* @param cr The ContentResolver used to access the database.
|
||||||
|
* @hide pending API council approval
|
||||||
|
*/
|
||||||
|
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[] str = new String[c.getCount()];
|
||||||
|
int i = 0;
|
||||||
|
while (c.moveToNext()) {
|
||||||
|
str[i] = c.getString(0);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
c.deactivate();
|
||||||
|
return str;
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
return new String[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If there are more than MAX_HISTORY_COUNT non-bookmark history
|
* If there are more than MAX_HISTORY_COUNT non-bookmark history
|
||||||
* items in the bookmark/history table, delete TRUNCATE_N_OLDEST
|
* items in the bookmark/history table, delete TRUNCATE_N_OLDEST
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import android.os.Handler;
|
|||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.Process;
|
import android.os.Process;
|
||||||
|
import android.provider.Browser;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.SparseBooleanArray;
|
import android.util.SparseBooleanArray;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
@@ -310,6 +311,10 @@ final class WebViewCore {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String[] populateVisitedLinks() {
|
||||||
|
return Browser.getVisitedHistory(mContext.getContentResolver());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows a prompt to ask the user to set the Geolocation permission state
|
* Shows a prompt to ask the user to set the Geolocation permission state
|
||||||
* for the given origin.
|
* for the given origin.
|
||||||
|
|||||||
Reference in New Issue
Block a user