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

Commit 5b334b53 authored by Thomas Stuart's avatar Thomas Stuart
Browse files

fix NPE in CallLog.AddCallParametersBuilder#setAssertedDisplayName

It appears some backup & restore CallLog tests are populating setAssertedDisplayName with
a null object. This is causing a NPE to occur.  This XS-CL fixes the NPE.

Fixes: 327754873
Test: existing CTS Coverage
Change-Id: Icebb86bfbecbf2bfce2ca118c5e8ffa21f2db392
(cherry picked from commit 30ef1129)
parent ed6f98ac
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -667,7 +667,8 @@ public class CallLog {
            @FlaggedApi(Flags.FLAG_BUSINESS_CALL_COMPOSER)
            public @NonNull AddCallParametersBuilder setAssertedDisplayName(
                    String assertedDisplayName) {
                if (assertedDisplayName.length() > MAX_NUMBER_OF_CHARACTERS) {
                if (assertedDisplayName != null
                        && assertedDisplayName.length() > MAX_NUMBER_OF_CHARACTERS) {
                    throw new IllegalArgumentException("assertedDisplayName exceeds the character"
                            + " limit of " + MAX_NUMBER_OF_CHARACTERS + ".");
                }