Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0671e42c authored by Hall Liu's avatar Hall Liu
Browse files

Turn on phone acct suggestions

Enable the logic that calls the phone acct suggestion service and the
logic that sends the suggestions to dialer.

Bug: 111455117
Test: CTS
Change-Id: I5cd34cdf62447b4b5c394d16d44ce4b4e05489d7
parent 9c05eef2
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -1337,15 +1337,8 @@ public class CallsManager extends Call.ListenerBase
                        return CompletableFuture.completedFuture(
                                Collections.singletonList(suggestion));
                    }
                    return CompletableFuture.completedFuture(
                            potentialPhoneAccounts.stream().map(phoneAccountHandle ->
                            new PhoneAccountSuggestion(phoneAccountHandle,
                                    PhoneAccountSuggestion.REASON_NONE, false)
                    ).collect(Collectors.toList()));
                    /* TODO -- turn this on after tests/debugging are done
                    return PhoneAccountSuggestionHelper.bindAndGetSuggestions(mContext,
                            finalCall.getHandle(), potentialPhoneAccounts);
                            */
                }, new LoggedHandlerExecutor(outgoingCallHandler, "CM.cOCSS"));


@@ -1431,6 +1424,9 @@ public class CallsManager extends Call.ListenerBase
                            newExtras.putParcelableList(
                                    android.telecom.Call.AVAILABLE_PHONE_ACCOUNTS,
                                    accountsFromSuggestions);
                            newExtras.putParcelableList(
                                    android.telecom.Call.EXTRA_SUGGESTED_PHONE_ACCOUNTS,
                                    accountSuggestions);
                            // Set a future in place so that we can proceed once the dialer replies.
                            mPendingAccountSelection = new CompletableFuture<>();
                            callToPlace.setIntentExtras(newExtras);