Fix off-by-one bug in StackWidgetService
This commit is contained in:
parent
a5ae2eaa63
commit
67b55a4ecf
@ -86,7 +86,7 @@ internal class StackRemoteViewsFactory(private val context: Context, intent: Int
|
||||
|
||||
override fun getViewAt(position: Int): RemoteViews? {
|
||||
Log.i("StackRemoteViewsFactory", "getViewAt $position")
|
||||
return if (position < 0 || position > remoteViews.size) null else remoteViews[position]
|
||||
return if (0 <= position && position < remoteViews.size) remoteViews[position] else null
|
||||
}
|
||||
|
||||
private fun constructWidget(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user