Loading services/core/java/com/android/server/wm/AccessibilityController.java +9 −4 Original line number Diff line number Diff line Loading @@ -1511,10 +1511,15 @@ final class AccessibilityController { IBinder topFocusedWindowToken = null; synchronized (mService.mGlobalLock) { // Do not send the windows if there is no top focus as // the window manager is still looking for where to put it. // We will do the work when we get a focus change callback. final WindowState topFocusedWindowState = getTopFocusWindow(); // If there is a recents animation running, then use the animation target as the // top window state. Otherwise,do not send the windows if there is no top focus as // the window manager is still looking for where to put it. We will do the work when // we get a focus change callback. final RecentsAnimationController controller = mService.getRecentsAnimationController(); final WindowState topFocusedWindowState = controller != null ? controller.getTargetAppMainWindow() : getTopFocusWindow(); if (topFocusedWindowState == null) { if (DEBUG) { Slog.d(LOG_TAG, "top focused window is null, compute it again later"); Loading services/core/java/com/android/server/wm/RecentsAnimationController.java +11 −5 Original line number Diff line number Diff line Loading @@ -568,8 +568,9 @@ public class RecentsAnimationController implements DeathRecipient { ? mMinimizedHomeBounds : null; final Rect contentInsets; if (mTargetActivityRecord != null && mTargetActivityRecord.findMainWindow() != null) { contentInsets = mTargetActivityRecord.findMainWindow() final WindowState targetAppMainWindow = getTargetAppMainWindow(); if (targetAppMainWindow != null) { contentInsets = targetAppMainWindow .getInsetsStateWithVisibilityOverride() .calculateInsets(mTargetActivityRecord.getBounds(), Type.systemBars(), false /* ignoreVisibility */); Loading Loading @@ -1004,9 +1005,7 @@ public class RecentsAnimationController implements DeathRecipient { boolean updateInputConsumerForApp(InputWindowHandle inputWindowHandle) { // Update the input consumer touchable region to match the target app main window final WindowState targetAppMainWindow = mTargetActivityRecord != null ? mTargetActivityRecord.findMainWindow() : null; final WindowState targetAppMainWindow = getTargetAppMainWindow(); if (targetAppMainWindow != null) { targetAppMainWindow.getBounds(mTmpRect); inputWindowHandle.touchableRegion.set(mTmpRect); Loading @@ -1026,6 +1025,13 @@ public class RecentsAnimationController implements DeathRecipient { return mTargetActivityRecord.windowsCanBeWallpaperTarget(); } WindowState getTargetAppMainWindow() { if (mTargetActivityRecord == null) { return null; } return mTargetActivityRecord.findMainWindow(); } boolean isAnimatingTask(Task task) { for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { if (task == mPendingAnimations.get(i).mTask) { Loading Loading
services/core/java/com/android/server/wm/AccessibilityController.java +9 −4 Original line number Diff line number Diff line Loading @@ -1511,10 +1511,15 @@ final class AccessibilityController { IBinder topFocusedWindowToken = null; synchronized (mService.mGlobalLock) { // Do not send the windows if there is no top focus as // the window manager is still looking for where to put it. // We will do the work when we get a focus change callback. final WindowState topFocusedWindowState = getTopFocusWindow(); // If there is a recents animation running, then use the animation target as the // top window state. Otherwise,do not send the windows if there is no top focus as // the window manager is still looking for where to put it. We will do the work when // we get a focus change callback. final RecentsAnimationController controller = mService.getRecentsAnimationController(); final WindowState topFocusedWindowState = controller != null ? controller.getTargetAppMainWindow() : getTopFocusWindow(); if (topFocusedWindowState == null) { if (DEBUG) { Slog.d(LOG_TAG, "top focused window is null, compute it again later"); Loading
services/core/java/com/android/server/wm/RecentsAnimationController.java +11 −5 Original line number Diff line number Diff line Loading @@ -568,8 +568,9 @@ public class RecentsAnimationController implements DeathRecipient { ? mMinimizedHomeBounds : null; final Rect contentInsets; if (mTargetActivityRecord != null && mTargetActivityRecord.findMainWindow() != null) { contentInsets = mTargetActivityRecord.findMainWindow() final WindowState targetAppMainWindow = getTargetAppMainWindow(); if (targetAppMainWindow != null) { contentInsets = targetAppMainWindow .getInsetsStateWithVisibilityOverride() .calculateInsets(mTargetActivityRecord.getBounds(), Type.systemBars(), false /* ignoreVisibility */); Loading Loading @@ -1004,9 +1005,7 @@ public class RecentsAnimationController implements DeathRecipient { boolean updateInputConsumerForApp(InputWindowHandle inputWindowHandle) { // Update the input consumer touchable region to match the target app main window final WindowState targetAppMainWindow = mTargetActivityRecord != null ? mTargetActivityRecord.findMainWindow() : null; final WindowState targetAppMainWindow = getTargetAppMainWindow(); if (targetAppMainWindow != null) { targetAppMainWindow.getBounds(mTmpRect); inputWindowHandle.touchableRegion.set(mTmpRect); Loading @@ -1026,6 +1025,13 @@ public class RecentsAnimationController implements DeathRecipient { return mTargetActivityRecord.windowsCanBeWallpaperTarget(); } WindowState getTargetAppMainWindow() { if (mTargetActivityRecord == null) { return null; } return mTargetActivityRecord.findMainWindow(); } boolean isAnimatingTask(Task task) { for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { if (task == mPendingAnimations.get(i).mTask) { Loading