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

Commit dc52a4b2 authored by Grant Menke's avatar Grant Menke Committed by Android (Google) Code Review
Browse files

Merge "Guard putParcelableArrayList with flag." into main

parents 7e5e5718 0079dd11
Loading
Loading
Loading
Loading
+28 −13
Original line number Diff line number Diff line
@@ -2450,6 +2450,7 @@ public class CallsManager extends Call.ListenerBase
                                    "needs account selection");
                            // Create our own instance to modify (since extras may be Bundle.EMPTY)
                            Bundle newExtras = new Bundle(extras);
                            if (mFeatureFlags.resolveHiddenDependenciesTwo()) {
                                ArrayList<PhoneAccountHandle> accountsFromSuggestions =
                                        accountSuggestions
                                                .stream()
@@ -2463,6 +2464,20 @@ public class CallsManager extends Call.ListenerBase
                                newExtras.putParcelableArrayList(
                                        android.telecom.Call.EXTRA_SUGGESTED_PHONE_ACCOUNTS,
                                        accountSuggestionArrayList);
                            } else {
                                // Legacy path:
                                List<PhoneAccountHandle> accountsFromSuggestions =
                                        accountSuggestions
                                        .stream()
                                        .map(PhoneAccountSuggestion::getPhoneAccountHandle)
                                        .collect(Collectors.toList());
                                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.put(callToPlace.getId(),
                                    new CompletableFuture<>());