Loading res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,9 @@ <!-- For enabling the hfp client connection service --> <bool name="hfp_client_connection_service_enabled">false</bool> <!-- For supporting emergency call through the hfp client connection service --> <bool name="hfp_client_connection_service_support_emergency_call">false</bool> <!-- Enabling autoconnect over pan --> <bool name="config_bluetooth_pan_enable_autoconnect">true</bool> Loading src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionService.java +10 −1 Original line number Diff line number Diff line Loading @@ -328,10 +328,19 @@ public class HfpClientConnectionService extends ConnectionService { PhoneAccountHandle handle = new PhoneAccountHandle(new ComponentName(context, HfpClientConnectionService.class), device.getAddress()); int capabilities = PhoneAccount.CAPABILITY_CALL_PROVIDER; if (context.getApplicationContext().getResources().getBoolean( com.android.bluetooth.R.bool .hfp_client_connection_service_support_emergency_call)) { // Need to have an emergency call capability to place emergency call capabilities |= PhoneAccount.CAPABILITY_PLACE_EMERGENCY_CALLS; } PhoneAccount account = new PhoneAccount.Builder(handle, "HFP " + device.toString()).setAddress(addr) .setSupportedUriSchemes(Arrays.asList(PhoneAccount.SCHEME_TEL)) .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER) .setCapabilities(capabilities) .build(); if (DBG) { Log.d(TAG, "phoneaccount: " + account); Loading Loading
res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,9 @@ <!-- For enabling the hfp client connection service --> <bool name="hfp_client_connection_service_enabled">false</bool> <!-- For supporting emergency call through the hfp client connection service --> <bool name="hfp_client_connection_service_support_emergency_call">false</bool> <!-- Enabling autoconnect over pan --> <bool name="config_bluetooth_pan_enable_autoconnect">true</bool> Loading
src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionService.java +10 −1 Original line number Diff line number Diff line Loading @@ -328,10 +328,19 @@ public class HfpClientConnectionService extends ConnectionService { PhoneAccountHandle handle = new PhoneAccountHandle(new ComponentName(context, HfpClientConnectionService.class), device.getAddress()); int capabilities = PhoneAccount.CAPABILITY_CALL_PROVIDER; if (context.getApplicationContext().getResources().getBoolean( com.android.bluetooth.R.bool .hfp_client_connection_service_support_emergency_call)) { // Need to have an emergency call capability to place emergency call capabilities |= PhoneAccount.CAPABILITY_PLACE_EMERGENCY_CALLS; } PhoneAccount account = new PhoneAccount.Builder(handle, "HFP " + device.toString()).setAddress(addr) .setSupportedUriSchemes(Arrays.asList(PhoneAccount.SCHEME_TEL)) .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER) .setCapabilities(capabilities) .build(); if (DBG) { Log.d(TAG, "phoneaccount: " + account); Loading