am 8f9fb947: Merge "Add Plugin API for controling the device power states" into honeycomb
* commit '8f9fb94741b5032c8774f87130133ef14d9af4e2': Add Plugin API for controling the device power states
This commit is contained in:
@@ -673,6 +673,7 @@ public class WebView extends AbsoluteLayout
|
||||
static final int AUTOFILL_COMPLETE = 134;
|
||||
|
||||
static final int SELECT_AT = 135;
|
||||
static final int SCREEN_ON = 136;
|
||||
|
||||
private static final int FIRST_PACKAGE_MSG_ID = SCROLL_TO_MSG_ID;
|
||||
private static final int LAST_PACKAGE_MSG_ID = SET_TOUCH_HIGHLIGHT_RECTS;
|
||||
@@ -726,7 +727,8 @@ public class WebView extends AbsoluteLayout
|
||||
"SAVE_WEBARCHIVE_FINISHED", // = 132;
|
||||
"SET_AUTOFILLABLE", // = 133;
|
||||
"AUTOFILL_COMPLETE", // = 134;
|
||||
"SELECT_AT" // = 135;
|
||||
"SELECT_AT", // = 135;
|
||||
"SCREEN_ON" // = 136;
|
||||
};
|
||||
|
||||
// If the site doesn't use the viewport meta tag to specify the viewport,
|
||||
@@ -7454,6 +7456,10 @@ public class WebView extends AbsoluteLayout
|
||||
doMotionUp(msg.arg1, msg.arg2);
|
||||
break;
|
||||
|
||||
case SCREEN_ON:
|
||||
setKeepScreenOn(msg.arg1 == 1);
|
||||
break;
|
||||
|
||||
case SHOW_FULLSCREEN: {
|
||||
View view = (View) msg.obj;
|
||||
int npp = msg.arg1;
|
||||
|
||||
@@ -2548,6 +2548,15 @@ final class WebViewCore {
|
||||
return mContext;
|
||||
}
|
||||
|
||||
// called by JNI
|
||||
private void keepScreenOn(boolean screenOn) {
|
||||
if (mWebView != null) {
|
||||
Message message = mWebView.mPrivateHandler.obtainMessage(WebView.SCREEN_ON);
|
||||
message.arg1 = screenOn ? 1 : 0;
|
||||
message.sendToTarget();
|
||||
}
|
||||
}
|
||||
|
||||
// called by JNI
|
||||
private Class<?> getPluginClass(String libName, String clsName) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user