diff options
| author | Jaewan Kim <jaewan@google.com> | 2016-04-20 21:17:58 +0900 |
|---|---|---|
| committer | Jaewan Kim <jaewan@google.com> | 2016-04-26 13:06:21 +0900 |
| commit | f0fd218382b96f052d22a2e8ee00510cc23a6d1e (patch) | |
| tree | 6f269628812e7b1930ee891d8b43ffe31712b11e /core/java/android/view/Window.java | |
| parent | af8be42b9f6aa17c8d17d999b53227f0a1d6da5b (diff) | |
PIP: Send KEYCODE_WINDOW to app first if PIP isn't exist
Bug: 27954955
Change-Id: I517e378d5c1672ac0eb87bdf4375b7d733276e58
Diffstat (limited to 'core/java/android/view/Window.java')
| -rw-r--r-- | core/java/android/view/Window.java | 13 |
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 |
