Loading core/api/test-current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -2942,6 +2942,7 @@ package android.view { public interface WindowManager extends android.view.ViewManager { public interface WindowManager extends android.view.ViewManager { method public default int getDisplayImePolicy(int); method public default int getDisplayImePolicy(int); method public default void holdLock(android.os.IBinder, int); method public default void holdLock(android.os.IBinder, int); method public default boolean isGlobalKey(int); method public default boolean isTaskSnapshotSupported(); method public default boolean isTaskSnapshotSupported(); method public default void setDisplayImePolicy(int, int); method public default void setDisplayImePolicy(int, int); method public default void setShouldShowSystemDecors(int, boolean); method public default void setShouldShowSystemDecors(int, boolean); Loading core/java/android/view/IWindowManager.aidl +8 −0 Original line number Original line Diff line number Diff line Loading @@ -985,4 +985,12 @@ interface IWindowManager */ */ oneway void captureDisplay(int displayId, in @nullable ScreenCapture.CaptureArgs captureArgs, oneway void captureDisplay(int displayId, in @nullable ScreenCapture.CaptureArgs captureArgs, in ScreenCapture.ScreenCaptureListener listener); in ScreenCapture.ScreenCaptureListener listener); /** * Returns {@code true} if the key will be handled globally and not forwarded to all apps. * * @param keyCode the key code to check * @return {@code true} if the key will be handled globally. */ boolean isGlobalKey(int keyCode); } } core/java/android/view/WindowManager.java +12 −0 Original line number Original line Diff line number Diff line Loading @@ -944,6 +944,18 @@ public interface WindowManager extends ViewManager { return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; } } /** * Returns {@code true} if the key will be handled globally and not forwarded to all apps. * * @param keyCode the key code to check * @return {@code true} if the key will be handled globally. * @hide */ @TestApi default boolean isGlobalKey(int keyCode) { return false; } /** /** * <p> * <p> * Returns whether cross-window blur is currently enabled. This affects both window blur behind * Returns whether cross-window blur is currently enabled. This affects both window blur behind Loading core/java/android/view/WindowManagerImpl.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -282,6 +282,15 @@ public final class WindowManagerImpl implements WindowManager { return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; } } @Override public boolean isGlobalKey(int keyCode) { try { return WindowManagerGlobal.getWindowManagerService().isGlobalKey(keyCode); } catch (RemoteException e) { } return false; } @Override @Override public WindowMetrics getCurrentWindowMetrics() { public WindowMetrics getCurrentWindowMetrics() { final Context context = mParentWindow != null ? mParentWindow.getContext() : mContext; final Context context = mParentWindow != null ? mParentWindow.getContext() : mContext; Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -5493,6 +5493,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { effectId, always, reason); effectId, always, reason); } } @Override public boolean isGlobalKey(int keyCode) { return mGlobalKeyManager.shouldHandleGlobalKey(keyCode); } @Override @Override public boolean performHapticFeedback(int uid, String packageName, int effectId, public boolean performHapticFeedback(int uid, String packageName, int effectId, boolean always, String reason) { boolean always, String reason) { Loading Loading
core/api/test-current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -2942,6 +2942,7 @@ package android.view { public interface WindowManager extends android.view.ViewManager { public interface WindowManager extends android.view.ViewManager { method public default int getDisplayImePolicy(int); method public default int getDisplayImePolicy(int); method public default void holdLock(android.os.IBinder, int); method public default void holdLock(android.os.IBinder, int); method public default boolean isGlobalKey(int); method public default boolean isTaskSnapshotSupported(); method public default boolean isTaskSnapshotSupported(); method public default void setDisplayImePolicy(int, int); method public default void setDisplayImePolicy(int, int); method public default void setShouldShowSystemDecors(int, boolean); method public default void setShouldShowSystemDecors(int, boolean); Loading
core/java/android/view/IWindowManager.aidl +8 −0 Original line number Original line Diff line number Diff line Loading @@ -985,4 +985,12 @@ interface IWindowManager */ */ oneway void captureDisplay(int displayId, in @nullable ScreenCapture.CaptureArgs captureArgs, oneway void captureDisplay(int displayId, in @nullable ScreenCapture.CaptureArgs captureArgs, in ScreenCapture.ScreenCaptureListener listener); in ScreenCapture.ScreenCaptureListener listener); /** * Returns {@code true} if the key will be handled globally and not forwarded to all apps. * * @param keyCode the key code to check * @return {@code true} if the key will be handled globally. */ boolean isGlobalKey(int keyCode); } }
core/java/android/view/WindowManager.java +12 −0 Original line number Original line Diff line number Diff line Loading @@ -944,6 +944,18 @@ public interface WindowManager extends ViewManager { return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; } } /** * Returns {@code true} if the key will be handled globally and not forwarded to all apps. * * @param keyCode the key code to check * @return {@code true} if the key will be handled globally. * @hide */ @TestApi default boolean isGlobalKey(int keyCode) { return false; } /** /** * <p> * <p> * Returns whether cross-window blur is currently enabled. This affects both window blur behind * Returns whether cross-window blur is currently enabled. This affects both window blur behind Loading
core/java/android/view/WindowManagerImpl.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -282,6 +282,15 @@ public final class WindowManagerImpl implements WindowManager { return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; } } @Override public boolean isGlobalKey(int keyCode) { try { return WindowManagerGlobal.getWindowManagerService().isGlobalKey(keyCode); } catch (RemoteException e) { } return false; } @Override @Override public WindowMetrics getCurrentWindowMetrics() { public WindowMetrics getCurrentWindowMetrics() { final Context context = mParentWindow != null ? mParentWindow.getContext() : mContext; final Context context = mParentWindow != null ? mParentWindow.getContext() : mContext; Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -5493,6 +5493,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { effectId, always, reason); effectId, always, reason); } } @Override public boolean isGlobalKey(int keyCode) { return mGlobalKeyManager.shouldHandleGlobalKey(keyCode); } @Override @Override public boolean performHapticFeedback(int uid, String packageName, int effectId, public boolean performHapticFeedback(int uid, String packageName, int effectId, boolean always, String reason) { boolean always, String reason) { Loading