1
0
Fork 1

Always try dialler integration if enabled

Whereas call integration (true self managed) sometimes is blacklisted.

(cherry picked from commit cd0262f178ea098e842ff9f155b56afd6bfc41bd)
This commit is contained in:
Stephen Paul Weber 2024-11-02 21:11:43 -05:00 committed by Arne
parent 65619bd64d
commit 5be58228a1
2 changed files with 6 additions and 8 deletions

View file

@ -394,7 +394,7 @@ public class CallIntegrationConnectionService extends ConnectionService {
private static ArrayList<PhoneAccountHandle> findPhoneAccount(final Context context, final AbstractJingleConnection.Id id) {
final var def = CallIntegrationConnectionService.getHandle(context, id.account);
final var lst = new ArrayList<PhoneAccountHandle>();
lst.add(def);
if (CallIntegration.selfManaged(context)) lst.add(def);
if (Build.VERSION.SDK_INT < 23) return lst;
final var prefs = PreferenceManager.getDefaultSharedPreferences(context);
@ -433,7 +433,8 @@ public class CallIntegrationConnectionService extends ConnectionService {
public static boolean addNewIncomingCall(
final Context context, final AbstractJingleConnection.Id id) {
if (NotificationService.isQuietHours(context, id.getContact().getAccount())) return true;
if (CallIntegration.notSelfManaged(context)) {
final var phoneAccountHandles = findPhoneAccount(context, id);
if (phoneAccountHandles.isEmpty()) {
Log.d(
Config.LOGTAG,
"not adding incoming call to TelecomManager on Android "
@ -441,9 +442,8 @@ public class CallIntegrationConnectionService extends ConnectionService {
+ " ("
+ Build.DEVICE
+ ")");
return true;
return false;
}
final var phoneAccountHandles = findPhoneAccount(context, id);
final var bundle = new Bundle();
bundle.putString(
TelecomManager.EXTRA_INCOMING_CALL_ADDRESS,

View file

@ -1702,10 +1702,8 @@ public class JingleRtpConnection extends AbstractJingleConnection
ringingTimeoutFuture =
jingleConnectionManager.schedule(
this::ringingTimeout, BUSY_TIME_OUT, TimeUnit.SECONDS);
if (CallIntegration.selfManaged(xmppConnectionService)) {
if (CallIntegrationConnectionService.addNewIncomingCall(xmppConnectionService, getId())) {
return;
}
if (CallIntegrationConnectionService.addNewIncomingCall(xmppConnectionService, getId())) {
return;
}
xmppConnectionService.getNotificationService().startRinging(id, getMedia());
}