diff options
| author | 2024-04-19 17:28:36 +0000 | |
|---|---|---|
| committer | 2024-04-19 17:28:36 +0000 | |
| commit | 4da92edd4c7e4f48570b5a69f570aabe1ed2480a (patch) | |
| tree | 8721470706b4b3968ea0b429e09f1281ab1de0d6 | |
| parent | 88fde31b24c53d7a085fa713aab7fb9c8b23f40c (diff) | |
Set isInPictureInPictureMode and isInMultiWindowMode before dispatching callbacks
Sets the values for isInPictureInPictureMode and isInMultiWindowMode before
dispatching callbacks so that calls to isInPictureInPictureMode and
isInMultiWindowMode return the proper value.
Bug: 335678264
Test: verify (isInPictureInPictureMode == isInPictureInPictureMode()) == true
Change-Id: I4c8ede3c38c4638052b675d76c198fad7e4f517d
| -rw-r--r-- | core/java/android/app/Activity.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index a5dd4a7207c3..0687fba5c6b2 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -9285,11 +9285,11 @@ public class Activity extends ContextThemeWrapper if (DEBUG_LIFECYCLE) Slog.v(TAG, "dispatchMultiWindowModeChanged " + this + ": " + isInMultiWindowMode + " " + newConfig); + mIsInMultiWindowMode = isInMultiWindowMode; mFragments.dispatchMultiWindowModeChanged(isInMultiWindowMode, newConfig); if (mWindow != null) { mWindow.onMultiWindowModeChanged(); } - mIsInMultiWindowMode = isInMultiWindowMode; onMultiWindowModeChanged(isInMultiWindowMode, newConfig); } @@ -9298,11 +9298,11 @@ public class Activity extends ContextThemeWrapper if (DEBUG_LIFECYCLE) Slog.v(TAG, "dispatchPictureInPictureModeChanged " + this + ": " + isInPictureInPictureMode + " " + newConfig); + mIsInPictureInPictureMode = isInPictureInPictureMode; mFragments.dispatchPictureInPictureModeChanged(isInPictureInPictureMode, newConfig); if (mWindow != null) { mWindow.onPictureInPictureModeChanged(isInPictureInPictureMode); } - mIsInPictureInPictureMode = isInPictureInPictureMode; onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig); } |