27 Commits
Author SHA1 Message Date
bonzi 54772ffdac build: raise base versionCode above timestamp-based dev builds dev-v0.4.1.26-c1793740002 dev-v0.4.1.27-c1793740003 dev-v0.4.1.28-c1793740004 dev-v0.4.1.29-c1793740005 dev-v0.4.1.30-c1793740006 dev-v0.4.1.31-c1793740007 2026-11-03 18:57:49 +00:00
bonzi 4881d80e1b build: add public AOSP platform signing key used by build.sh dev-v0.4.1.25-c1793740001 2026-11-03 18:50:50 +00:00
bonzi dcbd41d37b feat: automatic settings/trip backup that survives uninstall, mic and camera tests
Dev build 0.4.1.24. Also includes previously uncommitted work in the tree.
2026-11-03 18:49:53 +00:00
alex 37a1189fe6 feat: integrate vehicle controls, audio, assistant, plugins and verified releases dev-v0.4.1.21-c1789217108 dev-v0.4.1.22-c1789217109 dev-v0.4.1.23-c1789217110 dev-v0.4.1.24-c1789217111 2026-10-07 06:55:34 +00:00
bonzi 426435ac27 chore: publish analytics bootstrap config dev-v0.4.1.19-c1789217106 dev-v0.4.1.20-c1789217107 2026-10-07 03:57:31 +02:00
alex bb6255c45b feat: full mg-utility v0.3.0 update
- Charging: arrival briefing + geofence + automation rules
- Audio: adaptive leveling manager + raw samples activity + speed audio curve
- Display: brightness schedule + scheduler + widgets panel overlay
- Trips: charts, database, tracking service, map activity
- Theming: config store, theme editor, UI theme expansion
- UX: control panel overlay + soundboard + settings overhaul
- Tests: AdaptiveAudioCurveTest, BrightnessScheduleTest
- Manifest: new permissions and queries for added features
- README + THIRD_PARTY_NOTICES refreshed
stable-v0.4.0-c1789217033 dev-v0.3.0-dev.20260912124445.bb6255c-c1789217085 stable-v0.4.0-c1789217086 stable-v0.4.1-c1789217087 dev-v0.4.1.1-c1789217088 dev-v0.4.1.2-c1789217089 dev-v0.4.1.3-c1789217090 dev-v0.4.1.4-c1789217091 dev-v0.4.1.5-c1789217092 dev-v0.4.1.6-c1789217093 dev-v0.4.1.7-c1789217094 dev-v0.4.1.8-c1789217095 dev-v0.4.1.9-c1789217096 dev-v0.4.1.10-c1789217097 dev-v0.4.1.11-c1789217098 dev-v0.4.1.12-c1789217099 dev-v0.4.1.13-c1789217100 dev-v0.4.1.14-c1789217101 dev-v0.4.1.15-c1789217102 dev-v0.4.1.16-c1789217103 dev-v0.4.1.17-c1789217104 dev-v0.4.1.18-c1789217105
2026-09-11 15:29:28 +00:00
MG Utility Bot 891831f08f docs: prepare public release README 2026-08-31 16:33:13 +00:00
MG Utility Bot 30d665ae26 home: keep original range line; move status label below it
The header strip now always shows the original 'RANGE N KM •
BATTERY X.X V' line. While a charge or discharge session is active,
the same line is extended with the instantaneous power, current,
remaining minutes and ETA. The animated status label is rendered on a
second row underneath so the two no longer overlap, and the redundant
'CHARGING'/'DISCHARGING' prefix is removed from the label since the
prefix is now redundant with the animated status itself.

Also fix the broken ETA text: 'DateFormat.format("DONE HH:mm", ...)'
treated the literal 'DONE' as a date pattern token, producing
'DONSun 21:47'. The literal is now appended outside the format string
so the ETA renders as 'DONE 21:47'.

A small helper shrinks the first-line text when the extended string
exceeds 94%% of the screen width, keeping it on a single row at every
font scale.
2026-08-30 12:37:30 +00:00
MG Utility Bot b9cfb7f01d home: live charging/discharging status banner with animated gradient
Surface the OEM charging-app telemetry on the home screen while a charge
or discharge session is active. Idle samples keep the original
RANGE / BATTERY line untouched.

Reads four extra read-only transactions from IVehicleChargingService:
getDischargingStatus (0x30), getActualChargingCurrent (0x07),
getPredictChargingTime (0x05), getPredictDischargingTime (0x29). The
gateway only issues these when charging or discharging is active so the
2-second dashboard poll stays cheap while idle.

The Sample model grows the new fields; existing call sites are
unchanged. A new ChargingStatus helper decodes the OEM enum values
(taken from the com.saicmotor.hmi.vehiclesettings resources) into
short labels matching the stock charging app wording.

