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:
parent
65619bd64d
commit
5be58228a1
2 changed files with 6 additions and 8 deletions
|
@ -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,
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue