Fixed
Status Update
Comments
ki...@google.com <ki...@google.com>
ja...@google.com <ja...@google.com> #2
Triaging to platform owner for consideration.
ma...@gmail.com <ma...@gmail.com> #3
According to the documentation:
"Apps targeting lower sdk versions, can always schedule exact alarms."
https://developer.android.com/reference/android/app/AlarmManager.html#canScheduleExactAlarms()
So the API could delegate the implementation to the platform on API level 31 and above or simply return true otherwise.
I will try to submit a patch.
"Apps targeting lower sdk versions, can always schedule exact alarms."
So the API could delegate the implementation to the platform on API level 31 and above or simply return true otherwise.
I will try to submit a patch.
ap...@google.com <ap...@google.com> #4
I do not see a problem with this proposal.
Description
* Impl
* *********** */
/**
* Returns a [Sequence] walking up this view's [parent][View.getParent] hierarchy chain.
*/
val View.ancestors: Sequence<ViewParent>
get() = generateSequence(parent, ViewParent::getParent)
/* ***********
* Tests
* *********** */
@Test
fun ancestors_root() {
val actual = view.ancestors.toList()
val expected = emptyList<ViewParent>()
assertEquals(expected, actual)
}
@Test
fun ancestors() {
val parents = listOf(
FrameLayout(context),
LinearLayout(context),
RelativeLayout(context)
)
for ((parent, child) in parents.zipWithNext()) {
parent.addView(child)
}
parents.last().addView(view)
val expected = parents.reversed()
val actual = view.ancestors.toList()
assertEquals(expected, actual)
}