<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2024 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
  ~
  ~      http://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:android="http://schemas.android.com/apk/res/android"
    package="com.android.adservices.servicecore.protectedaudience.unittest" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_ADSERVICES_CUSTOM_AUDIENCE" />

    <!-- Needed to schedule MDD jobs to persist across device reboots  -->
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

    <uses-permission android:name="android.permission.ACCESS_ADSERVICES_AD_ID" />
    <uses-permission android:name="android.permission.ACCESS_ADSERVICES_PROTECTED_SIGNALS" />

    <application android:debuggable="true" android:networkSecurityConfig="@xml/network_security_config">
        <uses-library android:name="android.ext.adservices" android:required="false" />

        <!-- CustomAudience Background Fetch Job -->
        <service android:name=
                     "com.android.adservices.service.customaudience.BackgroundFetchJobService"
                 android:permission="android.permission.BIND_JOB_SERVICE">
        </service>

        <!-- CustomAudience Schedule Custom Audience Update Job -->
        <service android:name=
                     "com.android.adservices.service.customaudience.ScheduleCustomAudienceUpdateJobService"
                 android:permission="android.permission.BIND_JOB_SERVICE">
        </service>

        <!-- PA Background Key Fetch Job -->
        <service android:name=
                     "com.android.adservices.service.adselection.encryption.BackgroundKeyFetchJobService"
                 android:permission="android.permission.BIND_JOB_SERVICE">
        </service>

        <!-- PA Ad selection debug report sender Job -->
        <service android:name=
                     "com.android.adservices.service.adselection.debug.DebugReportSenderJobService"
                 android:permission="android.permission.BIND_JOB_SERVICE">
        </service>

        <!-- PA KAnon sign join background job -->
        <service android:name=
                     "com.android.adservices.service.kanon.KAnonSignJoinBackgroundJobService"
                 android:permission="android.permission.BIND_JOB_SERVICE">
        </service>

        <!-- PA Protected Signals periodic encoding job -->
        <service android:name=
                     "com.android.adservices.service.signals.PeriodicEncodingJobService"
                 android:permission="android.permission.BIND_JOB_SERVICE">
        </service>

        <provider
            android:name="com.android.adservices.common.AdServicesTestingProvider"
            android:authorities="${applicationId}.com.android.adservices.provider.testing"
            android:exported="false"
        />
    </application>
    <instrumentation
        android:name="androidx.test.runner.AndroidJUnitRunner"
        android:targetPackage="com.android.adservices.servicecore.protectedaudience.unittest" >
    </instrumentation>
</manifest>
