Update API for Activity in bubble check.
This commit is contained in:
parent
1c80e65c5a
commit
908f952893
2 changed files with 10 additions and 10 deletions
|
@ -3,8 +3,13 @@ package org.thoughtcrime.securesms.conversation;
|
|||
/**
|
||||
* Activity which encapsulates a conversation for a Bubble window.
|
||||
*
|
||||
* This activity is empty, and exists so that we can override some of its manifest parameters
|
||||
* without clashing with ConversationActivity.
|
||||
* This activity exists so that we can override some of its manifest parameters
|
||||
* without clashing with {@link ConversationActivity} and provide an API-level
|
||||
* independent "is in bubble?" check.
|
||||
*/
|
||||
public class BubbleConversationActivity extends ConversationActivity {
|
||||
@Override
|
||||
protected boolean isInBubble() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ import android.widget.Toast;
|
|||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.WorkerThread;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
@ -2083,14 +2084,8 @@ public class ConversationActivity extends PassphraseRequiredActivity
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isInBubble() {
|
||||
if (Build.VERSION.SDK_INT >= ConversationUtil.CONVERSATION_SUPPORT_VERSION) {
|
||||
Display display = getDisplay();
|
||||
|
||||
return display != null && display.getDisplayId() != Display.DEFAULT_DISPLAY;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
protected boolean isInBubble() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void initializeResources(@NonNull ConversationIntents.Args args) {
|
||||
|
|
Loading…
Add table
Reference in a new issue