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

Commit 31e0ffe8 authored by Chris Tate's avatar Chris Tate Committed by Android (Google) Code Review
Browse files

Merge "Native input event dispatching." into gingerbread

parents d4760c24 349703ef
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
@@ -1762,6 +1762,15 @@ public final class ViewRoot extends Handler implements ViewParent,
            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
@@ -47,7 +47,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_MotionEvent.cpp \
	android_text_AndroidCharacter.cpp \
+0 −2
Original line number Diff line number Diff line
@@ -164,7 +164,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);

@@ -1297,7 +1296,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