40
41 #define LOG_TRACE(...)
42
429 static void
430 onConfigurationChanged_native(JNIEnv* env, jobject clazz, jint handle)
431 {
432 LOG_TRACE("onConfigurationChanged_native");
433 if (handle != 0) {
434 NativeCode* code = (NativeCode*)handle;
435 if (code->callbacks.onConfigurationChanged != NULL) {
436 code->callbacks.onConfigurationChanged(code);
437 }
438 }
439 }
596 static const JNINativeMethod g_methods[] = {
597 { "loadNativeCode", "(Ljava/lang/String;Ljava/lang/String;Landroid/os/MessageQueue;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILandroid/content/res/AssetManager;[B)I",
598 (void*)loadNativeCode_native },
599 { "unloadNativeCode", "(I)V", (void*)unloadNativeCode_native },
600 { "onStartNative", "(I)V", (void*)onStart_native },
601 { "onResumeNative", "(I)V", (void*)onResume_native },
602 { "onSaveInstanceStateNative", "(I)[B", (void*)onSaveInstanceState_native },
603 { "onPauseNative", "(I)V", (void*)onPause_native },
604 { "onStopNative", "(I)V", (void*)onStop_native },
605 { "onConfigurationChangedNative", "(I)V", (void*)onConfigurationChanged_native },
606 { "onLowMemoryNative", "(I)V", (void*)onLowMemory_native },
607 { "onWindowFocusChangedNative", "(IZ)V", (void*)onWindowFocusChanged_native },
608 { "onSurfaceCreatedNative", "(ILandroid/view/Surface;)V", (void*)onSurfaceCreated_native },
609 { "onSurfaceChangedNative", "(ILandroid/view/Surface;III)V", (void*)onSurfaceChanged_native },
610 { "onSurfaceRedrawNeededNative", "(ILandroid/view/Surface;)V", (void*)onSurfaceRedrawNeeded_native },
611 { "onSurfaceDestroyedNative", "(I)V", (void*)onSurfaceDestroyed_native },
612 { "onInputQueueCreatedNative", "(II)V",
613 (void*)onInputQueueCreated_native },
614 { "onInputQueueDestroyedNative", "(II)V",
615 (void*)onInputQueueDestroyed_native },
616 { "onContentRectChangedNative", "(IIIII)V", (void*)onContentRectChanged_native },
617 };
1482
1483 @see android.view.View#onConfigurationChanged(
1485 public void onConfigurationChanged(Configuration newConfig) {
1486 mContentViewCore.onConfigurationChanged(newConfig);
1487 }
1540 public void onConfigurationChanged(Configuration newConfig) {
1541 TraceEvent.begin();
1542
1543 if (newConfig.keyboard != Configuration.KEYBOARD_NOKEYS) {
1544 mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore),
1545 ImeAdapter.getTextInputTypeNone(),
1546 AdapterInputConnection.INVALID_SELECTION,
1547 AdapterInputConnection.INVALID_SELECTION);
1548 InputMethodManager manager = (InputMethodManager)
1549 getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
1550 manager.restartInput(mContainerView);
1551 }
1552 mContainerViewInternals.super_onConfigurationChanged(newConfig);
1553 mNeedUpdateOrientationChanged = true;
1554 TraceEvent.end();
1555 }