diff options
author | Hernán Castañón Álvarez <herna@paranoidandroid.co> | 2022-04-18 23:52:26 +0200 |
---|---|---|
committer | Hernán Castañón Álvarez <herna@paranoidandroid.co> | 2022-04-18 23:54:29 +0200 |
commit | 60d024ea76cde067bde51b6b9a01602526c97470 (patch) | |
tree | 5a6e086de8c20870f69be2b437066679bc979355 | |
parent | 541d3a98acde57d6522932393a95ff74566f4462 (diff) |
Revert "Added new API's for call events"
This reverts commit d3b6ecc2920eaf4f4b9efd9e95fd87dad7a62f65.
Change-Id: I1839cf96a080b6d4874124a5bab6506a62d829e9
-rw-r--r-- | src/com/android/bluetooth/hfp/HeadsetService.java | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/src/com/android/bluetooth/hfp/HeadsetService.java b/src/com/android/bluetooth/hfp/HeadsetService.java index 621c11562..ac9a6c29c 100644 --- a/src/com/android/bluetooth/hfp/HeadsetService.java +++ b/src/com/android/bluetooth/hfp/HeadsetService.java @@ -998,6 +998,11 @@ public class HeadsetService extends ProfileService { @Override public void phoneStateChanged(int numActive, int numHeld, int callState, String number, int type, String name, AttributionSource source) { + HeadsetService service = getService(source); + if (service == null) { + return; + } + service.phoneStateChanged(numActive, numHeld, callState, number, type, name, false); if (ApmConstIntf.getLeAudioEnabled()) { Log.d(TAG, "Adv Audio enabled: phoneStateChanged"); CallControlIntf mCallControl = CallControlIntf.get(); @@ -1014,6 +1019,11 @@ public class HeadsetService extends ProfileService { CallControlIntf mCallControl = CallControlIntf.get(); mCallControl.clccResponse(index, direction, status, mode, mpty, number, type); } + HeadsetService service = getService(source); + if (service == null) { + return; + } + service.clccResponse(index, direction, status, mode, mpty, number, type); } @Override @@ -1061,25 +1071,24 @@ public class HeadsetService extends ProfileService { return service.isInbandRingingEnabled(); } - @Override public void phoneStateChangedDsDa(int numActive, int numHeld, int callState, String number, int type, String name, AttributionSource source) { - HeadsetService service = getService(source); - if (service == null) { - return; - } - service.phoneStateChanged(numActive, numHeld, callState, number, type, name, false); - } - - @Override - public void clccResponseDsDa(int index, int direction, int status, int mode, boolean mpty, - String number, int type, AttributionSource source) { - HeadsetService service = getService(source); - if (service == null) { - return; - } - service.clccResponse(index, direction, status, mode, mpty, number, type); - } + HeadsetService service = getService(source); + if (service == null) { + return; + } + service.phoneStateChanged(numActive, numHeld, callState, number, type, name, false); + } + + public void clccResponseDsDa(int index, int direction, int status, int mode, boolean mpty, + String number, int type, AttributionSource source) { + + HeadsetService service = getService(source); + if (service == null) { + return; + } + service.clccResponse(index, direction, status, mode, mpty, number, type); + } } // API methods |