Issue: Crashes after about 1 hour of operation, affecting the HA Companion App
Fix
- WakeLock Timeout - Adds 30-minute timeout + auto-renewal to prevent system killing
- Bluetooth Job Management - Add stop() method to properly clean up the scan task
- GlobalScope Replacement - Switch to structured concurrency to avoid coroutine leakage
- BluetoothProxy nested launch - Removed nested coroutines in GATT callbacks to prevent coroutine explosions
- WebView Crash Protection - Crashes 3 times in 1 minute to stop rebuilding, and the delay increases from 500ms to 2 seconds
- WebView Resource Cleanup - Cleans up all dialogs in onDestroy to prevent window leaks
- UDP Shutdown Optimization - Close the socket before canceling the job and add an exception log
