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

Commit dd8c4d54 authored by Qing Zhong's avatar Qing Zhong Committed by Automerger Merge Worker
Browse files

Merge "Prevent null pointer exception in getCurrentCall method" am: 4f0f737e

parents 377b8376 4f0f737e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -608,10 +608,12 @@ public class HeadsetClientService extends ProfileService {
                List<BluetoothHeadsetClientCall> defaultValue = new ArrayList<>();
                if (service != null) {
                    List<HfpClientCall> calls = service.getCurrentCalls(device);
                    if (calls != null) {
                        for (HfpClientCall call : calls) {
                            defaultValue.add(toLegacyCall(call));
                        }
                    }
                }
                receiver.send(defaultValue);
            } catch (RuntimeException e) {
                receiver.propagateException(e);