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

Commit 789acacd authored by Shuo Qian's avatar Shuo Qian Committed by sqian
Browse files

Test app for call companion app

A two-button test app that provides a means to trigger CDM association
and disassociation with the profile that should grant the third party
InCallService the permission to bind to Telecom.

How to use:
1) Install the app
2) Click on Start Association
3) Pair a bluetooth device
4) Use the Phone to receive an incoming call
5) Should observe a toast saying "OnCallAdded"
6) End the call, should observe a toast saying "OnCallRemoved"
6) Click on Stop Association
7) Use the Phone to receive an incoming call, and disconnect the call
8) Should not observe a toast saying "OnCallAdded" or "OnCallRemoved"

Test: manual
Bug: 169595473
Change-Id: I3581f8dff1278c7fa85b8ae3e7c8906f30c35e41
(cherry picked from commit f9249680)
parent f8582600
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2019 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.
//

android_test {
    name: "TelecomCompanionApp",
    static_libs: [
        "androidx.legacy_legacy-support-v4",
        "guava",
    ],
    srcs: ["src/**/*.java"],
}
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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"
     coreApp="true"
     package="com.android.server.telecom.companionapp">

    <uses-sdk android:minSdkVersion="28"
         android:targetSdkVersion="29"/>

    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.MANAGE_ONGOING_CALLS" />
    <uses-feature android:name="android.software.companion_device_setup"/>

    <application android:label="Telecom Companion">
        <uses-library android:name="android.test.runner"/>

        <activity android:name="com.android.server.telecom.companionapp.CompanionTestApp"
                  android:label="CompanionTestApp">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <service android:name="com.android.server.telecom.companionapp.CompanionInCallServiceImpl"
             android:permission="android.permission.BIND_INCALL_SERVICE"
             android:exported="true">
          <intent-filter>
              <action android:name="android.telecom.InCallService"/>
          </intent-filter>
        </service>
    </application>
</manifest>
+341 B
Loading image diff...
+213 B
Loading image diff...
+343 B
Loading image diff...
Loading