Loading android/app/AndroidManifest.xml +20 −16 Original line number Diff line number Diff line Loading @@ -220,6 +220,26 @@ </intent-filter> </service> <!-- Human Interface Device (HID) host Profile Service --> <service android:process="@string/process" android:name="com.android.bluetooth.hid.HidHostService" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHidHost"/> </intent-filter> </service> <!-- Human Interface Device (HID) device Profile Service --> <service android:process="@string/process" android:name="com.android.bluetooth.hid.HidDeviceService" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHidDevice"/> </intent-filter> </service> <!-- Media Control Profile (MCP) server Profile Service --> <service android:process="@string/process" android:name="com.android.bluetooth.mcp.McpService" Loading Loading @@ -451,22 +471,6 @@ <action android:name="android.bluetooth.IBluetoothHeadset"/> </intent-filter> </service> <service android:process="@string/process" android:name=".hid.HidHostService" android:enabled="@bool/profile_supported_hid_host" android:exported="true"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHidHost"/> </intent-filter> </service> <service android:process="@string/process" android:name="com.android.bluetooth.hid.HidDeviceService" android:enabled="@bool/profile_supported_hid_device" android:exported="true"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHidDevice"/> </intent-filter> </service> <service android:process="@string/process" android:name="com.android.bluetooth.pan.PanService" Loading android/app/res/values/config.xml +0 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ <bool name="profile_supported_hs_hfp">true</bool> <bool name="profile_supported_hfpclient">false</bool> <bool name="profile_supported_hfp_incallservice">true</bool> <bool name="profile_supported_hid_host">true</bool> <bool name="profile_supported_opp">true</bool> <bool name="profile_supported_pan">true</bool> <bool name="profile_supported_pbap">true</bool> Loading @@ -26,7 +25,6 @@ <bool name="profile_supported_sap">false</bool> <bool name="profile_supported_pbapclient">false</bool> <bool name="profile_supported_mapmce">false</bool> <bool name="profile_supported_hid_device">true</bool> <!-- If true, we will require location to be enabled on the device to fire Bluetooth LE scan result callbacks in addition to having one Loading android/app/src/com/android/bluetooth/hid/HidDeviceService.java +5 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.os.IBinder; import android.os.Message; import android.os.Process; import android.os.RemoteException; import android.sysprop.BluetoothProperties; import android.util.Log; import com.android.bluetooth.BluetoothMetricsProto; Loading Loading @@ -85,6 +86,10 @@ public class HidDeviceService extends ProfileService { private HidDeviceServiceHandler mHandler; public static boolean isEnabled() { return BluetoothProperties.isProfileHidDeviceEnabled().orElse(false); } private class HidDeviceServiceHandler extends Handler { @Override public void handleMessage(Message msg) { Loading android/app/src/com/android/bluetooth/hid/HidHostService.java +5 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.os.UserHandle; import android.sysprop.BluetoothProperties; import android.util.Log; import androidx.annotation.VisibleForTesting; Loading Loading @@ -87,6 +88,10 @@ public class HidHostService extends ProfileService { classInitNative(); } public static boolean isEnabled() { return BluetoothProperties.isProfileHidHostEnabled().orElse(false); } @Override public IProfileServiceBinder initBinder() { return new BluetoothHidHostBinder(this); Loading android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class HidDeviceTest { public void setUp() throws Exception { mTargetContext = InstrumentationRegistry.getTargetContext(); Assume.assumeTrue("Ignore test when HidDeviceService is not enabled", mTargetContext.getResources().getBoolean(R.bool.profile_supported_hid_device)); HidDeviceService.isEnabled()); if (Looper.myLooper() == null) { Looper.prepare(); } Loading Loading @@ -145,7 +145,7 @@ public class HidDeviceTest { @After public void tearDown() throws Exception { if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_hid_device)) { if (!HidDeviceService.isEnabled()) { return; } TestUtils.stopService(mServiceRule, HidDeviceService.class); Loading Loading
android/app/AndroidManifest.xml +20 −16 Original line number Diff line number Diff line Loading @@ -220,6 +220,26 @@ </intent-filter> </service> <!-- Human Interface Device (HID) host Profile Service --> <service android:process="@string/process" android:name="com.android.bluetooth.hid.HidHostService" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHidHost"/> </intent-filter> </service> <!-- Human Interface Device (HID) device Profile Service --> <service android:process="@string/process" android:name="com.android.bluetooth.hid.HidDeviceService" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHidDevice"/> </intent-filter> </service> <!-- Media Control Profile (MCP) server Profile Service --> <service android:process="@string/process" android:name="com.android.bluetooth.mcp.McpService" Loading Loading @@ -451,22 +471,6 @@ <action android:name="android.bluetooth.IBluetoothHeadset"/> </intent-filter> </service> <service android:process="@string/process" android:name=".hid.HidHostService" android:enabled="@bool/profile_supported_hid_host" android:exported="true"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHidHost"/> </intent-filter> </service> <service android:process="@string/process" android:name="com.android.bluetooth.hid.HidDeviceService" android:enabled="@bool/profile_supported_hid_device" android:exported="true"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHidDevice"/> </intent-filter> </service> <service android:process="@string/process" android:name="com.android.bluetooth.pan.PanService" Loading
android/app/res/values/config.xml +0 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ <bool name="profile_supported_hs_hfp">true</bool> <bool name="profile_supported_hfpclient">false</bool> <bool name="profile_supported_hfp_incallservice">true</bool> <bool name="profile_supported_hid_host">true</bool> <bool name="profile_supported_opp">true</bool> <bool name="profile_supported_pan">true</bool> <bool name="profile_supported_pbap">true</bool> Loading @@ -26,7 +25,6 @@ <bool name="profile_supported_sap">false</bool> <bool name="profile_supported_pbapclient">false</bool> <bool name="profile_supported_mapmce">false</bool> <bool name="profile_supported_hid_device">true</bool> <!-- If true, we will require location to be enabled on the device to fire Bluetooth LE scan result callbacks in addition to having one Loading
android/app/src/com/android/bluetooth/hid/HidDeviceService.java +5 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.os.IBinder; import android.os.Message; import android.os.Process; import android.os.RemoteException; import android.sysprop.BluetoothProperties; import android.util.Log; import com.android.bluetooth.BluetoothMetricsProto; Loading Loading @@ -85,6 +86,10 @@ public class HidDeviceService extends ProfileService { private HidDeviceServiceHandler mHandler; public static boolean isEnabled() { return BluetoothProperties.isProfileHidDeviceEnabled().orElse(false); } private class HidDeviceServiceHandler extends Handler { @Override public void handleMessage(Message msg) { Loading
android/app/src/com/android/bluetooth/hid/HidHostService.java +5 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.os.UserHandle; import android.sysprop.BluetoothProperties; import android.util.Log; import androidx.annotation.VisibleForTesting; Loading Loading @@ -87,6 +88,10 @@ public class HidHostService extends ProfileService { classInitNative(); } public static boolean isEnabled() { return BluetoothProperties.isProfileHidHostEnabled().orElse(false); } @Override public IProfileServiceBinder initBinder() { return new BluetoothHidHostBinder(this); Loading
android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class HidDeviceTest { public void setUp() throws Exception { mTargetContext = InstrumentationRegistry.getTargetContext(); Assume.assumeTrue("Ignore test when HidDeviceService is not enabled", mTargetContext.getResources().getBoolean(R.bool.profile_supported_hid_device)); HidDeviceService.isEnabled()); if (Looper.myLooper() == null) { Looper.prepare(); } Loading Loading @@ -145,7 +145,7 @@ public class HidDeviceTest { @After public void tearDown() throws Exception { if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_hid_device)) { if (!HidDeviceService.isEnabled()) { return; } TestUtils.stopService(mServiceRule, HidDeviceService.class); Loading