Compare commits

..

3 commits

Author SHA1 Message Date
Peter Cai 5e8d51db9f ConnectionService: miscellaneous fixes
* Fix a few potential errors due to the use of newer APIs (minSDK is
  still only 24)
* Fix one remaining case of raw usage of generic types.
2022-03-11 22:44:21 -05:00
Peter Cai faab2d5799 ConnectionService: Dialer UI integration for incoming calls
For incoming calls, we fall back to the built-in call UI if the
microphone permission is not granted. The reason is that if the Dialer
UI is displayed over keyguard, then the user may not even be able to see
the notification that we show in order for them to grant the permission.
Having a small annoyance for the first incoming call is better than
having the in-call UI hang.
2022-03-11 22:44:17 -05:00
Peter Cai b7b2bb0cdd ConnectionService: fix unchecked type assignments 2022-03-11 21:44:57 -05:00
2 changed files with 1 additions and 8 deletions

View file

@ -274,13 +274,6 @@ public class ConnectionService extends android.telecom.ConnectionService {
rtpConnection.get().acceptCall();
}
@Override
public void onReject() {
this.rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId);
rtpConnection.get().rejectCall();
setDisconnected(new DisconnectCause(DisconnectCause.LOCAL));
}
@Override
public void onDisconnect() {
if (rtpConnection == null || rtpConnection.get() == null) {

View file

@ -276,7 +276,7 @@ public class EnterJidDialog extends DialogFragment implements OnBackendConnected
if (type != null && (type.equals("pstn") || type.equals("sms"))) {
try {
binding.jid.setText(PhoneNumberUtilWrapper.normalize(getActivity(), binding.jid.getText().toString()));
} catch (NumberParseException | IllegalArgumentException | NullPointerException e) { }
} catch (NumberParseException | NullPointerException e) { }
}
if (p == null) {