Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -384,6 +384,7 @@ java_defaults { "core/java/android/view/IRecentsAnimationRunner.aidl", "core/java/android/view/IRemoteAnimationFinishedCallback.aidl", "core/java/android/view/IRotationWatcher.aidl", "core/java/android/view/ISystemGestureExclusionListener.aidl", "core/java/android/view/IWallpaperVisibilityListener.aidl", "core/java/android/view/IWindow.aidl", "core/java/android/view/IWindowFocusObserver.aidl", Loading core/java/android/view/ISystemGestureExclusionListener.aidl 0 → 100644 +34 −0 Original line number Diff line number Diff line /** * Copyright (c) 2019, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view; import android.graphics.Region; /** * Listener for changes to the system gesture exclusion region * * {@hide} */ oneway interface ISystemGestureExclusionListener { /** * Called when the system gesture exclusion for the given display changed. * @param displayId the display whose system gesture exclusion changed * @param systemGestureExclusion a {@code Region} where the app would like priority over the * system gestures, in display coordinates. */ void onSystemGestureExclusionChanged(int displayId, in Region systemGestureExclusion); } No newline at end of file core/java/android/view/IWindowManager.aidl +13 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.view.IOnKeyguardExitResult; import android.view.IPinnedStackListener; import android.view.RemoteAnimationAdapter; import android.view.IRotationWatcher; import android.view.ISystemGestureExclusionListener; import android.view.IWallpaperVisibilityListener; import android.view.IWindowSession; import android.view.IWindowSessionCallback; Loading Loading @@ -280,6 +281,18 @@ interface IWindowManager void unregisterWallpaperVisibilityListener(IWallpaperVisibilityListener listener, int displayId); /** * Registers a system gesture exclusion listener for a given display. */ void registerSystemGestureExclusionListener(ISystemGestureExclusionListener listener, int displayId); /** * Unregisters a system gesture exclusion listener for a given display. */ void unregisterSystemGestureExclusionListener(ISystemGestureExclusionListener listener, int displayId); /** * Used only for assist -- request a screenshot of the current application. */ Loading core/java/android/view/IWindowSession.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import android.view.InsetsState; import android.view.Surface; import android.view.SurfaceControl; import java.util.List; /** * System private per-application interface to the window manager. * Loading Loading @@ -265,4 +267,10 @@ interface IWindowSession { * that new state. */ void insetsModified(IWindow window, in InsetsState state); /** * Called when the system gesture exclusion has changed. */ void reportSystemGestureExclusionChanged(IWindow window, in List<Rect> exclusionRects); } core/java/android/view/ViewRootImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -3987,7 +3987,11 @@ public final class ViewRootImpl implements ViewParent, void systemGestureExclusionChanged() { final List<Rect> rectsForWindowManager = mGestureExclusionTracker.computeChangedRects(); if (rectsForWindowManager != null) { // TODO Send to WM try { mWindowSession.reportSystemGestureExclusionChanged(mWindow, rectsForWindowManager); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } mAttachInfo.mTreeObserver .dispatchOnSystemGestureExclusionRectsChanged(rectsForWindowManager); } Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -384,6 +384,7 @@ java_defaults { "core/java/android/view/IRecentsAnimationRunner.aidl", "core/java/android/view/IRemoteAnimationFinishedCallback.aidl", "core/java/android/view/IRotationWatcher.aidl", "core/java/android/view/ISystemGestureExclusionListener.aidl", "core/java/android/view/IWallpaperVisibilityListener.aidl", "core/java/android/view/IWindow.aidl", "core/java/android/view/IWindowFocusObserver.aidl", Loading
core/java/android/view/ISystemGestureExclusionListener.aidl 0 → 100644 +34 −0 Original line number Diff line number Diff line /** * Copyright (c) 2019, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view; import android.graphics.Region; /** * Listener for changes to the system gesture exclusion region * * {@hide} */ oneway interface ISystemGestureExclusionListener { /** * Called when the system gesture exclusion for the given display changed. * @param displayId the display whose system gesture exclusion changed * @param systemGestureExclusion a {@code Region} where the app would like priority over the * system gestures, in display coordinates. */ void onSystemGestureExclusionChanged(int displayId, in Region systemGestureExclusion); } No newline at end of file
core/java/android/view/IWindowManager.aidl +13 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.view.IOnKeyguardExitResult; import android.view.IPinnedStackListener; import android.view.RemoteAnimationAdapter; import android.view.IRotationWatcher; import android.view.ISystemGestureExclusionListener; import android.view.IWallpaperVisibilityListener; import android.view.IWindowSession; import android.view.IWindowSessionCallback; Loading Loading @@ -280,6 +281,18 @@ interface IWindowManager void unregisterWallpaperVisibilityListener(IWallpaperVisibilityListener listener, int displayId); /** * Registers a system gesture exclusion listener for a given display. */ void registerSystemGestureExclusionListener(ISystemGestureExclusionListener listener, int displayId); /** * Unregisters a system gesture exclusion listener for a given display. */ void unregisterSystemGestureExclusionListener(ISystemGestureExclusionListener listener, int displayId); /** * Used only for assist -- request a screenshot of the current application. */ Loading
core/java/android/view/IWindowSession.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import android.view.InsetsState; import android.view.Surface; import android.view.SurfaceControl; import java.util.List; /** * System private per-application interface to the window manager. * Loading Loading @@ -265,4 +267,10 @@ interface IWindowSession { * that new state. */ void insetsModified(IWindow window, in InsetsState state); /** * Called when the system gesture exclusion has changed. */ void reportSystemGestureExclusionChanged(IWindow window, in List<Rect> exclusionRects); }
core/java/android/view/ViewRootImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -3987,7 +3987,11 @@ public final class ViewRootImpl implements ViewParent, void systemGestureExclusionChanged() { final List<Rect> rectsForWindowManager = mGestureExclusionTracker.computeChangedRects(); if (rectsForWindowManager != null) { // TODO Send to WM try { mWindowSession.reportSystemGestureExclusionChanged(mWindow, rectsForWindowManager); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } mAttachInfo.mTreeObserver .dispatchOnSystemGestureExclusionRectsChanged(rectsForWindowManager); } Loading