Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f40e4928 authored by Chris Tate's avatar Chris Tate Committed by Android Git Automerger
Browse files

am 96725326: am 31e0ffe8: Merge "Native input event dispatching." into gingerbread

Merge commit '96725326'

* commit '96725326':
  Native input event dispatching.
parents 66b1dbaa 96725326
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -773,8 +773,6 @@ public abstract class WallpaperService extends Service {
                    if (WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH) {
                        if (mInputChannel != null) {
                            InputQueue.unregisterInputChannel(mInputChannel);
                            mInputChannel.dispose();
                            mInputChannel = null;
                        }
                    }
                    
@@ -783,6 +781,15 @@ public abstract class WallpaperService extends Service {
                }
                mSurfaceHolder.mSurface.release();
                mCreated = false;
                
                if (WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH) {
                    // Dispose the input channel after removing the window so the Window Manager
                    // doesn't interpret the input channel being closed as an abnormal termination.
                    if (mInputChannel != null) {
                        mInputChannel.dispose();
                        mInputChannel = null;
                    }
                }
            }
        }
    }
+9 −0
Original line number Diff line number Diff line
@@ -1613,6 +1613,15 @@ public final class ViewRoot extends Handler implements ViewParent, View.AttachIn
            sWindowSession.remove(mWindow);
        } catch (RemoteException e) {
        }
        
        if (WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH) {
            // Dispose the input channel after removing the window so the Window Manager
            // doesn't interpret the input channel being closed as an abnormal termination.
            if (mInputChannel != null) {
                mInputChannel.dispose();
                mInputChannel = null;
            }
        }
    }

    void updateConfiguration(Configuration config, boolean force) {
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public interface WindowManagerPolicy {
     * Temporary flag added during the transition to the new native input dispatcher.
     * This will be removed when the old input dispatch code is deleted.
     */
    public final static boolean ENABLE_NATIVE_INPUT_DISPATCH = false;
    public final static boolean ENABLE_NATIVE_INPUT_DISPATCH = true;

    // flags for interceptKeyTq
    /**
+0 −1
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ LOCAL_SRC_FILES:= \
	android_view_ViewRoot.cpp \
	android_view_InputChannel.cpp \
	android_view_InputQueue.cpp \
	android_view_InputTarget.cpp \
	android_view_KeyEvent.cpp \
	android_view_HardwareRenderer.cpp \
	android_view_GLES20Canvas.cpp \
+0 −2
Original line number Diff line number Diff line
@@ -168,7 +168,6 @@ extern int register_android_backup_BackupHelperDispatcher(JNIEnv *env);
extern int register_android_app_NativeActivity(JNIEnv *env);
extern int register_android_view_InputChannel(JNIEnv* env);
extern int register_android_view_InputQueue(JNIEnv* env);
extern int register_android_view_InputTarget(JNIEnv* env);
extern int register_android_view_KeyEvent(JNIEnv* env);
extern int register_android_view_MotionEvent(JNIEnv* env);

@@ -1305,7 +1304,6 @@ static const RegJNIRec gRegJNI[] = {
    REG_JNI(register_android_app_NativeActivity),
    REG_JNI(register_android_view_InputChannel),
    REG_JNI(register_android_view_InputQueue),
    REG_JNI(register_android_view_InputTarget),
    REG_JNI(register_android_view_KeyEvent),
    REG_JNI(register_android_view_MotionEvent),
};
Loading