Loading core/java/com/android/internal/widget/PointerLocationView.java +23 −10 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.graphics.RectF; import android.graphics.Region; import android.hardware.input.InputManager; import android.hardware.input.InputManager.InputDeviceListener; import android.os.Handler; import android.os.RemoteException; import android.os.SystemProperties; import android.util.Log; Loading Loading @@ -745,12 +746,17 @@ public class PointerLocationView extends View implements InputDeviceListener, super.onAttachedToWindow(); mIm.registerInputDeviceListener(this, getHandler()); if (shouldShowSystemGestureExclusion()) { try { WindowManagerGlobal.getWindowManagerService().registerSystemGestureExclusionListener( mSystemGestureExclusionListener, mContext.getDisplayId()); WindowManagerGlobal.getWindowManagerService() .registerSystemGestureExclusionListener(mSystemGestureExclusionListener, mContext.getDisplayId()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } else { mSystemGestureExclusion.setEmpty(); } logInputDevices(); } Loading Loading @@ -798,6 +804,10 @@ public class PointerLocationView extends View implements InputDeviceListener, } } private static boolean shouldShowSystemGestureExclusion() { return SystemProperties.getBoolean("debug.pointerlocation.showexclusion", false); } // HACK // A quick and dirty string builder implementation optimized for GC. // Using String.format causes the application grind to a halt when Loading Loading @@ -920,11 +930,14 @@ public class PointerLocationView extends View implements InputDeviceListener, @Override public void onSystemGestureExclusionChanged(int displayId, Region systemGestureExclusion) { Region exclusion = Region.obtain(systemGestureExclusion); getHandler().post(() -> { Handler handler = getHandler(); if (handler != null) { handler.post(() -> { mSystemGestureExclusion.set(exclusion); exclusion.recycle(); invalidate(); }); } } }; } Loading
core/java/com/android/internal/widget/PointerLocationView.java +23 −10 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.graphics.RectF; import android.graphics.Region; import android.hardware.input.InputManager; import android.hardware.input.InputManager.InputDeviceListener; import android.os.Handler; import android.os.RemoteException; import android.os.SystemProperties; import android.util.Log; Loading Loading @@ -745,12 +746,17 @@ public class PointerLocationView extends View implements InputDeviceListener, super.onAttachedToWindow(); mIm.registerInputDeviceListener(this, getHandler()); if (shouldShowSystemGestureExclusion()) { try { WindowManagerGlobal.getWindowManagerService().registerSystemGestureExclusionListener( mSystemGestureExclusionListener, mContext.getDisplayId()); WindowManagerGlobal.getWindowManagerService() .registerSystemGestureExclusionListener(mSystemGestureExclusionListener, mContext.getDisplayId()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } else { mSystemGestureExclusion.setEmpty(); } logInputDevices(); } Loading Loading @@ -798,6 +804,10 @@ public class PointerLocationView extends View implements InputDeviceListener, } } private static boolean shouldShowSystemGestureExclusion() { return SystemProperties.getBoolean("debug.pointerlocation.showexclusion", false); } // HACK // A quick and dirty string builder implementation optimized for GC. // Using String.format causes the application grind to a halt when Loading Loading @@ -920,11 +930,14 @@ public class PointerLocationView extends View implements InputDeviceListener, @Override public void onSystemGestureExclusionChanged(int displayId, Region systemGestureExclusion) { Region exclusion = Region.obtain(systemGestureExclusion); getHandler().post(() -> { Handler handler = getHandler(); if (handler != null) { handler.post(() -> { mSystemGestureExclusion.set(exclusion); exclusion.recycle(); invalidate(); }); } } }; }