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

Commit dd56135a authored by Hansong Zhang's avatar Hansong Zhang Committed by android-build-merger
Browse files

Merge "Enable HID Device Profile Service (1/2)" am: 85c7942a am: 26c7264b

am: 4fcc30a7

Change-Id: I60a76cbcd94fd46c7f30230e2971b6f2dec2e805
parents 6b029a22 4fcc30a7
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -332,6 +332,14 @@
                <action android:name="android.bluetooth.IBluetoothHidHost" />
            </intent-filter>
        </service>
        <service
            android:process="@string/process"
            android:name = ".hid.HidDeviceService"
            android:enabled="@bool/profile_supported_hid_device">
            <intent-filter>
                <action android:name="android.bluetooth.IBluetoothHidDevice" />
            </intent-filter>
        </service>
        <service
            android:process="@string/process"
            android:name = ".hdp.HealthService"
@@ -387,12 +395,5 @@
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator" />
        </service>
        <service
            android:name = ".hid.HidDeviceService"
            android:enabled="@bool/profile_supported_hid_device">
            <intent-filter>
                <action android:name="android.bluetooth.IBluetoothHidDevice" />
            </intent-filter>
        </service>
    </application>
</manifest>
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
    <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">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
+8 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ import java.util.NoSuchElementException;
public class HidDeviceService extends ProfileService {
    private static final boolean DBG = false;

    private static final String TAG = "BluetoothHidDeviceService";
    private static final String TAG = HidDeviceService.class.getSimpleName();

    private static final int MESSAGE_APPLICATION_STATE_CHANGED = 1;
    private static final int MESSAGE_CONNECT_STATE_CHANGED = 2;
@@ -581,6 +581,13 @@ public class HidDeviceService extends ProfileService {
        return true;
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.d(TAG, "Need to unregister app");
        unregisterApp(mAppConfig);
        return super.onUnbind(intent);
    }

    int getConnectionState(BluetoothDevice device) {
        if (mHidDevice != null && mHidDevice.equals(device)) {
            return mHidDeviceState;