App 2.7.1: voice-key double press works; floating button removed

The car's key report, from the on-screen key log in 2.7.0:
android.intent.extra.hardkey.keycode = 287 (Integer),
android.intent.extra.hardkey.down (Boolean; one report on press, one on
release) and android.intent.extra.hardkey.longpress (Boolean). 2.7.0
only looked for short names like "keyCode", so it never found the code.
SteeringKeyReport now matches extras by the last part of their name,
case-insensitively, and is Android-free; its tests include the exact
double press logged on the car (releases 279 ms apart). Replayed in the
car's format on the emulator: double press opens the app, single and
long presses do not.

The floating button is removed (class, geometry and test, the overlay
permission, setting, switch and strings): it did not show over the MG4
launcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
2026-10-17 23:38:36 +02:00
co-authored by Claude Opus 5.5
parent af15b15db1
commit 55710fb722
15 changed files with 167 additions and 416 deletions
@@ -16,10 +16,6 @@ final class UploadSettings {
static final String KEY_LOW_SOC_PERCENT = "low_soc_percent";
static final String KEY_AUTOSTART = "autostart";
static final String KEY_ABRP_UPLOAD_ENABLED = "abrp_upload_enabled";
/** The floating button that opens the app over the head unit's own screens. */
static final String KEY_FLOATING_BUTTON = "floating_button";
static final boolean DEFAULT_FLOATING_BUTTON = true;
/** A double press of the steering wheel's voice key opens the app. */
static final String KEY_VOICE_KEY_OPENS = "voice_key_opens_app";
@@ -27,10 +23,6 @@ final class UploadSettings {
return prefs.getBoolean(KEY_VOICE_KEY_OPENS, true);
}
static boolean floatingButtonEnabled(SharedPreferences prefs) {
return prefs.getBoolean(KEY_FLOATING_BUTTON, DEFAULT_FLOATING_BUTTON);
}
/**
* On by default: an ABRP plan is only useful if it is fed from the moment the drive
* starts, and nobody opens this app before setting off. Kept as a switch because a