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

Commit fae32401 authored by Thomas Stuart's avatar Thomas Stuart
Browse files

fix NPE in VoipCallMonitor#stopFGSDelegation

Handle null return from account-to-calls map getter to prevent NPE

The code was throwing a NullPointerException when the account-to-calls
map's getter returned null for a given handle, indicating no calls were
associated with that handle.

This commit fixes the issue by adding an explicit null check before
iterating over the set of calls returned by the map. If the set is null,
the loop is skipped, preventing the NullPointerException.

Flag: com.android.server.telecom.flags.voip_call_monitor_refactor
Fixes: 389201983
Test: com.android.server.telecom.tests.VoipCallMonitorTest#
      testStopFgsDelegationWithoutAnyTrackedCalls
Change-Id: I8d6a9d5c2605fa3fcf7df80e1f89068afd553b9a
parent 74336399
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment