Loading telecomm/java/android/telecom/Connection.java +16 −5 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; Loading Loading @@ -2531,11 +2532,21 @@ public abstract class Connection extends Conferenceable { */ public final void setCallerDisplayName(String callerDisplayName, int presentation) { checkImmutable(); Log.d(this, "setCallerDisplayName %s", callerDisplayName); boolean nameChanged = !Objects.equals(mCallerDisplayName, callerDisplayName); boolean presentationChanged = mCallerDisplayNamePresentation != presentation; if (nameChanged) { // Ensure the new name is not clobbering the old one with a null value due to the caller // wanting to only set the presentation and not knowing the display name. mCallerDisplayName = callerDisplayName; } if (presentationChanged) { mCallerDisplayNamePresentation = presentation; } if (nameChanged || presentationChanged) { for (Listener l : mListeners) { l.onCallerDisplayNameChanged(this, callerDisplayName, presentation); l.onCallerDisplayNameChanged(this, mCallerDisplayName, mCallerDisplayNamePresentation); } } } Loading Loading
telecomm/java/android/telecom/Connection.java +16 −5 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; Loading Loading @@ -2531,11 +2532,21 @@ public abstract class Connection extends Conferenceable { */ public final void setCallerDisplayName(String callerDisplayName, int presentation) { checkImmutable(); Log.d(this, "setCallerDisplayName %s", callerDisplayName); boolean nameChanged = !Objects.equals(mCallerDisplayName, callerDisplayName); boolean presentationChanged = mCallerDisplayNamePresentation != presentation; if (nameChanged) { // Ensure the new name is not clobbering the old one with a null value due to the caller // wanting to only set the presentation and not knowing the display name. mCallerDisplayName = callerDisplayName; } if (presentationChanged) { mCallerDisplayNamePresentation = presentation; } if (nameChanged || presentationChanged) { for (Listener l : mListeners) { l.onCallerDisplayNameChanged(this, callerDisplayName, presentation); l.onCallerDisplayNameChanged(this, mCallerDisplayName, mCallerDisplayNamePresentation); } } } Loading