• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2011 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18    package="com.android.keychain.tests"
19    android:sharedUserId="android.uid.system">
20
21    <uses-permission android:name="android.permission.INTERNET"/>
22
23    <!--
24        Install the activity and disable battery optimization (so the KeyChainServiceTest can be
25        run in the background):
26        adb install out/target/product/${TARGET_PRODUCT}/data/app/KeyChainTests/KeyChainTests.apk
27        Then navigate to Settings -> Battery -> ... -> Battery optimization -> select All Apps
28        Find com.android.keychain.tests and select Do Not Optimize.
29
30        Alternatively, the following command can be used to exclude the test services from
31        the background execution restriction for 2 minutes:
32        adb shell cmd deviceidle tempwhitelist -d 120000 com.android.keychain.tests
33
34        To run service:
35        adb shell am startservice -n com.android.keychain.tests/.KeyChainServiceTest
36        One has to inspect the ADB log to find out about test failures.
37
38        To run activity:
39        adb shell am start -n com.android.keychain.tests/com.android.keychain.tests.KeyChainTestActivity
40    -->
41    <application>
42        <uses-library android:name="android.test.runner" />
43        <activity android:name="com.android.keychain.tests.KeyChainTestActivity"
44            android:exported="true">
45            <intent-filter>
46                <action android:name="com.android.keychain.tests.KeyChainTestActivity"/>
47            </intent-filter>
48        </activity>
49        <activity android:name="com.android.keychain.tests.KeyChainSocketTestActivity"
50            android:exported="true">
51            <intent-filter>
52                <action android:name="com.android.keychain.tests.KeyChainSocketTestActivity"/>
53            </intent-filter>
54        </activity>
55    </application>
56
57    <instrumentation
58        android:name="androidx.test.runner.AndroidJUnitRunner"
59        android:targetPackage="com.android.keychain"
60        android:label="KeyChain Service Tests"
61        android:sharedUserId="android.uid.system"/>
62</manifest>
63