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

Commit c34eec28 authored by Nate Myren's avatar Nate Myren
Browse files

Move associate user setting into Call creation

Rather than add the user to extras when unparcelling a Parcelable, put
it into the method where a Call.Details is created

Fixes: 402432822
Flag: EXEMPT minor refactor
Test: atest EnhancedConfirmationInCallTest
Change-Id: Iae44968a08090d9ae9a7673eb948c86768c19c99
parent 31d71959
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.content.pm.ServiceInfo;
import android.net.Uri;
import android.os.BadParcelableException;
@@ -1174,6 +1175,10 @@ public final class Call {
                int callerNumberVerificationStatus,
                Uri contactPhotoUri,
                UserHandle originatingUser) {
            if (extras == null) {
                extras = new Bundle();
            }
            extras.putParcelable(Intent.EXTRA_USER_HANDLE, originatingUser);
            mState = state;
            mTelecomCallId = telecomCallId;
            mHandle = handle;
+0 −5
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package android.telecom;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
@@ -687,9 +686,6 @@ public final class ParcelableCall implements Parcelable {
            source.readList(conferenceableCallIds, classLoader, java.lang.String.class);
            Bundle intentExtras = source.readBundle(classLoader);
            Bundle extras = source.readBundle(classLoader);
            if (extras == null) {
                extras = new Bundle();
            }
            int supportedAudioRoutes = source.readInt();
            boolean isRttCallChanged = source.readByte() == 1;
            ParcelableRttCall rttCall = source.readParcelable(classLoader, android.telecom.ParcelableRttCall.class);
@@ -700,7 +696,6 @@ public final class ParcelableCall implements Parcelable {
            String activeChildCallId = source.readString();
            Uri contactPhotoUri = source.readParcelable(classLoader, Uri.class);
            UserHandle associatedUser = source.readParcelable(classLoader, UserHandle.class);
            extras.putParcelable(Intent.EXTRA_USER_HANDLE, associatedUser);
            return new ParcelableCallBuilder()
                    .setId(id)
                    .setState(state)