Loading core/java/android/view/ViewRootImpl.java +241 −234 Original line number Diff line number Diff line Loading @@ -3735,7 +3735,8 @@ public final class ViewRootImpl implements ViewParent, ((View) msg.obj).invalidate(); break; case MSG_INVALIDATE_RECT: final View.AttachInfo.InvalidateInfo info = (View.AttachInfo.InvalidateInfo) msg.obj; final View.AttachInfo.InvalidateInfo info = (View.AttachInfo.InvalidateInfo) msg.obj; info.target.invalidate(info.left, info.top, info.right, info.bottom); info.recycle(); break; Loading Loading @@ -3774,10 +3775,11 @@ public final class ViewRootImpl implements ViewParent, final boolean displayChanged = mDisplay.getDisplayId() != displayId; if (!mLastReportedMergedConfiguration.equals(mergedConfiguration)) { // If configuration changed - notify about that and, maybe, about move to // display. // If configuration changed - notify about that and, maybe, // about move to display. performConfigurationChange(mergedConfiguration, false /* force */, displayChanged ? displayId : INVALID_DISPLAY /* same display */); displayChanged ? displayId : INVALID_DISPLAY /* same display */); } else if (displayChanged) { // Moved to display without config change - report last applied one. onMovedToDisplay(displayId, mLastConfigurationFromResources); Loading Loading @@ -3849,13 +3851,15 @@ public final class ViewRootImpl implements ViewParent, Log.e(mTag, "OutOfResourcesException locking surface", e); try { if (!mWindowSession.outOfMemory(mWindow)) { Slog.w(mTag, "No processes killed for memory; killing self"); Slog.w(mTag, "No processes killed for memory; killing self"); Process.killProcess(Process.myPid()); } } catch (RemoteException ex) { } // Retry in a bit. sendMessageDelayed(obtainMessage(msg.what, msg.arg1, msg.arg2), 500); sendMessageDelayed(obtainMessage(msg.what, msg.arg1, msg.arg2), 500); return; } } Loading Loading @@ -3892,7 +3896,8 @@ public final class ViewRootImpl implements ViewParent, ~WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION; ((WindowManager.LayoutParams) mView.getLayoutParams()) .softInputMode &= ~WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION; ~WindowManager.LayoutParams .SOFT_INPUT_IS_FORWARD_NAVIGATION; mHasHadWindowFocus = true; } else { if (mPointerCapture) { Loading @@ -3916,16 +3921,16 @@ public final class ViewRootImpl implements ViewParent, enqueueInputEvent(event, null, QueuedInputEvent.FLAG_UNHANDLED, true); } break; case MSG_DISPATCH_KEY_FROM_IME: { if (LOCAL_LOGV) Log.v( TAG, "Dispatching key " + msg.obj + " from IME to " + mView); if (LOCAL_LOGV) { Log.v(TAG, "Dispatching key " + msg.obj + " from IME to " + mView); } KeyEvent event = (KeyEvent) msg.obj; if ((event.getFlags() & KeyEvent.FLAG_FROM_SYSTEM) != 0) { // The IME is trying to say this event is from the // system! Bad bad bad! //noinspection UnusedAssignment event = KeyEvent.changeFlags(event, event.getFlags() & ~KeyEvent.FLAG_FROM_SYSTEM); event = KeyEvent.changeFlags(event, event.getFlags() & ~KeyEvent.FLAG_FROM_SYSTEM); } enqueueInputEvent(event, null, QueuedInputEvent.FLAG_DELIVER_POST_IME, true); } break; Loading @@ -3940,10 +3945,12 @@ public final class ViewRootImpl implements ViewParent, mView.onCloseSystemDialogs((String) msg.obj); } } break; case MSG_DISPATCH_DRAG_EVENT: case MSG_DISPATCH_DRAG_EVENT: { } // fall through case MSG_DISPATCH_DRAG_LOCATION_EVENT: { DragEvent event = (DragEvent) msg.obj; event.mLocalState = mLocalDragState; // only present when this app called startDrag() // only present when this app called startDrag() event.mLocalState = mLocalDragState; handleDragEvent(event); } break; case MSG_DISPATCH_SYSTEM_UI_VISIBILITY: { Loading Loading
core/java/android/view/ViewRootImpl.java +241 −234 Original line number Diff line number Diff line Loading @@ -3735,7 +3735,8 @@ public final class ViewRootImpl implements ViewParent, ((View) msg.obj).invalidate(); break; case MSG_INVALIDATE_RECT: final View.AttachInfo.InvalidateInfo info = (View.AttachInfo.InvalidateInfo) msg.obj; final View.AttachInfo.InvalidateInfo info = (View.AttachInfo.InvalidateInfo) msg.obj; info.target.invalidate(info.left, info.top, info.right, info.bottom); info.recycle(); break; Loading Loading @@ -3774,10 +3775,11 @@ public final class ViewRootImpl implements ViewParent, final boolean displayChanged = mDisplay.getDisplayId() != displayId; if (!mLastReportedMergedConfiguration.equals(mergedConfiguration)) { // If configuration changed - notify about that and, maybe, about move to // display. // If configuration changed - notify about that and, maybe, // about move to display. performConfigurationChange(mergedConfiguration, false /* force */, displayChanged ? displayId : INVALID_DISPLAY /* same display */); displayChanged ? displayId : INVALID_DISPLAY /* same display */); } else if (displayChanged) { // Moved to display without config change - report last applied one. onMovedToDisplay(displayId, mLastConfigurationFromResources); Loading Loading @@ -3849,13 +3851,15 @@ public final class ViewRootImpl implements ViewParent, Log.e(mTag, "OutOfResourcesException locking surface", e); try { if (!mWindowSession.outOfMemory(mWindow)) { Slog.w(mTag, "No processes killed for memory; killing self"); Slog.w(mTag, "No processes killed for memory; killing self"); Process.killProcess(Process.myPid()); } } catch (RemoteException ex) { } // Retry in a bit. sendMessageDelayed(obtainMessage(msg.what, msg.arg1, msg.arg2), 500); sendMessageDelayed(obtainMessage(msg.what, msg.arg1, msg.arg2), 500); return; } } Loading Loading @@ -3892,7 +3896,8 @@ public final class ViewRootImpl implements ViewParent, ~WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION; ((WindowManager.LayoutParams) mView.getLayoutParams()) .softInputMode &= ~WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION; ~WindowManager.LayoutParams .SOFT_INPUT_IS_FORWARD_NAVIGATION; mHasHadWindowFocus = true; } else { if (mPointerCapture) { Loading @@ -3916,16 +3921,16 @@ public final class ViewRootImpl implements ViewParent, enqueueInputEvent(event, null, QueuedInputEvent.FLAG_UNHANDLED, true); } break; case MSG_DISPATCH_KEY_FROM_IME: { if (LOCAL_LOGV) Log.v( TAG, "Dispatching key " + msg.obj + " from IME to " + mView); if (LOCAL_LOGV) { Log.v(TAG, "Dispatching key " + msg.obj + " from IME to " + mView); } KeyEvent event = (KeyEvent) msg.obj; if ((event.getFlags() & KeyEvent.FLAG_FROM_SYSTEM) != 0) { // The IME is trying to say this event is from the // system! Bad bad bad! //noinspection UnusedAssignment event = KeyEvent.changeFlags(event, event.getFlags() & ~KeyEvent.FLAG_FROM_SYSTEM); event = KeyEvent.changeFlags(event, event.getFlags() & ~KeyEvent.FLAG_FROM_SYSTEM); } enqueueInputEvent(event, null, QueuedInputEvent.FLAG_DELIVER_POST_IME, true); } break; Loading @@ -3940,10 +3945,12 @@ public final class ViewRootImpl implements ViewParent, mView.onCloseSystemDialogs((String) msg.obj); } } break; case MSG_DISPATCH_DRAG_EVENT: case MSG_DISPATCH_DRAG_EVENT: { } // fall through case MSG_DISPATCH_DRAG_LOCATION_EVENT: { DragEvent event = (DragEvent) msg.obj; event.mLocalState = mLocalDragState; // only present when this app called startDrag() // only present when this app called startDrag() event.mLocalState = mLocalDragState; handleDragEvent(event); } break; case MSG_DISPATCH_SYSTEM_UI_VISIBILITY: { Loading