diff options
| author | Jeff Brown <jeffbrown@google.com> | 2010-06-22 01:27:15 -0700 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2010-06-28 19:10:54 -0700 |
| commit | 349703effce5acc53ed96f7ed8556131f0c65e18 (patch) | |
| tree | 359217d5076e3005c724b2117a59ffec81e7a83b /core/java/android/service | |
| parent | f2b544f5ae7676f7ab4cdf3379b2ed3c60a65def (diff) | |
| download | frameworks_base-349703effce5acc53ed96f7ed8556131f0c65e18.zip frameworks_base-349703effce5acc53ed96f7ed8556131f0c65e18.tar.gz frameworks_base-349703effce5acc53ed96f7ed8556131f0c65e18.tar.bz2 | |
Native input event dispatching.
Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.
Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
Diffstat (limited to 'core/java/android/service')
| -rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index 3f5d6ca..249ad62 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -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; + } + } } } } |
