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

Commit 6f80c367 authored by twyen's avatar twyen Committed by Copybara-Service
Browse files

Check null for getPhoneAccount() in VoicemailChannelUtils

A phone account can be removed after calling getCallCapablePhoneAccounts(), so subsequent getPhoneAccount() can be null.

Bug: 75598828
Test: In a follow up CL, where all instance of these will be fixed.
PiperOrigin-RevId: 189635573
Change-Id: I897db6e8e7706bc8afe6f25d89fd2ca4405900df
parent d43f57ed
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -180,6 +180,9 @@ import java.util.Set;
      @NonNull Context context, @NonNull PhoneAccountHandle handle) {
    PhoneAccount phoneAccount =
        context.getSystemService(TelecomManager.class).getPhoneAccount(handle);
    if (phoneAccount == null) {
      return;
    }
    NotificationChannel channel =
        newChannel(context, getChannelIdForAccount(handle), phoneAccount.getLabel());
    migrateVoicemailSoundSettings(context, channel, handle);