Loading core/java/android/view/IDisplayWindowInsetsController.aidl +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view; import android.content.ComponentName; import android.view.InsetsSourceControl; import android.view.InsetsState; import android.view.InsetsVisibilities; Loading @@ -30,10 +31,11 @@ oneway interface IDisplayWindowInsetsController { /** * Called when top focused window changes to determine whether or not to take over insets * control. Won't be called if config_remoteInsetsControllerControlsSystemBars is false. * @param packageName: Passes the top package name * @param component: Passes the top application component in the focused window. * @param requestedVisibilities The insets visibilities requested by the focussed window. */ void topFocusedWindowChanged(String packageName, in InsetsVisibilities insetsVisibilities); void topFocusedWindowChanged(in ComponentName component, in InsetsVisibilities insetsVisibilities); /** * @see IWindow#insetsChanged Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.IntDef; import android.content.ComponentName; import android.content.Context; import android.content.res.Configuration; import android.graphics.Point; Loading Loading @@ -324,7 +325,7 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged } @Override public void topFocusedWindowChanged(String packageName, public void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) { // Do nothing } Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayInsetsController.java +7 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.common; import android.content.ComponentName; import android.os.RemoteException; import android.util.Slog; import android.util.SparseArray; Loading Loading @@ -171,14 +172,14 @@ public class DisplayInsetsController implements DisplayController.OnDisplaysChan } } private void topFocusedWindowChanged(String packageName, private void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) { CopyOnWriteArrayList<OnInsetsChangedListener> listeners = mListeners.get(mDisplayId); if (listeners == null) { return; } for (OnInsetsChangedListener listener : listeners) { listener.topFocusedWindowChanged(packageName, requestedVisibilities); listener.topFocusedWindowChanged(component, requestedVisibilities); } } Loading @@ -186,10 +187,10 @@ public class DisplayInsetsController implements DisplayController.OnDisplaysChan private class DisplayWindowInsetsControllerImpl extends IDisplayWindowInsetsController.Stub { @Override public void topFocusedWindowChanged(String packageName, public void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) throws RemoteException { mMainExecutor.execute(() -> { PerDisplay.this.topFocusedWindowChanged(packageName, requestedVisibilities); PerDisplay.this.topFocusedWindowChanged(component, requestedVisibilities); }); } Loading Loading @@ -234,10 +235,10 @@ public class DisplayInsetsController implements DisplayController.OnDisplaysChan /** * Called when top focused window changes to determine whether or not to take over insets * control. Won't be called if config_remoteInsetsControllerControlsSystemBars is false. * @param packageName The name of the package that is open in the top focussed window. * @param component The application component that is open in the top focussed window. * @param requestedVisibilities The insets visibilities requested by the focussed window. */ default void topFocusedWindowChanged(String packageName, default void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) {} /** Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayInsetsControllerTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static org.mockito.ArgumentMatchers.notNull; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import android.content.ComponentName; import android.os.RemoteException; import android.util.SparseArray; import android.view.IDisplayWindowInsetsController; Loading Loading @@ -165,7 +166,7 @@ public class DisplayInsetsControllerTest extends ShellTestCase { int hideInsetsCount = 0; @Override public void topFocusedWindowChanged(String packageName, public void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) { topFocusedWindowChangedCount++; } Loading services/core/java/com/android/server/wm/DisplayContent.java +5 −3 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.content.ComponentName; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo.ScreenOrientation; Loading Loading @@ -6520,12 +6521,13 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp /** * Notifies the remote insets controller that the top focused window has changed. * * @param packageName The name of the package that is open in the top focused window. * @param component The application component that is open in the top focussed window. * @param requestedVisibilities The insets visibilities requested by the focussed window. */ void topFocusedWindowChanged(String packageName, InsetsVisibilities requestedVisibilities) { void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) { try { mRemoteInsetsController.topFocusedWindowChanged(packageName, requestedVisibilities); mRemoteInsetsController.topFocusedWindowChanged(component, requestedVisibilities); } catch (RemoteException e) { Slog.w(TAG, "Failed to deliver package in top focused window change", e); } Loading Loading
core/java/android/view/IDisplayWindowInsetsController.aidl +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view; import android.content.ComponentName; import android.view.InsetsSourceControl; import android.view.InsetsState; import android.view.InsetsVisibilities; Loading @@ -30,10 +31,11 @@ oneway interface IDisplayWindowInsetsController { /** * Called when top focused window changes to determine whether or not to take over insets * control. Won't be called if config_remoteInsetsControllerControlsSystemBars is false. * @param packageName: Passes the top package name * @param component: Passes the top application component in the focused window. * @param requestedVisibilities The insets visibilities requested by the focussed window. */ void topFocusedWindowChanged(String packageName, in InsetsVisibilities insetsVisibilities); void topFocusedWindowChanged(in ComponentName component, in InsetsVisibilities insetsVisibilities); /** * @see IWindow#insetsChanged Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.IntDef; import android.content.ComponentName; import android.content.Context; import android.content.res.Configuration; import android.graphics.Point; Loading Loading @@ -324,7 +325,7 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged } @Override public void topFocusedWindowChanged(String packageName, public void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) { // Do nothing } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayInsetsController.java +7 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.common; import android.content.ComponentName; import android.os.RemoteException; import android.util.Slog; import android.util.SparseArray; Loading Loading @@ -171,14 +172,14 @@ public class DisplayInsetsController implements DisplayController.OnDisplaysChan } } private void topFocusedWindowChanged(String packageName, private void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) { CopyOnWriteArrayList<OnInsetsChangedListener> listeners = mListeners.get(mDisplayId); if (listeners == null) { return; } for (OnInsetsChangedListener listener : listeners) { listener.topFocusedWindowChanged(packageName, requestedVisibilities); listener.topFocusedWindowChanged(component, requestedVisibilities); } } Loading @@ -186,10 +187,10 @@ public class DisplayInsetsController implements DisplayController.OnDisplaysChan private class DisplayWindowInsetsControllerImpl extends IDisplayWindowInsetsController.Stub { @Override public void topFocusedWindowChanged(String packageName, public void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) throws RemoteException { mMainExecutor.execute(() -> { PerDisplay.this.topFocusedWindowChanged(packageName, requestedVisibilities); PerDisplay.this.topFocusedWindowChanged(component, requestedVisibilities); }); } Loading Loading @@ -234,10 +235,10 @@ public class DisplayInsetsController implements DisplayController.OnDisplaysChan /** * Called when top focused window changes to determine whether or not to take over insets * control. Won't be called if config_remoteInsetsControllerControlsSystemBars is false. * @param packageName The name of the package that is open in the top focussed window. * @param component The application component that is open in the top focussed window. * @param requestedVisibilities The insets visibilities requested by the focussed window. */ default void topFocusedWindowChanged(String packageName, default void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) {} /** Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayInsetsControllerTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static org.mockito.ArgumentMatchers.notNull; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import android.content.ComponentName; import android.os.RemoteException; import android.util.SparseArray; import android.view.IDisplayWindowInsetsController; Loading Loading @@ -165,7 +166,7 @@ public class DisplayInsetsControllerTest extends ShellTestCase { int hideInsetsCount = 0; @Override public void topFocusedWindowChanged(String packageName, public void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) { topFocusedWindowChangedCount++; } Loading
services/core/java/com/android/server/wm/DisplayContent.java +5 −3 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.content.ComponentName; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo.ScreenOrientation; Loading Loading @@ -6520,12 +6521,13 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp /** * Notifies the remote insets controller that the top focused window has changed. * * @param packageName The name of the package that is open in the top focused window. * @param component The application component that is open in the top focussed window. * @param requestedVisibilities The insets visibilities requested by the focussed window. */ void topFocusedWindowChanged(String packageName, InsetsVisibilities requestedVisibilities) { void topFocusedWindowChanged(ComponentName component, InsetsVisibilities requestedVisibilities) { try { mRemoteInsetsController.topFocusedWindowChanged(packageName, requestedVisibilities); mRemoteInsetsController.topFocusedWindowChanged(component, requestedVisibilities); } catch (RemoteException e) { Slog.w(TAG, "Failed to deliver package in top focused window change", e); } Loading