Skip to content

v0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 13 Nov 20:26
· 3 commits to main since this release
61366f8

AltShift v0.5.0 — localization, per-app language selection, and responsive layout release for Android 8.0+ since v0.4.4. It adds a complete, idiomatic Russian translation, automatic matching to the system locale, and an in-app System default / English / Русский selector synced with Android 13+ App Language Settings. Every screen, dialog, overlay, and notification was re-proportioned for 360dp–sw800dp displays and landscape orientations with zero unwanted text truncation, and Android 16 device testing resolved the Material 3 IME fallback crash, background notification localization on API 33+, and BigTextStyle notification expansion. Transliteration, hotkey dispatch, and the zero-daemon typing path are unchanged.


🌐 Russian Localization & Per-App Language

  • Complete values-ru translation: Adds 140 Russian strings covering the dashboard, onboarding wizard, dialogs, Dynamic Island, notifications, safety warning, and watchdog status using native Android terminology (Поверх других окон, Без ограничений / С ограничениями, Для разработчиков, Отладка по USB, Автопереключение клавиатуры (по желанию), Как настроить, Назначение комбинации, Диагностика устройства, Идентификаторы (VID/PID)) and consistent masculine agreement for AltShift. Invariant values (app_name, ime_name, English, Русский, ADB command, and diagnostic formats) are marked translatable="false".
  • In-app selector & Android 13+ sync: A toolbar language button opens a System default / English / Русский picker backed by AppLanguage and LocaleController (AppCompatDelegate.setApplicationLocales()). android:localeConfig="@xml/locales_config" and AppLocalesMetadataHolderService (autoStoreLocales=true) persist the choice and keep it synced with Settings → System → Languages → App languages.
  • Non-Activity localization: LocaleController.localizedContext() checks the context's active configuration locale and rebuilds a configuration context when a long-lived Application or service context holds an outdated locale (falling back to LocaleManager.getApplicationLocales() on API 33+ when no AppCompat delegate is attached). LocaleController.refreshLocalizedNotifications() recreates notification channels and updates any active watchdog or safety-warning notification immediately on language change.

📐 Responsive Layouts, Theme & Notification Fixes

  • Material 3 IME fallback fix: ThemeController.themedContext() unifies localization and persisted ThemeMode resolution with ContextThemeWrapper(..., R.style.Theme_AltShift) for both KeyboardPromptOverlay and HardwareInputService.onCreateInputView(), eliminating the Material attribute InflateException under Theme.DeviceDefault.InputMethod (with a guarded plain TextView fallback).
  • Full expanded notifications (BigTextStyle): KeyboardNotification, KeyboardWarningNotification, and KeyboardWatchdogService now attach Notification.BigTextStyle().bigText(body) using framework APIs (minSdk 26), preventing 2-line ... truncation on expanded notifications across phone and tablet widths.
  • Toolbar status badge & tablet proportions: The status badge sits on its own row below the toolbar with wrap_content height (minHeight="30dp"), 6dp vertical padding, and no ellipsize cap, fitting Клавиатура отключена · IME неактивен and Keyboard disconnected · IME inactive in full at 360dp. Dashboard content reuses onboarding_content_side_margin (0dp phones, 48dp sw600dp, 96dp sw800dp, 240dp sw800dp landscape) so cards stay centered on wide screens.
  • Adaptive controls & Dynamic Island: Phone hotkey rows (item_hotkey.xml) stack the key badge below the app name while layout-sw600dp keeps it right-aligned; the language shortcut auto-sizes (16sp–22sp, 2 lines); buttons allow 2 lines with 48dp minimum height. The Dynamic Island uses 12dp/16dp outer horizontal padding, allows 2-line wrapping without ellipsis on phones (520dp landscape cap), and keeps the single-line 420dp capsule on sw600dp+.
  • Dialogs & onboarding: Added values-land tuning (72dp icon, reduced vertical padding) for 360dp-high landscape onboarding, adaptive screen-height sizing (160dp–360dp/420dp) for AppPickerDialog, scrollable landscape-safe KeyCaptureDialog, and tightened vertical spacing in AboutDialog so all diagnostics fit before scrolling at 360dp.

🧪 Build, Tests & Verification

  • Version & toolchain: versionCode 12, versionName '0.5.0' (AltShift-v0.5.0.apk / AltShift-v0.5.0-debug.apk). Toolchain unchanged: minSdk 26, targetSdk 34, Java 21, Gradle 8.9, AGP 8.7.3.
  • Docs updated: README.md and STYLEGUIDE.md (§5.4–5.5 and review checklist) updated to reflect per-app localization, BigTextStyle/themed contexts, and the responsive Dynamic Island conventions.
  • Automated checks: ./gradlew clean test lintDebug assembleDebug and post-merge ./gradlew test lintDebug assembleDebug passed with 52 JVM tests (including new AppLanguageTest, LocaleControllerTest, and ThemeControllerTest) and zero Android Lint issues.
  • Device verification (Lenovo TB710FU, Android 16, 2000×3200 @ 400 dpi): Verified in English and Russian, Light and Dark themes, across sw800dp (portrait/landscape), sw600dp, 411dp, and 360dp (portrait/landscape) with uiautomator truncation audits (0 unwanted ellipses/overlaps). Verified live on-device: Material 3 IME fallback rendering (ru Dark & en Light, 800dp & 360dp), KeyboardWarningNotification and KeyboardWatchdogService localization + full BigTextStyle extras, and AboutDialog fit at 360dp.
  • Remaining manual checks: Physical pogo-pin reattach end-to-end trigger and non-Lenovo OEM per-app language settings.

📥 Installation

Asset Description
AltShift-v0.5.0.apk Release build, R8-minified, signed with the CI release keystore.
AltShift-v0.5.0-debug.apk Debug build, unminified, signed with the local debug key.
adb install -r AltShift-v0.5.0.apk
adb shell ime enable ru.b1sted.altshift/.service.HardwareInputService
adb shell ime set ru.b1sted.altshift/.service.HardwareInputService

Optional provisioning grants:

adb shell pm grant ru.b1sted.altshift android.permission.WRITE_SECURE_SETTINGS
adb shell pm grant ru.b1sted.altshift android.permission.POST_NOTIFICATIONS
adb shell appops set ru.b1sted.altshift SYSTEM_ALERT_WINDOW allow
adb shell cmd deviceidle whitelist +ru.b1sted.altshift

Note: Debug and release APKs use different signing keys (adb uninstall ru.b1sted.altshift is required when switching between them). Uninstalling clears altshift_prefs, WRITE_SECURE_SETTINGS, and the battery exemption.


🔨 Building from Source

Requires JDK 21, Android SDK Platform 34 (Build-Tools 34.0.0), and sdk.dir in local.properties:

./gradlew test lintDebug assembleDebug
# Or signed release (with KEYSTORE_FILE / KEYSTORE_PASSWORD / KEY_ALIAS / KEY_PASSWORD or scripts/build-release.sh):
./gradlew assembleRelease

⚠️ Notes & Limitations

  • Single APK: Both en and ru resources ship in the single APK without Play Core downloads or language splits.
  • Cached notification channels: Recreating channels after a language change updates their labels unless the user has manually customized a channel name in system settings.
  • No hot-path or backup changes: Key dispatch/transliteration are untouched, and allowBackup="false" resets preferences on uninstall or pm clear.

🛡️ Security & Analysis (AltShift-v0.5.0.apk)


Full Changelog: v0.4.4...v0.5.0