Loading core/api/current.txt +8 −0 Original line number Diff line number Diff line Loading @@ -4023,6 +4023,7 @@ package android.app { method public void onPictureInPictureModeChanged(boolean, android.content.res.Configuration); method @Deprecated public void onPictureInPictureModeChanged(boolean); method public boolean onPictureInPictureRequested(); method public void onPictureInPictureUiStateChanged(@NonNull android.app.PictureInPictureUiState); method @CallSuper protected void onPostCreate(@Nullable android.os.Bundle); method public void onPostCreate(@Nullable android.os.Bundle, @Nullable android.os.PersistableBundle); method @CallSuper protected void onPostResume(); Loading Loading @@ -6415,6 +6416,13 @@ package android.app { method public android.app.PictureInPictureParams.Builder setSourceRectHint(android.graphics.Rect); } public final class PictureInPictureUiState implements android.os.Parcelable { method public int describeContents(); method public boolean isStashed(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.app.PictureInPictureUiState> CREATOR; } public class Presentation extends android.app.Dialog { ctor public Presentation(android.content.Context, android.view.Display); ctor public Presentation(android.content.Context, android.view.Display, int); core/api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -347,6 +347,10 @@ package android.app { method public boolean isSeamlessResizeEnabled(); } public final class PictureInPictureUiState implements android.os.Parcelable { ctor public PictureInPictureUiState(boolean); } public class StatusBarManager { method public void clickNotification(@Nullable String, int, int, boolean); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void collapsePanels(); Loading core/java/android/app/Activity.java +23 −0 Original line number Diff line number Diff line Loading @@ -2812,6 +2812,29 @@ public class Activity extends ContextThemeWrapper onPictureInPictureModeChanged(isInPictureInPictureMode); } /** * Called by the system when the activity is in PiP and has state changes. * * Compare to {@link #onPictureInPictureModeChanged(boolean, Configuration)}, which is only * called when PiP mode changes (meaning, enters or exits PiP), this can be called at any time * while the activity is in PiP mode. Therefore, all invocation can only happen after * {@link #onPictureInPictureModeChanged(boolean, Configuration)} is called with true, and * before {@link #onPictureInPictureModeChanged(boolean, Configuration)} is called with false. * You would not need to worry about cases where this is called and the activity is not in * Picture-In-Picture mode. For managing cases where the activity enters/exits * Picture-in-Picture (e.g. resources clean-up on exit), use * {@link #onPictureInPictureModeChanged(boolean, Configuration)}. * * The default state is everything declared in {@link PictureInPictureUiState} is false, such as * {@link PictureInPictureUiState#isStashed()}. * * @param pipState the new Picture-in-Picture state. */ public void onPictureInPictureUiStateChanged(@NonNull PictureInPictureUiState pipState) { // Left deliberately empty. There should be no side effects if a direct // subclass of Activity does not call super. } /** * Called by the system when the activity changes to and from picture-in-picture mode. * Loading core/java/android/app/ActivityThread.java +6 −0 Original line number Diff line number Diff line Loading @@ -3999,6 +3999,12 @@ public final class ActivityThread extends ClientTransactionHandler } } @Override public void handlePictureInPictureStateChanged(@NonNull ActivityClientRecord r, PictureInPictureUiState pipState) { r.activity.onPictureInPictureUiStateChanged(pipState); } /** * Register a splash screen manager to this process. */ Loading core/java/android/app/ClientTransactionHandler.java +4 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,10 @@ public abstract class ClientTransactionHandler { /** Request that an activity enter picture-in-picture. */ public abstract void handlePictureInPictureRequested(@NonNull ActivityClientRecord r); /** Signal to an activity (that is currently in PiP) of PiP state changes. */ public abstract void handlePictureInPictureStateChanged(@NonNull ActivityClientRecord r, PictureInPictureUiState pipState); /** Whether the activity want to handle splash screen exit animation */ public abstract boolean isHandleSplashScreenExit(@NonNull IBinder token); Loading Loading
core/api/current.txt +8 −0 Original line number Diff line number Diff line Loading @@ -4023,6 +4023,7 @@ package android.app { method public void onPictureInPictureModeChanged(boolean, android.content.res.Configuration); method @Deprecated public void onPictureInPictureModeChanged(boolean); method public boolean onPictureInPictureRequested(); method public void onPictureInPictureUiStateChanged(@NonNull android.app.PictureInPictureUiState); method @CallSuper protected void onPostCreate(@Nullable android.os.Bundle); method public void onPostCreate(@Nullable android.os.Bundle, @Nullable android.os.PersistableBundle); method @CallSuper protected void onPostResume(); Loading Loading @@ -6415,6 +6416,13 @@ package android.app { method public android.app.PictureInPictureParams.Builder setSourceRectHint(android.graphics.Rect); } public final class PictureInPictureUiState implements android.os.Parcelable { method public int describeContents(); method public boolean isStashed(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.app.PictureInPictureUiState> CREATOR; } public class Presentation extends android.app.Dialog { ctor public Presentation(android.content.Context, android.view.Display); ctor public Presentation(android.content.Context, android.view.Display, int);
core/api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -347,6 +347,10 @@ package android.app { method public boolean isSeamlessResizeEnabled(); } public final class PictureInPictureUiState implements android.os.Parcelable { ctor public PictureInPictureUiState(boolean); } public class StatusBarManager { method public void clickNotification(@Nullable String, int, int, boolean); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void collapsePanels(); Loading
core/java/android/app/Activity.java +23 −0 Original line number Diff line number Diff line Loading @@ -2812,6 +2812,29 @@ public class Activity extends ContextThemeWrapper onPictureInPictureModeChanged(isInPictureInPictureMode); } /** * Called by the system when the activity is in PiP and has state changes. * * Compare to {@link #onPictureInPictureModeChanged(boolean, Configuration)}, which is only * called when PiP mode changes (meaning, enters or exits PiP), this can be called at any time * while the activity is in PiP mode. Therefore, all invocation can only happen after * {@link #onPictureInPictureModeChanged(boolean, Configuration)} is called with true, and * before {@link #onPictureInPictureModeChanged(boolean, Configuration)} is called with false. * You would not need to worry about cases where this is called and the activity is not in * Picture-In-Picture mode. For managing cases where the activity enters/exits * Picture-in-Picture (e.g. resources clean-up on exit), use * {@link #onPictureInPictureModeChanged(boolean, Configuration)}. * * The default state is everything declared in {@link PictureInPictureUiState} is false, such as * {@link PictureInPictureUiState#isStashed()}. * * @param pipState the new Picture-in-Picture state. */ public void onPictureInPictureUiStateChanged(@NonNull PictureInPictureUiState pipState) { // Left deliberately empty. There should be no side effects if a direct // subclass of Activity does not call super. } /** * Called by the system when the activity changes to and from picture-in-picture mode. * Loading
core/java/android/app/ActivityThread.java +6 −0 Original line number Diff line number Diff line Loading @@ -3999,6 +3999,12 @@ public final class ActivityThread extends ClientTransactionHandler } } @Override public void handlePictureInPictureStateChanged(@NonNull ActivityClientRecord r, PictureInPictureUiState pipState) { r.activity.onPictureInPictureUiStateChanged(pipState); } /** * Register a splash screen manager to this process. */ Loading
core/java/android/app/ClientTransactionHandler.java +4 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,10 @@ public abstract class ClientTransactionHandler { /** Request that an activity enter picture-in-picture. */ public abstract void handlePictureInPictureRequested(@NonNull ActivityClientRecord r); /** Signal to an activity (that is currently in PiP) of PiP state changes. */ public abstract void handlePictureInPictureStateChanged(@NonNull ActivityClientRecord r, PictureInPictureUiState pipState); /** Whether the activity want to handle splash screen exit animation */ public abstract boolean isHandleSplashScreenExit(@NonNull IBinder token); Loading