summaryrefslogtreecommitdiff
path: root/core/java/android/view/Window.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/Window.java')
-rw-r--r--core/java/android/view/Window.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index e3abb5d70031..e598113bb3b1 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -24,6 +24,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
import android.annotation.SystemApi;
+import android.app.ActivityManagerNative;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -1256,6 +1257,18 @@ public abstract class Window {
}
/**
+ * Puts the activity in picture-in-picture mode.
+ * @see android.R.attr#supportsPictureInPicture
+ * @hide
+ */
+ protected void enterPictureInPictureMode() {
+ try {
+ ActivityManagerNative.getDefault().enterPictureInPictureMode(mAppToken);
+ } catch (IllegalArgumentException|RemoteException e) {
+ }
+ }
+
+ /**
* Convenience for
* {@link #setContentView(View, android.view.ViewGroup.LayoutParams)}
* to set the screen content from a layout resource. The resource will be