Ask in Apps before app packages update themselves; ship an F-Droid APK

Packages come from waozi.xyz, not the app store, so automatic updates now
wait for an answer. Apps asks once with two equal buttons and says the store
does not check these updates; Settings > About changes the answer. The new
key replaces cells_auto_update, which was saved as on without asking.

F-Droid rebuilds Inbe and compares it with our signed APK. Release builds
now also sign the universal APK built with -PfDroidBuild (self-update off)
and publish it as inbe-VERSION-fdroid.apk for F-Droid's Binaries field.
This commit is contained in:
waozi committed 2026-10-13 15:20:29 -03:00
1 parent 7c750cc193
commit 5a3f7b5388
44 files changed
+406 -30

No files matched your search

+12 -3
View File
@@ -808,6 +808,14 @@ jobs:
--stacktrace
make android-copy-release-apks
make android-copy-bundle
# F-Droid rebuilds the universal APK with -PfDroidBuild and copies
# this APK's signature onto it, so the two must match byte for byte.
./droid/gradlew -p droid assembleRelease -PfDroidBuild=true \
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
-Pkeystore.alias="$KEY_ALIAS" \
-Pkeystore.password="$KEYSTORE_PASSWORD" \
--stacktrace
make android-copy-fdroid-apk
- name: Preserve Android Native Crash Symbols
uses: actions/upload-artifact@v4
@@ -826,7 +834,8 @@ jobs:
echo "Could not read APP_VERSION_STRING"
exit 1
fi
for apk in "build/android/inbe-$VERSION.apk" "build/android/inbe-$VERSION-gplay.apk"; do
for apk in "build/android/inbe-$VERSION.apk" "build/android/inbe-$VERSION-gplay.apk" \
"build/android/inbe-$VERSION-fdroid.apk"; do
if [ ! -f "$apk" ]; then
echo "Missing universal APK: $apk"
exit 1
@@ -983,12 +992,12 @@ jobs:
channels+=("--channel" "rpm-$arch=$rpm")
done
# Directly installed APKs update themselves from these channels;
# the Google Play build updates through the store.
# the Google Play and F-Droid builds update through their stores.
while IFS= read -r apk; do
abi="$(basename "$apk" .apk)"
abi="${abi#inbe-$VERSION}"
case "$abi" in
-gplay) continue ;;
-gplay|-fdroid) continue ;;
"") channels+=("--channel" "android=$apk") ;;
*) channels+=("--channel" "android$abi=$apk") ;;
esac
+12 -2
View File
@@ -675,7 +675,7 @@ MEDITATION_AUDIO_TRACKS := \
include mk/package-freebsd.mk
.PHONY: web-canvas web-canvas-smoke-test web-compare-test web-side-by-side-test all native kryon-host install install-user uninstall stage package-freebsd deb package-deb deb-check rpm package-rpm rpm-check snap package-snap snap-cache-clean flatpak package-flatpak podman-check validate-desktop run tui run-tui run-termi run-termi-direct run-fresh screenshot test ci dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows font-subsets font-bundle-check clean clean-linux clean-native clean-vendor-builds windows-setup windows-setup-check android-avd android-audio-e2e android-check-keystore android-copy-assets android-copy-debug-apks android-copy-release-apks android-copy-bundle android-smoke android-local-properties android-debug android-release android-bundle android-install android-install-release android-clean android-rebuild validate-meditation-audio package-unpackaged-assets windows-runtime-assets-check windows windows64 web web-tools-check web-smoke-test web-smoke-test-firefox web-smoke-test-librewolf site site-release-assets-check chrome-web-store chrome-web-store-test firefox-addons firefox-addons-lint firefox-addons-source-zip verify-firefox-addons sync-web-icons social-install social-login social-draft social-x-draft social-post social-x-post social-x-post-dry-run social-post-dry-run
.PHONY: web-canvas web-canvas-smoke-test web-compare-test web-side-by-side-test all native kryon-host install install-user uninstall stage package-freebsd deb package-deb deb-check rpm package-rpm rpm-check snap package-snap snap-cache-clean flatpak package-flatpak podman-check validate-desktop run tui run-tui run-termi run-termi-direct run-fresh screenshot test ci dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows font-subsets font-bundle-check clean clean-linux clean-native clean-vendor-builds windows-setup windows-setup-check android-avd android-audio-e2e android-check-keystore android-copy-assets android-copy-debug-apks android-copy-release-apks android-copy-fdroid-apk android-copy-bundle android-smoke android-local-properties android-debug android-release android-bundle android-install android-install-release android-clean android-rebuild validate-meditation-audio package-unpackaged-assets windows-runtime-assets-check windows windows64 web web-tools-check web-smoke-test web-smoke-test-firefox web-smoke-test-librewolf site site-release-assets-check chrome-web-store chrome-web-store-test firefox-addons firefox-addons-lint firefox-addons-source-zip verify-firefox-addons sync-web-icons social-install social-login social-draft social-x-draft social-post social-x-post social-x-post-dry-run social-post-dry-run
.PHONY: zi-check
.PHONY: clean-text-api-check package-check secret-check secret-check-history hooks-install test-tui-screenshot test-termi-screenshot test-termi-screenshot-direct
.NOTPARALLEL: all native test visual-test ci zi-check dist windows windows64 android-release android-bundle click deb package-deb rpm package-rpm snap package-snap flatpak package-flatpak
@@ -2642,6 +2642,16 @@ android-copy-release-apks: | $(ANDROID_BUILD_DIR)
fi; \
cp "$$gplay_universal" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-$(APP_VERSION)-gplay.apk"
# F-Droid rebuilds this universal APK with -PfDroidBuild and copies its
# signature, so run after a signed assembleRelease -PfDroidBuild=true.
android-copy-fdroid-apk: | $(ANDROID_BUILD_DIR)
@fdroid_universal="$$(find droid/app/build/outputs/apk -path '*/release/*' -name "app-universal-release*.apk" | head -n 1)"; \
if [ -z "$$fdroid_universal" ] || [ ! -f "$$fdroid_universal" ]; then \
echo "No universal F-Droid APK was produced"; \
exit 1; \
fi; \
cp "$$fdroid_universal" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-$(APP_VERSION)-fdroid.apk"
android-copy-bundle: | $(ANDROID_BUILD_DIR)
bash scripts/check-android-optimization.sh droid/app/build/outputs/bundle/gplay/app-gplay.aab
@found=0; \
@@ -2955,7 +2965,7 @@ test: sync-recovery-test
# Validate before producing release packages, including direct artifact targets.
$(APPIMAGE_TARGET) $(DEB_TARGET) $(RPM_TARGET) $(SNAP_TARGET) $(FLATPAK_TARGET) $(CLICK_TARGET) $(CHROME_WEB_STORE_ZIP) $(FIREFOX_ADDONS_ZIP): | version-check
android-release android-bundle android-copy-release-apks android-copy-bundle windows-setup site: version-check
android-release android-bundle android-copy-release-apks android-copy-fdroid-apk android-copy-bundle windows-setup site: version-check
# Actual artifacts are gated too, including direct and incremental builds.
$(TARGET) $(KRYON_HOST_TARGET) $(WIN64_TARGET) $(WEB_JS_TARGET) $(WEB_CANVAS_TARGET): $(SYNC_RETRY_SOURCE) | build-laws
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5 -2
View File
@@ -50,6 +50,9 @@ android {
keyPassword releasePassword
}
}
// F-Droid builds without a key and copies the signature from the release's
// F-Droid APK, which CI builds the same way with -PfDroidBuild plus the key.
def releaseSigning = releasePassword ? signingConfigs.release : null
defaultConfig {
applicationId "xyz.waozi.inbe"
@@ -81,7 +84,7 @@ android {
buildTypes {
release {
signingConfig project.hasProperty('fDroidBuild') ? null : signingConfigs.release
signingConfig releaseSigning
ndk.debugSymbolLevel 'FULL'
minifyEnabled true
shrinkResources true
@@ -93,7 +96,7 @@ android {
}
gplay {
initWith release
signingConfig project.hasProperty('fDroidBuild') ? null : signingConfigs.release
signingConfig releaseSigning
matchingFallbacks = ['release']
buildConfigField "boolean", "GPLAY", "true"
buildConfigField "boolean", "SELF_UPDATE", "false"
+18
View File
@@ -2344,6 +2344,24 @@ Automaticky aktualizovat aplikace
[cells_check_updates]
Vyhledat aktualizace
---
[package_updates_title]
Aktualizace aplikací
---
[package_updates_message]
Inner Breeze může udržovat aplikace jako Lumi a Deník aktuální tím, že stáhne nové verze z waozi.xyz. Tato stahování neprocházejí vaším obchodem s aplikacemi, takže je F-Droid ani Google Play nekontrolují. Později to můžete změnit v Nastavení v části O aplikaci.
---
[package_updates_allow]
Povolit
---
[package_updates_decline]
Nepovolit
---
[package_updates_setting]
Stahovat aktualizace aplikací z waozi.xyz
---
[package_updates_note]
Nové verze Lumi, Deníku a dalších aplikací přicházejí z waozi.xyz, ne přes váš obchod s aplikacemi, takže je nekontroluje.
---
[cells_versions]
Verze aplikací
---
+18
View File
@@ -2344,6 +2344,24 @@ Apps automatisch aktualisieren
[cells_check_updates]
Nach Updates suchen
---
[package_updates_title]
App-Updates
---
[package_updates_message]
Inner Breeze kann Apps wie Lumi und Tagebuch aktuell halten, indem es neue Versionen von waozi.xyz lädt. Diese Downloads laufen nicht über deinen App-Store, daher prüfen F-Droid oder Google Play sie nicht. Du kannst das später unter Einstellungen bei Info ändern.
---
[package_updates_allow]
Erlauben
---
[package_updates_decline]
Nicht erlauben
---
[package_updates_setting]
App-Updates von waozi.xyz laden
---
[package_updates_note]
Neue Versionen von Lumi, Tagebuch und den anderen Apps kommen von waozi.xyz statt über deinen App-Store, der sie daher nicht prüft.
---
[cells_versions]
Versionen der Apps
---
+18
View File
@@ -2343,6 +2343,24 @@ Automatically update apps
[cells_check_updates]
Check for updates
---
[package_updates_title]
App updates
---
[package_updates_message]
Inner Breeze can keep apps such as Lumi and Diary up to date by downloading new versions from waozi.xyz. These downloads do not go through your app store, so F-Droid or Google Play does not check them. You can change this later in Settings under About.
---
[package_updates_allow]
Allow
---
[package_updates_decline]
Don't allow
---
[package_updates_setting]
Download app updates from waozi.xyz
---
[package_updates_note]
New versions of Lumi, Diary and the other apps come from waozi.xyz, not through your app store, so it does not check them.
---
[cells_versions]
App versions
---
+18
View File
@@ -2344,6 +2344,24 @@ Actualizar aplicaciones automáticamente
[cells_check_updates]
Buscar actualizaciones
---
[package_updates_title]
Actualizaciones de aplicaciones
---
[package_updates_message]
Inner Breeze puede mantener al día aplicaciones como Lumi y Diario descargando nuevas versiones desde waozi.xyz. Estas descargas no pasan por tu tienda de aplicaciones, así que F-Droid o Google Play no las revisan. Puedes cambiarlo más tarde en Configuración, en Acerca de.
---
[package_updates_allow]
Permitir
---
[package_updates_decline]
No permitir
---
[package_updates_setting]
Descargar actualizaciones de aplicaciones desde waozi.xyz
---
[package_updates_note]
Las nuevas versiones de Lumi, Diario y las demás aplicaciones llegan desde waozi.xyz, no a través de tu tienda de aplicaciones, que por eso no las revisa.
---
[cells_versions]
Versiones de las aplicaciones
---
+18
View File
@@ -2344,6 +2344,24 @@ Mettre à jour les applications automatiquement
[cells_check_updates]
Rechercher des mises à jour
---
[package_updates_title]
Mises à jour des applications
---
[package_updates_message]
Inner Breeze peut garder à jour des applications comme Lumi et Journal en téléchargeant de nouvelles versions depuis waozi.xyz. Ces téléchargements ne passent pas par votre magasin d'applications, donc F-Droid ou Google Play ne les vérifient pas. Vous pourrez modifier ce choix plus tard dans Réglages, rubrique A propos.
---
[package_updates_allow]
Autoriser
---
[package_updates_decline]
Ne pas autoriser
---
[package_updates_setting]
Télécharger les mises à jour des applications depuis waozi.xyz
---
[package_updates_note]
Les nouvelles versions de Lumi, Journal et des autres applications viennent de waozi.xyz et non de votre magasin d'applications, qui ne les vérifie donc pas.
---
[cells_versions]
Versions des applications
---
+18
View File
@@ -2344,6 +2344,24 @@ Perbarui aplikasi secara otomatis
[cells_check_updates]
Periksa pembaruan
---
[package_updates_title]
Pembaruan aplikasi
---
[package_updates_message]
Inner Breeze dapat menjaga aplikasi seperti Lumi dan Buku Harian tetap terbaru dengan mengunduh versi baru dari waozi.xyz. Unduhan ini tidak melalui toko aplikasi Anda, sehingga F-Droid atau Google Play tidak memeriksanya. Anda dapat mengubahnya nanti di Pengaturan, bagian Tentang.
---
[package_updates_allow]
Izinkan
---
[package_updates_decline]
Jangan izinkan
---
[package_updates_setting]
Unduh pembaruan aplikasi dari waozi.xyz
---
[package_updates_note]
Versi baru Lumi, Buku Harian, dan aplikasi lainnya datang dari waozi.xyz, bukan melalui toko aplikasi Anda, sehingga toko tersebut tidak memeriksanya.
---
[cells_versions]
Versi aplikasi
---
+18
View File
@@ -2344,6 +2344,24 @@ Aggiorna le app automaticamente
[cells_check_updates]
Cerca aggiornamenti
---
[package_updates_title]
Aggiornamenti delle app
---
[package_updates_message]
Inner Breeze può mantenere aggiornate app come Lumi e Diario personale scaricando nuove versioni da waozi.xyz. Questi download non passano dal tuo store di app, quindi F-Droid o Google Play non li controllano. Puoi cambiare la scelta in seguito in Impostazioni, sezione Informazioni.
---
[package_updates_allow]
Consenti
---
[package_updates_decline]
Non consentire
---
[package_updates_setting]
Scarica gli aggiornamenti delle app da waozi.xyz
---
[package_updates_note]
Le nuove versioni di Lumi, Diario personale e delle altre app arrivano da waozi.xyz, non dal tuo store di app, che quindi non le controlla.
---
[cells_versions]
Versioni delle app
---
+18
View File
@@ -2346,6 +2346,24 @@ Inner Breezeは無料のオープンソースです。役に立ったら、少
[cells_check_updates]
更新を確認
---
[package_updates_title]
アプリの更新
---
[package_updates_message]
Inner Breeze は、Lumi や日記などのアプリの新しいバージョンを waozi.xyz からダウンロードして最新に保てます。このダウンロードはアプリストアを経由しないため、F-Droid や Google Play による確認は行われません。後から設定の「アプリについて」で変更できます。
---
[package_updates_allow]
許可する
---
[package_updates_decline]
許可しない
---
[package_updates_setting]
アプリの更新を waozi.xyz からダウンロード
---
[package_updates_note]
Lumi、日記、その他のアプリの新しいバージョンはアプリストアではなく waozi.xyz から届くため、ストアによる確認は行われません。
---
[cells_versions]
アプリのバージョン
---
+18
View File
@@ -2344,6 +2344,24 @@ Inner Breeze는 무료 오픈 소스입니다. 도움이 되셨다면 작은 후
[cells_check_updates]
업데이트 확인
---
[package_updates_title]
앱 업데이트
---
[package_updates_message]
Inner Breeze는 waozi.xyz에서 새 버전을 내려받아 Lumi와 일기 같은 앱을 최신 상태로 유지할 수 있어요. 이 다운로드는 앱 스토어를 거치지 않으므로 F-Droid나 Google Play가 확인하지 않아요. 나중에 설정의 정보에서 바꿀 수 있어요.
---
[package_updates_allow]
허용
---
[package_updates_decline]
허용 안 함
---
[package_updates_setting]
waozi.xyz에서 앱 업데이트 내려받기
---
[package_updates_note]
Lumi, 일기 및 다른 앱의 새 버전은 앱 스토어가 아닌 waozi.xyz에서 오므로 스토어가 확인하지 않아요.
---
[cells_versions]
앱 버전
---
+18
View File
@@ -2344,6 +2344,24 @@ Atualizar aplicativos automaticamente
[cells_check_updates]
Buscar atualizações
---
[package_updates_title]
Atualizações de aplicativos
---
[package_updates_message]
O Inner Breeze pode manter aplicativos como Lumi e Diário atualizados baixando novas versões de waozi.xyz. Esses downloads não passam pela sua loja de aplicativos, então o F-Droid ou o Google Play não os verificam. Você pode mudar isso depois em Configurações, na seção Sobre.
---
[package_updates_allow]
Permitir
---
[package_updates_decline]
Não permitir
---
[package_updates_setting]
Baixar atualizações de aplicativos de waozi.xyz
---
[package_updates_note]
As novas versões do Lumi, do Diário e dos outros aplicativos vêm de waozi.xyz, não da sua loja de aplicativos, que por isso não as verifica.
---
[cells_versions]
Versões dos aplicativos
---
+18
View File
@@ -2344,6 +2344,24 @@ Inner Breeze бесплатное приложение с открытым ис
[cells_check_updates]
Проверить обновления
---
[package_updates_title]
Обновления приложений
---
[package_updates_message]
Inner Breeze может поддерживать такие приложения, как Lumi и Дневник, в актуальном состоянии, загружая новые версии с waozi.xyz. Эти загрузки идут не через ваш магазин приложений, поэтому F-Droid или Google Play их не проверяют. Позже это можно изменить в Настройках, в разделе «О приложении».
---
[package_updates_allow]
Разрешить
---
[package_updates_decline]
Не разрешать
---
[package_updates_setting]
Загружать обновления приложений с waozi.xyz
---
[package_updates_note]
Новые версии Lumi, Дневника и других приложений приходят с waozi.xyz, а не через ваш магазин приложений, поэтому он их не проверяет.
---
[cells_versions]
Версии приложений
---
+18
View File
@@ -2344,6 +2344,24 @@ Inner Breeze 免费且开源。如果它对您有帮助,一点小额捐赠将
[cells_check_updates]
检查更新
---
[package_updates_title]
应用更新
---
[package_updates_message]
Inner Breeze 可以从 waozi.xyz 下载新版本,让 Lumi 和日记等应用保持最新。这些下载不经过你的应用商店,因此 F-Droid 或 Google Play 不会检查它们。之后可以在设置的“关于”中更改。
---
[package_updates_allow]
允许
---
[package_updates_decline]
不允许
---
[package_updates_setting]
从 waozi.xyz 下载应用更新
---
[package_updates_note]
Lumi、日记和其他应用的新版本来自 waozi.xyz,而不是通过你的应用商店,因此商店不会检查它们。
---
[cells_versions]
应用版本
---
+1
View File
@@ -28,6 +28,7 @@ inbe-$version-armeabi-v7a.apk
inbe-$version-x86.apk
inbe-$version-x86_64.apk
inbe-$version-gplay.apk
inbe-$version-fdroid.apk
inbe-$version-gplay.aab
inbe-web.zip
inbe-chrome-web-store.zip
+41
View File
@@ -16,9 +16,12 @@
#import, file "../widgets/bottom_nav.zi";
#import, file "../cells/module_host.zi";
#import, file "../cells/catalog.zi";
#import, file "../cells/package_manager.zi";
#import "button_props"
#import "button_widget"
#import "control_props"
#import "modal_props"
#import "modal_widget"
#import "geometry"
#import "drawing_props"
#import "layout"
@@ -455,5 +458,43 @@ app_draw_launcher :: (app: *InnerBreeze) {
save_settings(app)
app_block_current_click(app)
}
} else {
app_launcher_ask_package_updates(app)
}
}
// Apps is where packages are chosen and installed, so it asks once whether
// they may update by themselves. Both answers are one equal tap; closing the
// question without an answer asks again on a later start.
launcher_package_updates_closed: bool;
app_launcher_ask_package_updates :: (app: *InnerBreeze) {
if launcher_package_updates_closed || !PackageAutomaticUnasked() {
return
}
actions: [2]ActionModalAction = .[
ActionModalAction.{.label = LocaleText("package_updates_decline"),
.tone = cast(ButtonTone)ButtonToneNeutral,
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft},
ActionModalAction.{.label = LocaleText("package_updates_allow"),
.tone = cast(ButtonTone)ButtonToneNeutral,
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft},
]
props: ActionModalProps = .{}
props.key = KeyHash("inbe/apps/package-updates")
props.title = LocaleText("package_updates_title")
props.message = LocaleText("package_updates_message")
props.max_width = 420
answer := ActionModal(app.ui.session, props, actions[:2]).action
if answer == 0 {
return
}
if answer == 1 {
PackageSetAutomatic(false)
} else if answer == 2 {
PackageSetAutomatic(true)
} else {
launcher_package_updates_closed = true
}
app_block_current_click(app)
}
+3 -1
View File
@@ -6,6 +6,7 @@
#import, file "../core/types.zi";
#import, file "../cells/inbe_types.zi";
#import, file "../cells/module_host.zi";
#import, file "../cells/package_manager.zi";
#import, file "app_types.zi";
#import, file "route_types.zi";
#import, file "screenshot_request.zi";
@@ -372,11 +373,12 @@ setup_screenshot_scene :: (app: *InnerBreeze, request: *ScreenshotRequest) {
app.habits_guide_seen = 1
app.tutorial_seen = 1
app.launcher_guide_seen = 1
// Screenshots never download packages or show the Apps question.
PackageSetAutomatic(false)
// Sync screenshots must show only data already present in their isolated
// storage root. Seeding defaults here can turn a visual check into an
// upload as soon as an account is connected.
if scene_text.count < 5 || scene_text[:5] != "sync_" {
storage_set_setting_int("cells_auto_update", 0)
storage_set_setting_int("lumi_online", 0)
screenshot_seed_habits(app)
}
+36 -2
View File
@@ -297,12 +297,46 @@ PackageCancel :: () {
}
}
// Packages come from Waozi's node, not from the store that installed the
// app, so automatic updates wait for the person to allow them. The answer
// has its own key: "cells_auto_update" was saved as on without being asked.
// The answer stays in memory because the pump asks every frame.
PACKAGE_UPDATES_KEY :: "package_updates_allowed"
PACKAGE_UPDATES_UNASKED :: -1
PACKAGE_UPDATES_UNREAD :: -2
package_updates_answer: s32 = PACKAGE_UPDATES_UNREAD;
package_updates_possible: s32 = -1;
PackageUpdatesAnswer :: () -> s32 {
if package_updates_answer == PACKAGE_UPDATES_UNREAD {
package_updates_answer = SettingsReadInt(PACKAGE_UPDATES_KEY, PACKAGE_UPDATES_UNASKED)
}
return package_updates_answer
}
PackageAutomaticEnabled :: () -> bool {
return SettingsReadInt("cells_auto_update", 1) != 0
return PackageUpdatesAnswer() == 1
}
PackageUpdatesPossible :: () -> bool {
if package_updates_possible < 0 {
possible := !DataTemporary() && PackagePublisherConfigured()
package_updates_possible = ifx possible then 1 else 0
}
return package_updates_possible == 1
}
// The question is asked once, where packages can be downloaded at all.
PackageAutomaticUnasked :: () -> bool {
if PackageUpdatesAnswer() != PACKAGE_UPDATES_UNASKED {
return false
}
return PackageUpdatesPossible()
}
PackageSetAutomatic :: (enabled: bool) {
unused SettingsStoreInt("cells_auto_update", ifx enabled then 1 else 0)
package_updates_answer = ifx enabled then 1 else 0
unused SettingsStoreInt(PACKAGE_UPDATES_KEY, package_updates_answer)
if !enabled {
if package_automatic && package_index >= 0 {
FileDownloadRelease(*package_download)
+33 -1
View File
@@ -25,6 +25,7 @@ update_host_text :: (value: *u8) -> string {
#import, file "../../app/app_modal_state.zi";
#import, file "../../core/version.zi";
#import, file "../../cells/package_manager.zi";
#import, file "settings_ui.zi";
#import, file "../../cells/catalog.zi";
#import, file "../../cells/versions.zi";
#import "open_uri"
@@ -98,7 +99,37 @@ settings_about_content_height :: (content_w: s32) -> s32 {
pending_root := ifx PackageRootPending() then AppScale(28) else 0
return AppScale(448) + update_row + pending_root + AppParagraphHeight(description.text, description.width,
description.font, description.line_gap) + about_link_icons_height(content_w)
description.font, description.line_gap) + about_link_icons_height(content_w) +
about_package_updates_height(content_w)
}
// Changes the answer to the Apps question about package updates.
about_package_updates_height :: (content_w: s32) -> s32 {
if !PackageUpdatesPossible() {
return 0
}
note_h := AppParagraphHeight(LocaleText("package_updates_note"), content_w,
AppFontSize(), AppScale(4))
return toggle_row_height(LocaleText("package_updates_setting"), content_w) +
note_h + AppScale(20)
}
about_draw_package_updates :: (app: *InnerBreeze, x: s32, w: s32, y: *s32) {
if !PackageUpdatesPossible() {
return
}
allowed: s32 = ifx PackageAutomaticEnabled() then 1 else 0
if draw_toggle_row(app, x, w, y, LocaleText("package_updates_setting"), *allowed) {
PackageSetAutomatic(allowed != 0)
}
note := LocaleText("package_updates_note")
note_h := AppParagraphHeight(note, w, AppFontSize(), AppScale(4))
Text(app.ui.session, TextProps.{
.bounds = Rectangle.{cast(float32)x, cast(float32)y.*,
cast(float32)w, cast(float32)note_h},
.text = note, .font = AppFontSize(),
.wrap = cast(TextWrap)TextWrapAuto})
y.* += note_h + AppScale(20)
}
ABOUT_SOCIAL_DISCORD :: 0
@@ -249,6 +280,7 @@ settings_about_draw :: (app: *InnerBreeze, x: s32, w: s32, y: *s32) {
}
}
y.* += AppScale(20)
about_draw_package_updates(app, x, w, y)
if update_available() != 0 {
if update_can_self_update() != 0 {
+1 -1
View File
@@ -66,7 +66,7 @@ def main():
user = db.execute("SELECT id FROM users LIMIT 1").fetchone()[0]
settings = dict(enabled_apps="31", main_tab="1", language="en",
language_setup_done="1", apps_setup_done="1",
launcher_guide_seen="1", tutorial_seen="1", cells_auto_update="0")
launcher_guide_seen="1", tutorial_seen="1", package_updates_allowed="0")
for key, value in settings.items():
db.execute("INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) "
"ON CONFLICT(user_id,key) DO UPDATE SET value=excluded.value", (user, key, value))
+1 -1
View File
@@ -152,7 +152,7 @@ with tempfile.TemporaryDirectory(prefix='inbe-appearance-') as directory:
user = db.execute('SELECT id FROM users LIMIT 1').fetchone()[0]
settings = dict(enabled_apps='31', language='en', language_setup_done='1',
apps_setup_done='1', tutorial_seen='1', habits_guide_seen='1',
lumi_introduced='1', cells_auto_update='0')
lumi_introduced='1', package_updates_allowed='0')
for name in ('lists', 'habits', 'practices', 'diary', 'lumi'):
settings['app_used_' + name] = '1'
for key, value in settings.items():
+12 -1
View File
@@ -125,6 +125,17 @@ with tempfile.TemporaryDirectory(prefix="inbe-app-choices-") as temporary:
with application(profile, "resume-apps") as (window, log):
capture(window, "resumed-apps")
tap(window, 180, 104)
# With the guide closed, Apps asks once about app updates. The first
# "allow" read belongs to Don't allow, left of or above Allow.
capture(window, "resumed-apps-updates-question")
decline = subprocess.run(
[sys.executable, str(ROOT / "tests/rendered_word.py"),
str(OUTPUT / "resumed-apps-updates-question.png"), "allow"],
text=True, capture_output=True, timeout=60)
assert decline.returncode == 0, "Apps did not ask about app updates"
tap(window, *map(int, decline.stdout.split()))
wait_setting(profile, "package_updates_allowed", 0)
tap(window, 180, 104)
command("xdotool", "type", "--clearmodifiers", "Lists")
time.sleep(.3)
tap(window, 180, 228)
@@ -135,7 +146,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-app-choices-") as temporary:
user = db.execute("SELECT id FROM users WHERE kind='local'").fetchone()[0]
db.execute("INSERT INTO elist_lists(id,user_id,title,sort_order,deleted_at,updated_at) VALUES(?,?,?,0,0,1)",
("choice-preserved-list", user, "Saved while Lists is enabled"))
values = {"habits_guide_seen": 1, "tutorial_seen": 1, "cells_auto_update": 0,
values = {"habits_guide_seen": 1, "tutorial_seen": 1, "package_updates_allowed": 0,
"apps_last_update_check": 1900000000}
for key, value in values.items():
db.execute("INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) "
+1 -1
View File
@@ -78,7 +78,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-settings-entry-") as temporary:
"apps_setup_done": 1, "enabled_apps": 22, "lumi_introduced": 1,
"main_tab": 1, "tutorial_seen": 1, "habits_guide_seen": 1, "ui_scale": 10,
"navigation_placement": 0 if NARROW else 1, "navigation_collapsed": 0,
"cells_auto_update": 0, "apps_last_update_check": 1900000000,
"package_updates_allowed": 0, "apps_last_update_check": 1900000000,
"launcher_favorite_count": 2, "launcher_favorite_0": 12, "launcher_favorite_1": 1,
"bottom_nav_route_count": 4, "bottom_nav_route_0": 12,
"bottom_nav_route_1": 1, "bottom_nav_route_2": 2, "bottom_nav_route_3": 4}
+1 -1
View File
@@ -116,7 +116,7 @@ def prepare(profile, server):
for key, value in dict(sync_enabled=0, sync_server_url=server, language="en",
language_setup_done=1, apps_setup_done=1, enabled_apps=31,
tutorial_seen=1, launcher_guide_seen=1, practice_guide_seen=1,
habits_guide_seen=1, lumi_introduced=1, cells_auto_update=0).items():
habits_guide_seen=1, lumi_introduced=1, package_updates_allowed=0).items():
database.execute("INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) "
"ON CONFLICT(user_id,key) DO UPDATE SET value=excluded.value",
(user, key, str(value)))
+1 -1
View File
@@ -102,7 +102,7 @@ with tempfile.TemporaryDirectory(prefix='inbe-habit-schedule-') as directory:
user = db.execute('SELECT id FROM users LIMIT 1').fetchone()[0]
settings = dict(enabled_apps='31', language='en', language_setup_done='1',
apps_setup_done='1', tutorial_seen='1', habits_guide_seen='1',
lumi_introduced='1', cells_auto_update='0')
lumi_introduced='1', package_updates_allowed='0')
for key, value in settings.items():
db.execute('INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) '
'ON CONFLICT(user_id,key) DO UPDATE SET value=excluded.value', (user, key, value))
+1 -1
View File
@@ -121,7 +121,7 @@ with tempfile.TemporaryDirectory(prefix='inbe-habit-tracking-') as directory:
user = db.execute('SELECT id FROM users LIMIT 1').fetchone()[0]
settings = dict(enabled_apps='31', language='en', language_setup_done='1',
apps_setup_done='1', tutorial_seen='1', habits_guide_seen='1',
lumi_introduced='1', cells_auto_update='0')
lumi_introduced='1', package_updates_allowed='0')
for key, value in settings.items():
db.execute('INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) '
'ON CONFLICT(user_id,key) DO UPDATE SET value=excluded.value', (user, key, value))
+14 -2
View File
@@ -165,7 +165,7 @@ with contextlib.ExitStack() as stack:
"apps_setup_done": 1, "enabled_apps": 31, "lumi_introduced": 1,
"main_tab": 3, "tutorial_seen": 1, "habits_guide_seen": 1,
"theme": 9, "theme_source": 0, "theme_mode": 2,
"cells_auto_update": 0, "apps_last_update_check": 1900000000})
"package_updates_allowed": 0, "apps_last_update_check": 1900000000})
cases = [(390, 844, 0, 10, count) for count in (3, 4, 5)]
cases += [(320, 844, 0, 10, 5), (390, 844, 4, 10, 5),
(390, 844, 0, 15, 5), (900, 500, 1, 10, 5),
@@ -288,6 +288,18 @@ with contextlib.ExitStack() as stack:
capture(window, name + f"-apps-guide-{step + 1}")
key(window, "Right")
assert settings(profile)["launcher_guide_seen"] == "1", "Apps guide did not finish"
# Apps then asks once whether packages may update themselves.
# Declining is the first "allow" read: left of, or above, Allow.
capture(window, name + "-apps-updates-question")
assert "package_updates_allowed" not in settings(profile)
decline = subprocess.run(
["python3", str(ROOT / "tests/rendered_word.py"),
str(OUTPUT / (name + "-apps-updates-question.png")), "allow"],
text=True, capture_output=True, timeout=60)
assert decline.returncode == 0, "Apps did not ask about app updates"
click(window, *map(int, decline.stdout.split()))
assert settings(profile).get("package_updates_allowed") == "0", log.read_text()
capture(window, name + "-apps-after-updates-question")
# Practices is the third pinned card in the same grid as the rest.
click(window, *card(width, mobile, 2))
assert settings(profile)["apps_setup_done"] == "1", log.read_text()
@@ -296,7 +308,7 @@ with contextlib.ExitStack() as stack:
"apps_setup_done": 1, "enabled_apps": 31, "lumi_introduced": 1,
"main_tab": 1, "tutorial_seen": 1, "habits_guide_seen": 1,
"ui_scale": 10, "navigation_placement": 0, "theme": 9,
"theme_source": 0, "theme_mode": 2, "cells_auto_update": 0,
"theme_source": 0, "theme_mode": 2, "package_updates_allowed": 0,
"apps_last_update_check": 1900000000,
"launcher_favorite_count": 2, "launcher_favorite_0": 1,
"launcher_favorite_1": 2})
+1 -1
View File
@@ -88,7 +88,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-leaderboard-") as directory:
assert LEADERBOARD_ROUTE not in favorites, "Leaderboard was pinned by default"
settings = {"language": "en", "language_system": 0, "language_setup_done": 1,
"apps_setup_done": 1, "main_tab": 5, "tutorial_seen": 1,
"habits_guide_seen": 1, "launcher_guide_seen": 1, "cells_auto_update": 0,
"habits_guide_seen": 1, "launcher_guide_seen": 1, "package_updates_allowed": 0,
"apps_last_update_check": 1900000000,
# Pinned here, so the page has no "back to Apps" bar and
# the controls keep fixed positions.
+1 -1
View File
@@ -28,7 +28,7 @@ with tempfile.TemporaryDirectory(prefix='inbe-emphasis-') as directory:
settings = dict(enabled_apps='31', app_used_lists='1', app_used_lumi='1',
app_used_habits='1', app_used_practices='1', app_used_diary='1',
main_tab='4', language='en', language_setup_done='1', apps_setup_done='1',
lumi_introduced='1', cells_auto_update='0', tutorial_seen='1',
lumi_introduced='1', package_updates_allowed='0', tutorial_seen='1',
habits_guide_seen='1', lumi_archive_migrated='0', lumi_chat=json.dumps(history))
for key, value in settings.items():
db.execute('INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) '
+1 -1
View File
@@ -126,7 +126,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-chat-history-") as directory, cont
user = db.execute("SELECT id FROM users LIMIT 1").fetchone()[0]
settings = dict(enabled_apps="31", main_tab="4", language="en", language_setup_done="1",
apps_setup_done="1", launcher_guide_seen="1", lumi_introduced="1", tutorial_seen="1",
cells_auto_update="0", lumi_archive_migrated="1")
package_updates_allowed="0", lumi_archive_migrated="1")
settings.update({"app_used_" + name: "1" for name in ("lumi", "habits", "lists", "diary", "practices")})
for key, value in settings.items():
db.execute("INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) "
+1 -1
View File
@@ -85,7 +85,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-lumi-performance-") as temporary,
values = {"language": "en", "language_system": 0, "language_setup_done": 1,
"apps_setup_done": 1, "launcher_guide_seen": 1,
"enabled_apps": 31, "lumi_introduced": 1,
"cells_auto_update": 0, "apps_last_update_check": 1900000000,
"package_updates_allowed": 0, "apps_last_update_check": 1900000000,
"tutorial_seen": 1, "habits_guide_seen": 1, "ui_scale": 10,
"navigation_placement": 0 if MOBILE else 1, "navigation_collapsed": 0,
"launcher_favorite_count": 5,
+1 -1
View File
@@ -184,7 +184,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-lumi-ui-") as directory:
"enabled_apps": "31", "app_used_lists": "1", "app_used_lumi": "1",
"app_used_habits": "1", "app_used_practices": "1", "app_used_diary": "1",
"main_tab": "4", "language": "en", "language_setup_done": "1",
"apps_setup_done": "1", "lumi_introduced": "1", "cells_auto_update": "0",
"apps_setup_done": "1", "lumi_introduced": "1", "package_updates_allowed": "0",
"tutorial_seen": "1", "habits_guide_seen": "1",
}.items():
db.execute("INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) "
+3
View File
@@ -135,6 +135,9 @@ static void request(void) {
}
int32_t RunPackageManagerFixture(void) {
pump();
assert(starts == 0); /* Unasked means no implicit request. */
assert(!package_manager_PackageAutomaticEnabled());
package_manager_PackageSetAutomatic(false);
pump();
assert(starts == 0); /* Off means no implicit request. */
+1 -1
View File
@@ -81,7 +81,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-practice-images-") as directory:
user = db.execute("SELECT id FROM users WHERE kind='local' LIMIT 1").fetchone()[0]
settings = {"language": "en", "language_system": 0, "language_setup_done": 1,
"apps_setup_done": 1, "main_tab": 1, "tutorial_seen": 1,
"habits_guide_seen": 1, "launcher_guide_seen": 1, "cells_auto_update": 0,
"habits_guide_seen": 1, "launcher_guide_seen": 1, "package_updates_allowed": 0,
"apps_last_update_check": 1900000000}
for key, value in settings.items():
db.execute("INSERT INTO settings(user_id,key,value,updated_at) VALUES(?,?,?,1) "
+1 -1
View File
@@ -235,7 +235,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-session-window-") as directory, co
# was started from, not to the first pinned app.
values = dict(enabled_apps="31", main_tab="1", language="en", language_setup_done="1",
apps_setup_done="1", launcher_guide_seen="1", lumi_introduced="1", tutorial_seen="1",
cells_auto_update="0", habits_guide_seen="1", launcher_favorite_count="3",
package_updates_allowed="0", habits_guide_seen="1", launcher_favorite_count="3",
launcher_favorite_0="12", launcher_favorite_1="1", launcher_favorite_2="2",
picture_in_picture="0")
values.update({"app_used_" + name: "1" for name in ("lumi", "habits", "lists", "diary", "practices")})
+1 -1
View File
@@ -124,7 +124,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-settings-") as temporary, contextl
"apps_setup_done": 1, "launcher_guide_seen": 1,
"enabled_apps": 22, "lumi_introduced": 1,
"main_tab": 1, "tutorial_seen": 1, "habits_guide_seen": 1, "ui_scale": 10, "navigation_placement": 1,
"navigation_collapsed": 0, "cells_auto_update": 0,
"navigation_collapsed": 0, "package_updates_allowed": 0,
"apps_last_update_check": 1900000000,
"launcher_favorite_count": 2, "launcher_favorite_0": 12, "launcher_favorite_1": 1,
"bottom_nav_route_count": 4, "bottom_nav_route_0": 12,
+1 -1
View File
@@ -100,7 +100,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-startup-quit-") as temporary, cont
user = db.execute("SELECT id FROM users WHERE kind='local' LIMIT 1").fetchone()[0]
values = {"language": "en", "language_system": 0, "language_setup_done": 1,
"apps_setup_done": 0, "enabled_apps": 22, "lumi_introduced": 1,
"cells_auto_update": 0, "apps_last_update_check": 1900000000,
"package_updates_allowed": 0, "apps_last_update_check": 1900000000,
"tutorial_seen": 1, "habits_guide_seen": 1, "launcher_guide_seen": 1,
"ui_scale": 10,
"navigation_placement": 1, "navigation_collapsed": 0,
+1 -1
View File
@@ -107,7 +107,7 @@ with tempfile.TemporaryDirectory(prefix="inbe-tab-switch-") as temporary, contex
user = db.execute("SELECT id FROM users WHERE kind='local' LIMIT 1").fetchone()[0]
values = {"language": "en", "language_system": 0, "language_setup_done": 1,
"apps_setup_done": 1, "enabled_apps": 31, "lumi_introduced": 1,
"cells_auto_update": 0, "apps_last_update_check": 1900000000,
"package_updates_allowed": 0, "apps_last_update_check": 1900000000,
"tutorial_seen": 1, "habits_guide_seen": 1, "launcher_guide_seen": 1,
"ui_scale": 10, "navigation_placement": 0 if WIDTH < 500 else 1,
"navigation_collapsed": 0, "launcher_favorite_count": 5, "main_tab": 3,
+2
View File
@@ -166,6 +166,8 @@ class VersionTest(unittest.TestCase):
script = self.root / "scripts/list-expected-release-assets.sh"
result = subprocess.run(["sh", str(script)], capture_output=True, text=True, check=True)
self.assertIn(f"inbe-{self.version}.apk", result.stdout.splitlines())
# F-Droid's metadata compares its build with this signed APK.
self.assertIn(f"inbe-{self.version}-fdroid.apk", result.stdout.splitlines())
for invalid in ("", "Unreleased", "2.0", "2.0.0\n3.0.0", "02.0.0"):
with self.subTest(version=invalid):
result = subprocess.run(["sh", str(script), invalid], capture_output=True, check=False)