revert(android): drop LikeMediaCallback JVM tests + testOptions flag
android / Build + lint + test (push) Successful in 5m26s

The unit tests called Media3's SessionCommand(String, Bundle)
constructor, which checkNotNulls the Bundle. JVM unit tests have
no real Android — Bundle.EMPTY is a static field initialized via
the stub jar to null. isReturnDefaultValues=true escapes the
ExceptionInInitializerError but leaves Bundle.EMPTY as null, so
SessionCommand still NPEs on construction. The real fix is
Robolectric, which is disproportionate infrastructure for one
test file (pulls in JUnit 4 ceremony for a JUnit 5 project + a
heavy dep + first-run SDK download flake risk on this CI).

Verification gate for the like button is operator on-device check
per feedback_definition_of_done. The Task 2 wiring lands next,
then we verify the heart appears on the phone notification, lock
screen, and Pixel Watch end-to-end.
This commit is contained in:
2026-06-03 09:19:37 -04:00
parent 7807e31b22
commit 43754d03c4
2 changed files with 0 additions and 116 deletions
-13
View File
@@ -80,19 +80,6 @@ android {
buildConfig = true
}
testOptions {
unitTests {
// JVM unit tests run against android.jar's stub methods,
// which throw `RuntimeException("Method ... not mocked")`
// when touched (including statics like Bundle.EMPTY).
// Return defaults instead so tests that pass Bundles
// through without inspecting them (e.g. SessionCommand
// construction in LikeMediaCallbackTest) just work,
// without dragging in Robolectric.
isReturnDefaultValues = true
}
}
packaging {
resources.excludes +=
setOf(