mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Show calling service notification immediately.
This commit is contained in:
committed by
Alex Hart
parent
652d0d46ed
commit
26a84c5546
@@ -116,6 +116,8 @@ public final class WebRtcCallService extends Service implements SignalAudioManag
|
||||
public void onCreate() {
|
||||
Log.v(TAG, "onCreate");
|
||||
super.onCreate();
|
||||
startForegroundCompat(CallNotificationBuilder.getStartingStoppingNotificationId(), CallNotificationBuilder.getStartingNotification(this));
|
||||
|
||||
this.callManager = ApplicationDependencies.getSignalCallManager();
|
||||
this.hangUpRtcOnDeviceCallAnswered = new HangUpRtcOnPstnCallAnsweredListener();
|
||||
this.lastNotificationId = INVALID_NOTIFICATION_ID;
|
||||
@@ -203,7 +205,7 @@ public final class WebRtcCallService extends Service implements SignalAudioManag
|
||||
startForegroundCompat(lastNotificationId, lastNotification);
|
||||
} else {
|
||||
Log.w(TAG, "Service running without having called start first, show temp notification and terminate service.");
|
||||
startForegroundCompat(CallNotificationBuilder.getStoppingNotificationId(), CallNotificationBuilder.getStoppingNotification(this));
|
||||
startForegroundCompat(CallNotificationBuilder.getStartingStoppingNotificationId(), CallNotificationBuilder.getStoppingNotification(this));
|
||||
stop();
|
||||
}
|
||||
}
|
||||
@@ -280,6 +282,7 @@ public final class WebRtcCallService extends Service implements SignalAudioManag
|
||||
callManager.onBluetoothPermissionDenied();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private class HangUpRtcOnPstnCallAnsweredListener extends PhoneStateListener {
|
||||
@Override
|
||||
public void onCallStateChanged(int state, @NonNull String phoneNumber) {
|
||||
|
||||
Reference in New Issue
Block a user