1 /*
2  * Copyright (C) 2023 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 package android.app.notification.extenders.cts
18 
19 import android.compat.cts.CompatChangeGatingTestCase
20 import com.google.common.collect.ImmutableSet
21 
22 class WearableExtenderApiTestHost : CompatChangeGatingTestCase() {
23 
setUpnull24     override fun setUp() {
25         super.setUp()
26     }
27 
testWearableExtenderBackgroundBlockedEnablednull28     fun testWearableExtenderBackgroundBlockedEnabled() {
29         installPackage(TEST_APK_34, true)
30         runDeviceCompatTest(
31                 TEST_PKG_34,
32                 ".WearableExtenderApi34Test",
33                 "wearableBackgroundBlockDisabled_wearableBackgroundSet_valueKeepsBitmap",
34                 ImmutableSet.of(),
35                 ImmutableSet.of()
36         )
37     }
38 
testWearableExtenderBackgroundBlockedDisablednull39     fun testWearableExtenderBackgroundBlockedDisabled() {
40         installPackage(TEST_APK_CURRENT, true)
41         runDeviceCompatTest(
42                 TEST_PKG_CURRENT,
43                 ".WearableExtenderApiCurrentTest",
44                 "wearableBackgroundBlockDisabled_wearableBackgroundSet_valueIsNull",
45                 ImmutableSet.of(),
46                 ImmutableSet.of()
47         )
48     }
49 
50     companion object {
51         const val TEST_PKG_34 = "android.app.notification.extenders.cts.api34"
52         const val TEST_APK_34 = "CtsNotificationExtenders34TestApp.apk"
53         const val TEST_PKG_CURRENT = "android.app.notification.extenders.cts.current"
54         const val TEST_APK_CURRENT = "CtsNotificationExtendersCurrentTestApp.apk"
55     }
56 }
57