am 26b18771: Merge "Private Window flag to disable touch events in WallpaperService." into lmp-sprout-dev
* commit '26b187711fdf6224e14df465a58f30f510011b49': Private Window flag to disable touch events in WallpaperService.
This commit is contained in:
@@ -1101,6 +1101,13 @@ public interface WindowManager extends ViewManager {
|
|||||||
*/
|
*/
|
||||||
public static final int PRIVATE_FLAG_KEYGUARD = 0x00000400;
|
public static final int PRIVATE_FLAG_KEYGUARD = 0x00000400;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag that prevents the wallpaper behind the current window from receiving touch events.
|
||||||
|
*
|
||||||
|
* {@hide}
|
||||||
|
*/
|
||||||
|
public static final int PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS = 0x00000800;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Control flags that are private to the platform.
|
* Control flags that are private to the platform.
|
||||||
* @hide
|
* @hide
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
|
|||||||
final WindowStateAnimator universeBackground = mService.mAnimator.mUniverseBackground;
|
final WindowStateAnimator universeBackground = mService.mAnimator.mUniverseBackground;
|
||||||
final int aboveUniverseLayer = mService.mAnimator.mAboveUniverseLayer;
|
final int aboveUniverseLayer = mService.mAnimator.mAboveUniverseLayer;
|
||||||
boolean addedUniverse = false;
|
boolean addedUniverse = false;
|
||||||
|
boolean disableWallpaperTouchEvents = false;
|
||||||
|
|
||||||
// If there's a drag in flight, provide a pseudowindow to catch drag input
|
// If there's a drag in flight, provide a pseudowindow to catch drag input
|
||||||
final boolean inDrag = (mService.mDragState != null);
|
final boolean inDrag = (mService.mDragState != null);
|
||||||
@@ -282,8 +283,14 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
|
|||||||
|
|
||||||
final boolean hasFocus = (child == mInputFocus);
|
final boolean hasFocus = (child == mInputFocus);
|
||||||
final boolean isVisible = child.isVisibleLw();
|
final boolean isVisible = child.isVisibleLw();
|
||||||
|
if ((privateFlags
|
||||||
|
& WindowManager.LayoutParams.PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS)
|
||||||
|
!= 0) {
|
||||||
|
disableWallpaperTouchEvents = true;
|
||||||
|
}
|
||||||
final boolean hasWallpaper = (child == mService.mWallpaperTarget)
|
final boolean hasWallpaper = (child == mService.mWallpaperTarget)
|
||||||
&& (privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD) == 0;
|
&& (privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD) == 0
|
||||||
|
&& !disableWallpaperTouchEvents;
|
||||||
final boolean onDefaultDisplay = (child.getDisplayId() == Display.DEFAULT_DISPLAY);
|
final boolean onDefaultDisplay = (child.getDisplayId() == Display.DEFAULT_DISPLAY);
|
||||||
|
|
||||||
// If there's a drag in progress and 'child' is a potential drop target,
|
// If there's a drag in progress and 'child' is a potential drop target,
|
||||||
|
|||||||
Reference in New Issue
Block a user