DashboardGauges renders a two-line banner in the existing status
strip: 'CHARGING  FAST/SLOW CHARGING' on the first line, the
instantaneous kW, current A, predicted minutes and ETA on the second.
Discharge uses 'DISCHARGING  ...' with kW out. While the banner is
visible the title shimmers with a slow green (charging) or cyan
(discharging) gradient sweep; the animation stops and the shader is
cleared the moment the car goes idle.
2026-08-30 11:42:37 +00:00
MG Utility Bot 9969c40211 Add all-apps drawer, drag reordering, and dark color themes
- Browse, pin, uninstall, and inspect installed launcher apps
- Improve app-pin drag-and-drop reordering feedback
- Add dark red, green, and magenta themes
2026-08-29 22:25:04 +00:00
Codex ab813b1b79 Always rebuild the home layout in onResume so the SETTINGS button tracks the control-panel pref
buildUi() was only being re-run when UiTheme.version() changed, so toggling
the control-panel switch in SettingsActivity would leave the launcher
holding on to the previous home layout — the SETTINGS button that should
have appeared/disappeared stuck in whichever state it was rendered in
first. Rebuilding the home layout every resume (after applicationStarted)
is cheap and keeps the button visibility in sync with the latest prefs.
2026-08-29 16:16:42 +00:00
Codex fe90676c25 Clarify and tidy the home-screen SETTINGS button visibility rule
The behaviour was already correct (button rendered when the control
panel is off, hidden when it is on), but the comment was misleading
and the button used a fixed 118x48px size that didn't match the
panel's own SETTINGS button. Switched to dp units that line up with
the rest of the home screen chrome so the two SETTINGS buttons feel
like the same control.
2026-08-29 16:08:29 +00:00
Codex 7ca86bb5bd Replace header gear with proper SETTINGS button; route in-panel Settings shortcut to the control panel editor
The 38dp gear icon was getting clipped and went straight to the
control panel settings editor, which wasn't what the user expected.

* Header right-hand button is now a styled UiTheme "SETTINGS" text
  button at full row height (38dp) and WRAP_CONTENT width so the
  label is never truncated. Click opens the normal SettingsActivity
  (the category hub) instead of the control-panel editor.
* The Settings shortcut tile inside the control panel now points at
  ControlPanelSettingsActivity — that's where you reorder / add /
  remove toggles and sliders, which is what an entry under the
  CONTROL PANEL heading should reach.
2026-08-29 15:48:08 +00:00
Codex 2a109bed6e Apply slider values live while dragging
Each slider now updates brightness / volume while the finger is on the
bar instead of only when the user lets go. A 50 ms coalescing handler
turns a stream of touch events into one MG-bridge / AudioManager call
every frame so the IPC traffic stays reasonable while the visual
feedback stays live. The onStopTrackingTouch callback flushes the
final value in case the last drag happened inside the debounce window.
2026-08-29 15:40:44 +00:00
Codex 9f7dda6183 Fix toggle icon color after enabling, redesign inline sliders, swap home settings button for header gear
Toggle icon refresh after enabling
- Bluetooth and Wi-Fi enable/disable is async on Android. Refreshing the
  panel immediately after a successful toggle read the pre-toggle state
  and left the icon coloured the wrong way. Schedule a refresh 600 ms
  and 1400 ms after each successful toggle so the icon reflects the
  real on/off state once the head unit settles.

Slider redesign
- Drop the slate box around each slider and the small icon/label row.
- The bar is now the visual element: a tall 64 dp blocky track with no
  rounded corners.
- Label sits inside the cyan-filled portion on the left, the current
  percent sits inside the dark unfilled portion on the right.
- The initial value is read via readSliderValue (MG service first, then
  AudioManager) and applied to both the SeekBar progress and the
  drawable's percent field before the first draw, so the bar shows the
  real current level on render instead of starting at 0%.
- Sliders take 1/3 of the panel width, toggles take 2/3 so the owner
  can place custom widgets and toggles in the wider area.

Home screen settings button
- Hide the top-right SETTINGS button on the home screen when the
  swipe-down control panel is enabled.
- The control panel header now shows a small gear icon (\u2699) on the
  right at the same height as the title, which opens the
  ControlPanelSettingsActivity directly. Title text changes from
  QUICK CONTROLS to CONTROL PANEL.
2026-08-29 15:37:28 +00:00
Codex 23f1606ef6 Use VOL_FLAG_SETTINGS when calling MG SmartSoundService.setVolume
The official OEM Settings app passes 0x65 (VOL_FLAG_SETTINGS) as the
flag when invoking SmartSoundManager.setVolume, not 0x64
(VOL_FLAG_SYSTEM_UI). Matching that flag is what makes MG's volume
mixer actually accept our slider changes — the previous flag was
being silently ignored by the car audio manager.
2026-08-29 15:16:33 +00:00
Codex db6d03b3f6 Wire control panel to MG system-settings services
The SAIC head-unit's brightness/volume/wifi/bluetooth are controlled
authoritatively by com.saicmotor.service.systemsettings (the
SettingsService), not the standard Android APIs. Calls through
AudioManager.setStreamVolume, Settings.System.SCREEN_BRIGHTNESS,
WifiManager.setWifiEnabled, and BluetoothAdapter.enable()/disable()
were no-ops (or crashed) on this unit.

