File tree 4 files changed +11
-5
lines changed
wear/watchface/watchface/src/androidTest/java/androidx/wear/watchface
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,23 @@ import android.graphics.drawable.Icon
21
21
import androidx.test.core.app.ApplicationProvider
22
22
import androidx.test.ext.junit.runners.AndroidJUnit4
23
23
import androidx.test.filters.MediumTest
24
+ import androidx.wear.watchface.control.InteractiveInstanceManager
24
25
import androidx.wear.watchface.style.UserStyleSchema
25
26
import androidx.wear.watchface.style.UserStyleSetting
26
27
import androidx.wear.watchface.style.WatchFaceLayer
27
28
import androidx.wear.watchface.test.SimpleWatchFaceTestService
29
+ import org.junit.After
28
30
import org.junit.Test
29
31
import org.junit.runner.RunWith
30
32
31
33
@RunWith(AndroidJUnit4 ::class )
32
34
@MediumTest
33
35
class WatchFaceServiceAndroidTest {
36
+ @After
37
+ public fun tearDown () {
38
+ InteractiveInstanceManager .setParameterlessEngine(null )
39
+ }
40
+
34
41
@Test
35
42
fun measuresWatchFaceIconsFromCustomContext () {
36
43
val context: Context = ApplicationProvider .getApplicationContext()
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ import androidx.wear.watchface.complications.data.ShortTextComplicationData
50
50
import androidx.wear.watchface.complications.data.WeightedElementsComplicationData
51
51
import androidx.wear.watchface.control.IHeadlessWatchFace
52
52
import androidx.wear.watchface.control.IWatchFaceControlService
53
+ import androidx.wear.watchface.control.InteractiveInstanceManager
53
54
import androidx.wear.watchface.control.WatchFaceControlService
54
55
import androidx.wear.watchface.control.data.ComplicationRenderParams
55
56
import androidx.wear.watchface.control.data.HeadlessWatchFaceInstanceParams
@@ -142,6 +143,7 @@ public class WatchFaceControlServiceTest {
142
143
if (this ::instance.isInitialized) {
143
144
instance.release()
144
145
}
146
+ InteractiveInstanceManager .setParameterlessEngine(null )
145
147
}
146
148
147
149
private fun createInstance (width : Int , height : Int ) {
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ import org.junit.After
86
86
import org.junit.Assert.fail
87
87
import org.junit.Assume
88
88
import org.junit.Before
89
- import org.junit.Ignore
90
89
import org.junit.Rule
91
90
import org.junit.Test
92
91
import org.junit.runner.RunWith
@@ -215,6 +214,7 @@ public class WatchFaceServiceImageTest {
215
214
}
216
215
assertThat(latch.await(TIMEOUT_MS , TimeUnit .MILLISECONDS )).isTrue()
217
216
pretendBinderThread.quitSafely()
217
+ InteractiveInstanceManager .setParameterlessEngine(null )
218
218
}
219
219
220
220
private fun initCanvasWatchFace (onInvalidateCountDownLatch : CountDownLatch ? = null) {
@@ -546,7 +546,6 @@ public class WatchFaceServiceImageTest {
546
546
bitmap!! .assertAgainstGolden(screenshotRule, " placeholderComplications" )
547
547
}
548
548
549
- @Ignore(" b/274813981" )
550
549
@SuppressLint(" NewApi" )
551
550
@Test
552
551
public fun testSmallImageComplications () {
@@ -694,7 +693,6 @@ public class WatchFaceServiceImageTest {
694
693
bitmap!! .assertAgainstGolden(screenshotRule, " left_complication_pressed" )
695
694
}
696
695
697
- @Ignore(" b/274981990" )
698
696
@SuppressLint(" NewApi" )
699
697
@Test
700
698
public fun testHighlightRightComplicationInScreenshot () {
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ import org.junit.After
67
67
import org.junit.Assert
68
68
import org.junit.Assume
69
69
import org.junit.Before
70
- import org.junit.Ignore
71
70
import org.junit.Test
72
71
import org.junit.runner.RunWith
73
72
import org.mockito.Mock
@@ -176,6 +175,7 @@ public class XmlDefinedUserStyleSchemaAndComplicationSlotsTest {
176
175
177
176
@After
178
177
public fun tearDown () {
178
+ InteractiveInstanceManager .setParameterlessEngine(null )
179
179
if (this ::interactiveWatchFaceInstance.isInitialized) {
180
180
interactiveWatchFaceInstance.release()
181
181
}
@@ -216,7 +216,6 @@ public class XmlDefinedUserStyleSchemaAndComplicationSlotsTest {
216
216
assertThat(existingInstance).isNull()
217
217
}
218
218
219
- @Ignore // b/275354644
220
219
@Test
221
220
@Suppress(" Deprecation" , " NewApi" ) // userStyleSettings
222
221
public fun staticSchemaAndComplicationsRead () {
You can’t perform that action at this time.
0 commit comments