mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-26 23:25:20 +03:00
Merge pull request #1685 from nextcloud/bugfix/1677/fixStartVideocall
add workaround to start videocalls when PIP is disabled
This commit is contained in:
commit
0fba973a43
1 changed files with 12 additions and 1 deletions
|
@ -22,12 +22,15 @@ public abstract class CallBaseActivity extends BaseActivity {
|
|||
|
||||
public PictureInPictureParams.Builder mPictureInPictureParamsBuilder;
|
||||
public Boolean isInPipMode = false;
|
||||
long onCreateTime;
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
onCreateTime = System.currentTimeMillis();
|
||||
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dismissKeyguard();
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
|
@ -88,7 +91,15 @@ public abstract class CallBaseActivity extends BaseActivity {
|
|||
|
||||
@Override
|
||||
protected void onUserLeaveHint() {
|
||||
enterPipMode();
|
||||
long onUserLeaveHintTime = System.currentTimeMillis();
|
||||
long diff = onUserLeaveHintTime - onCreateTime;
|
||||
Log.d(TAG, "onUserLeaveHintTime - onCreateTime: " + diff);
|
||||
|
||||
if (diff < 3000) {
|
||||
Log.d(TAG, "enterPipMode skipped");
|
||||
} else {
|
||||
enterPipMode();
|
||||
}
|
||||
}
|
||||
|
||||
void enterPipMode() {
|
||||
|
|
Loading…
Reference in a new issue