Add logging around how call activity is started.

fork-5.53.8
Cody Henthorne 2022-08-17 16:31:45 -04:00
rodzic b1d1e92dbb
commit 84717b95f7
3 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -107,6 +107,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
public static final String END_CALL_ACTION = WebRtcCallActivity.class.getCanonicalName() + ".END_CALL_ACTION";
public static final String EXTRA_ENABLE_VIDEO_IF_AVAILABLE = WebRtcCallActivity.class.getCanonicalName() + ".ENABLE_VIDEO_IF_AVAILABLE";
public static final String EXTRA_STARTED_FROM_FULLSCREEN = WebRtcCallActivity.class.getCanonicalName() + ".STARTED_FROM_FULLSCREEN";
private CallParticipantsListUpdatePopupWindow participantUpdateWindow;
private WifiToCellularPopupWindow wifiToCellularPopupWindow;
@ -133,7 +134,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
@SuppressLint("SourceLockedOrientationActivity")
@Override
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "onCreate()");
Log.i(TAG, "onCreate(" + getIntent().getBooleanExtra(EXTRA_STARTED_FROM_FULLSCREEN, false) + ")");
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
super.onCreate(savedInstanceState);
@ -189,7 +190,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
@Override
public void onNewIntent(Intent intent) {
Log.i(TAG, "onNewIntent");
Log.i(TAG, "onNewIntent(" + intent.getBooleanExtra(EXTRA_STARTED_FROM_FULLSCREEN, false) + ")");
super.onNewIntent(intent);
processIntent(intent);
}

Wyświetl plik

@ -819,6 +819,7 @@ private void processStateless(@NonNull Function1<WebRtcEphemeralState, WebRtcEph
WebRtcViewModel.GroupCallState groupCallState = s.getCallInfoState().getGroupCallState();
if (callState == CALL_INCOMING && (groupCallState == IDLE || groupCallState.isRinging())) {
Log.i(TAG, "Starting call activity from foreground listener");
startCallCardActivityIfPossible();
}
ApplicationDependencies.getAppForegroundObserver().removeListener(this);

Wyświetl plik

@ -39,6 +39,7 @@ public class CallNotificationBuilder {
public static Notification getCallInProgressNotification(Context context, int type, Recipient recipient) {
Intent contentIntent = new Intent(context, WebRtcCallActivity.class);
contentIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
contentIntent.putExtra(WebRtcCallActivity.EXTRA_STARTED_FROM_FULLSCREEN, true);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, contentIntent, 0);