File tree 1 file changed +3
-8
lines changed
widget-helper/src/androidTest/java/heyalex/widgethelper/test/update_logic
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class WidgetUpdateServiceTest {
24
24
25
25
@Test
26
26
fun newInstanceOfWidgetUpdate () {
27
- newInstanceWidgetupdate ()
27
+ newInstanceOfBuilder ()
28
28
assertTrue(true )
29
29
}
30
30
@@ -46,19 +46,14 @@ class WidgetUpdateServiceTest {
46
46
" annotation @RemoteViewsUpdater" )
47
47
}
48
48
49
- private fun newInstanceWidgetupdate () {
49
+ private fun newInstanceOfBuilder () {
50
50
var clazz: Class <* >? = null
51
51
try {
52
52
clazz = Class .forName(ComponentName (rule.activity.applicationContext,
53
53
AppWidgetUpdateTest ::class .java.name).className)
54
54
val annotation = findAnnotation(clazz)
55
55
val builder = (annotation as RemoteViewsUpdater ).value.objectInstance
56
- if (builder != null ) {
57
- builder.update(rule.activity.applicationContext, null , 0 )
58
- } else {
59
- // LogWrapper.w(LOG_TAG, "cannot update widgets, no builder set for given " + "EXTRA_PROVIDER")
60
- }
61
-
56
+ builder?.update(rule.activity.applicationContext, null , 0 )
62
57
} catch (e: ClassNotFoundException ) {
63
58
throw InstantiationException (" Unable to instantiate WidgetBuilder " +
64
59
clazz!! .name + " : make sure class name exists, is public, and has an"
You can’t perform that action at this time.
0 commit comments