* New MgServiceBridge talks raw IBinder to:
  - IGeneralService for get/setBrightness (transaction codes 1, 3)
  - ISmartSoundService for get/setVolume + getMax/getMin (0x28..0x2b)
  - IWiFiService for get/setWifiEnabled (0x3, 0x4)
  - IBtService for get/setBluetoothEnabled (0x2, 0x3)
* ControlPanelOverlay tries the MG bridge first; falls back to the
  standard Android APIs when the head unit service isn't running.
* Adds CHANGE_WIFI_STATE, BLUETOOTH_ADMIN, BLUETOOTH_SCAN and
  WRITE_SETTINGS permissions so the fallback paths also work.
* Adds OnConnectedListener so the panel re-renders as soon as a
  service connects (avoids showing stale state).
* Ignore SetupWizardActivity.java which is a stale WIP file from
  an earlier session that doesn't compile and isn't referenced.
2026-08-29 15:11:18 +00:00
Codex 9ceceb2a6e Fix swipe-down control panel: functional toggles, permissions, MG-style visuals, mutual exclusivity
- ControlPanelCatalog: drop auto_hold (no MG API), rename icon to iconKey
- ControlPanelOverlay: vector-drawn ControlIconView + circular ToggleRingView +
  blocky BlockySliderDrawable to match official MG quick-control panel
- Bluetooth: request runtime BLUETOOTH_CONNECT on Android 12+, retry toggle after grant
- Wi-Fi: wrap setWifiEnabled in try/catch so head units that block it no longer crash
- Brightness: launch WRITE_SETTINGS permission intent when missing instead of crashing
- Volume sliders: catch SecurityException and surface a useful toast instead of failing silently
- Long-press on bluetooth/wifi tiles opens the system settings page
- App drawer and control panel are mutually exclusive in MainActivity.dispatchTouchEvent
- LauncherPins: add moveToIndex helper used by the new drag-to-reorder flow
- SettingsActivity: add Apps Reorder toggle, wiggle animation, full drag/drop reorder
- ControlPanelSettingsActivity: rename .icon references to .iconKey
2026-08-29 15:03:18 +00:00
Codex 22162d32c7 Add swipe-up app drawer and swipe-down quick control panel overlays with customizable editors
Adds the app drawer (swipe-up) and the quick control panel (swipe-down) on the home screen, mirroring the official MG layout while staying on the existing theme.

Highlights
- App drawer overlay pins apps configured under Settings → Apps; opacity configurable in Settings (default 80%). Tap a tile to launch the pinned app, swipe up to open, swipe down to close.
- Control panel overlay opens on swipe-down and provides quick access controls. Preloaded with Brightness, Media/Phone/Voice volume sliders; Bluetooth, Wi-Fi, Autohold toggles (each toggle: tap to toggle state, long-press opens the matching settings page); plus Energy dashboard / Charging automation / Settings shortcuts.
- Control panel editor (ControlPanelSettingsActivity) lets users add/remove/reorder controls, and includes RESTORE DEFAULTS / ADD ALL / CLEAR actions.
- Removes toggles we cannot drive (vehicle hotspot, screen off, data traffic, door lock, ESC off) per user preference.
- Visual style matches the official MG control panel: rectangular/blocky sliders with custom track + progress (no thumb) and circular GradientDrawable.OVAL toggle tiles.
2026-08-28 22:04:28 +00:00
MG Utility Bot 56ee717144 Sync full build: speed reactive audio, settings hub, vehicle settings, key remapping, debug console, theme editor, launcher pins, map cache, trip charts, charging/energy/trip dashboards, media notification listener, music player, and docs
New feature: speed reactive audio (Settings > Misc). Pick an MP3 and a dedicated volume; the always-on trip tracker shifts the clip's pitch and playback rate from min to max speed while you drive. Loop-with-speed is the default; a toggle enables layered overlap so speed changes never cut the clip off.

Build script already compiles every module included in this commit.
2026-08-28 18:32:40 +00:00
bonzi 85990ca21d Refresh MG Utility SAIC dashboard UI 2026-08-20 12:43:23 +00:00
bonzi 3aadba8b35 Show 15-minute charging price graph 2026-08-10 21:11:59 +00:00
bonzi e57f5eb485 Add charging automation workspace to MG Utility 2026-08-10 21:01:48 +00:00
bonzi a9e85e3ed4 Point emulator docs to shared repository 2026-08-10 17:23:20 +00:00
bonzi 21b403a07f Add background trip tracking and reports 2026-08-10 17:04:45 +00:00
Zebratic 333eec74e9 Expose read-only vehicle data bridge 2026-07-31 22:43:37 +02:00
alex 8ec9f856d0 Initial MG Utility app 2026-07-30 09:02:18 +09:00