Skip to content

Commit b88ea43

Browse files
committed
Merge branch 'archie94-pipmode_crash_fix'
2 parents 7279b76 + de5d2de commit b88ea43

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/org/havenapp/main/MonitorActivity.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.havenapp.main;
1818

1919
import android.Manifest;
20+
import android.app.PictureInPictureParams;
2021
import android.content.Intent;
2122
import android.content.pm.PackageManager;
2223
import android.content.res.Configuration;
@@ -312,8 +313,8 @@ private void initMonitor() {
312313
@Override
313314
public void onUserLeaveHint () {
314315
if (mIsMonitoring) {
315-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
316-
enterPictureInPictureMode();
316+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
317+
enterPictureInPictureMode(new PictureInPictureParams.Builder().build());
317318
}
318319
}
319320
}
@@ -324,8 +325,8 @@ public void onUserLeaveHint () {
324325
public void onBackPressed() {
325326

326327
if (mIsMonitoring) {
327-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
328-
enterPictureInPictureMode();
328+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
329+
enterPictureInPictureMode(new PictureInPictureParams.Builder().build());
329330
}
330331
else
331332
{

0 commit comments

Comments
 (0)