Three APKs: the notification listener leaves the standard builds; releases drop x86_64
CI / check (push) Canceled after 0s

Google Play Protect blocked installing beta.7, most likely for the
notification listener (notification summaries).

- A second flavour dimension, `reading`: `standard` declares no listener and
  no permission of it; `notifications` is the full build plus the listener,
  with the same application id and key. Variants: fullStandard,
  fullNotifications, fdroidStandard (no F-Droid build with the listener).
  The listener class and its manifest entry live in src/notifications only.
- Settings in a standard build says where notification summaries went and
  why. The self-updater installs only its own kind: a notifications build
  takes latest.json's optional `notifications {url, sha256}` or nothing.
- Release builds carry arm64-v8a and armeabi-v7a only; debug keeps x86_64
  for the emulator. The engine's unused C and C++ API libraries are left out.
- scripts/check-apk.sh checks the built files (listener only where it may
  be, model stored, no x86 in a release); CI runs it on the three debug APKs
  and on an unsigned release build, release.yml on what it publishes.
- release.yml publishes llembas-android-<version>.apk, -notifications.apk
  and -fdroid.apk with SHA256SUMS.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Fable 5.2 committed 2026-11-12 09:58:07 +00:00
1 parent 6a05f56e7c
commit f2a2acf996
28 files changed
+403 -140

No files matched your search

@@ -1,10 +1,14 @@
package eu.llembas.android
import eu.llembas.android.api.LembasJson
import eu.llembas.android.assist.AssistController
import eu.llembas.android.assist.Recorder
import eu.llembas.android.update.Latest
import eu.llembas.android.update.LatestFile
import eu.llembas.android.update.Updater
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Test
@@ -17,6 +21,20 @@ class SmallThingsTest {
assertFalse(Updater.newer("0.1.0", "0.2.0"))
}
@Test
fun aBuildUpdatesItselfToItsOwnKindOnly() {
val plain = LembasJson.decodeFromString(Latest.serializer(), """{"version":"1.0.0","url":"https://example.org/a.apk","sha256":"aa"}""")
assertEquals(LatestFile("https://example.org/a.apk", "aa"), plain.fileFor(notificationsBuild = false))
// A release that names no notifications APK: that build installs nothing, rather than lose its listener.
assertNull(plain.fileFor(notificationsBuild = true))
val both = LembasJson.decodeFromString(
Latest.serializer(),
"""{"version":"1.0.0","url":"https://example.org/a.apk","sha256":"aa","notifications":{"url":"https://example.org/a-notifications.apk","sha256":"bb"}}""",
)
assertEquals(LatestFile("https://example.org/a-notifications.apk", "bb"), both.fileFor(notificationsBuild = true))
assertEquals(LatestFile("https://example.org/a.apk", "aa"), both.fileFor(notificationsBuild = false))
}
@Test
fun aVoiceReadsNoMarkup() {
val said = AssistController.plain("**Bake** it.\n\n```sh\nbake\n```\nSee [the recipe](https://example.org).")
@@ -367,6 +367,7 @@ object Fakes {
phoneRecognizer = true,
wakeAvailable = true,
wakeState = WakeState.Listening("OK Google"),
notificationsBuild = true,
navApps = listOf("google", "osmand"),
)
@@ -376,7 +377,9 @@ object Fakes {
wakeState = WakeState.Failed(WakeFailure.Microphone, "IllegalStateException: recording did not start; another app may have the microphone"),
wakeTest = WakeTestShown(done = true),
)
val settingsWakeTested = settings.copy(wakeTest = WakeTestShown(running = true, heard = 2))
/** A standard build: the test heard the phrase twice, and notification summaries are in the other build. */
val settingsWakeTested = settings.copy(wakeTest = WakeTestShown(running = true, heard = 2), notificationsBuild = false)
// The assistant's sheet, as it opens and as it answers.
private val assistBase = AssistUiState(
@@ -193,7 +193,9 @@ class ScreenShots {
// The wake word's rows: failed with its reason and a test that heard nothing; a test that heard it twice.
shoot("08-settings-wake-failed", Phone.Scroll) { SettingsContent(Fakes.settingsWakeFailed, NoSettingsActions) }
shoot("08-settings-wake-failed", Phone.SmallScroll, fontScale = 1.5f) { SettingsContent(Fakes.settingsWakeFailed, NoSettingsActions) }
// ...and, as a standard build has it, notification summaries explained instead of offered.
shoot("08-settings-wake-tested", Phone.Scroll) { SettingsContent(Fakes.settingsWakeTested, NoSettingsActions) }
shoot("08-settings-wake-tested", Phone.SmallScroll, fontScale = 1.5f) { SettingsContent(Fakes.settingsWakeTested, NoSettingsActions) }
}
@Test