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

Commit 5fcf3f55 authored by Qing Zhong's avatar Qing Zhong Committed by Android (Google) Code Review
Browse files

Merge "Prevent null pointer exception in getCurrentCall method" into tm-qpr-dev

parents 04ca17d1 0851c8d5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -612,10 +612,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);