Implement initial support for foldables in calling.

This commit is contained in:
Alex Hart
2021-07-23 13:48:09 -03:00
committed by Greyson Parrelli
parent 927b6096c6
commit 5229e24397
20 changed files with 590 additions and 126 deletions

View File

@@ -1,7 +1,9 @@
package org.thoughtcrime.securesms.messagerequests;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -44,11 +46,17 @@ public class CalleeMustAcceptMessageRequestActivity extends BaseActivity {
return intent;
}
@SuppressLint("SourceLockedOrientationActivity")
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.callee_must_accept_message_request_dialog_fragment);
boolean callingFixedToPortrait = getResources().getConfiguration().densityDpi < 480;
if (callingFixedToPortrait) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
description = findViewById(R.id.description);
avatar = findViewById(R.id.avatar);
okay = findViewById(R.id.okay);