<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<manifest xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <!-- Define that the app uses CDM -->
    <uses-feature android:name="android.software.companion_device_setup" />

    <!-- Only needed to connect to the device once associated -->
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

    <!-- Needed if we want to be notified when an associated device is in range -->
    <uses-permission android:name="android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE" />

    <!-- Not required by CDM but we use it for notifying when device is in range -->
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

    <application>

        <service
            android:name="com.example.platform.connectivity.bluetooth.cdm.CompanionDeviceSampleService"
            android:exported="true"
            android:permission="android.permission.BIND_COMPANION_DEVICE_SERVICE"
            tools:targetApi="s">
            <intent-filter>
                <action android:name="android.companion.CompanionDeviceService" />
            </intent-filter>
        </service>
    </application>

</manifest>
