Methods Summary |
---|
private java.lang.String | cookies(java.lang.String url)Retrieve the cookie string for the given url.
return CookieManager.getInstance().getCookie(url);
|
private boolean | cookiesEnabled()Returns whether cookies are enabled or not.
return CookieManager.getInstance().acceptCookie();
|
protected void | finalize()
nativeFinalize();
|
public void | handleMessage(android.os.Message msg)handleMessage
switch (msg.what) {
case TIMER_MESSAGE: {
PerfChecker checker = new PerfChecker();
// clear the flag so that sharedTimerFired() can set a new timer
mHasInstantTimer = false;
sharedTimerFired();
checker.responseAlert("sharedTimer");
break;
}
case FUNCPTR_MESSAGE:
nativeServiceFuncPtrQueue();
break;
}
|
private native void | nativeConstructor()
|
private native void | nativeFinalize()
|
private native void | nativeServiceFuncPtrQueue()
|
public void | pause()Pause all timers.
if (--mPauseTimerRefCount == 0) {
setDeferringTimers(true);
}
|
public void | resume()Resume all timers.
if (++mPauseTimerRefCount == 1) {
setDeferringTimers(false);
}
|
public native void | setCacheSize(int bytes)Set WebCore cache size.
|
private void | setCookies(java.lang.String url, java.lang.String docUrl, java.lang.String value)Store a cookie string associated with a url.
if (value.contains("\r") || value.contains("\n")) {
// for security reason, filter out '\r' and '\n' from the cookie
int size = value.length();
StringBuilder buffer = new StringBuilder(size);
int i = 0;
while (i != -1 && i < size) {
int ir = value.indexOf('\r", i);
int in = value.indexOf('\n", i);
int newi = (ir == -1) ? in : (in == -1 ? ir : (ir < in ? ir
: in));
if (newi > i) {
buffer.append(value.subSequence(i, newi));
} else if (newi == -1) {
buffer.append(value.subSequence(i, size));
break;
}
i = newi + 1;
}
value = buffer.toString();
}
CookieManager.getInstance().setCookie(url, value);
|
private native void | setDeferringTimers(boolean defer)
|
public native void | setNetworkOnLine(boolean online)
|
private void | setSharedTimer(long timemillis)setSharedTimer
if (Config.LOGV) Log.v(LOGTAG, "setSharedTimer " + timemillis);
if (timemillis <= 0) {
// we don't accumulate the sharedTimer unless it is a delayed
// request. This way we won't flood the message queue with
// WebKit messages. This should improve the browser's
// responsiveness to key events.
if (mHasInstantTimer) {
return;
} else {
mHasInstantTimer = true;
Message msg = obtainMessage(TIMER_MESSAGE);
sendMessageDelayed(msg, timemillis);
}
} else {
Message msg = obtainMessage(TIMER_MESSAGE);
sendMessageDelayed(msg, timemillis);
}
|
private native void | sharedTimerFired()
|
private void | signalServiceFuncPtrQueue()
Message msg = obtainMessage(FUNCPTR_MESSAGE);
sendMessage(msg);
|
private void | stopSharedTimer()Stop the shared timer.
if (Config.LOGV) {
Log.v(LOGTAG, "stopSharedTimer removing all timers");
}
removeMessages(TIMER_MESSAGE);
mHasInstantTimer = false;
|