Skip to content

Commit

Permalink
Add logging around how call activity is started.
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-signal committed Aug 18, 2022
1 parent b1d1e92 commit 84717b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -133,7 +134,7 @@ protected void attachBaseContext(@NonNull Context newBase) {
@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);
Expand Down Expand Up @@ -189,7 +190,7 @@ public void onResume() {

@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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ public void onForeground() {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 84717b9

Please sign in to comment.