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

Commit 0079dd11 authored by Grant Menke's avatar Grant Menke
Browse files

Guard putParcelableArrayList with flag.

This CL guards the update to use putParcelableArrayList with the appropriate flag.

Test: atest CallsManagerTest
Bug: 307786404
Flag: com.android.server.telecom.flags.resolve_hidden_dependencies_two
Change-Id: I774493301bfe1e983361938e3988d8facd5ec30c
parent f709a68d
Loading
Loading
Loading
Loading
+28 −13
Original line number Diff line number Diff line
@@ -2429,6 +2429,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()
@@ -2442,6 +2443,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<>());