fix(sidecar): default reinstallApp in SetClearStateReinstall; cover non-android clear

Only Dial set reinstallApp, so a Client built another way would nil-deref on Android clear-state. Default it in SetClearStateReinstall too. Add a non-android test so the platform guard has negative coverage: dropping the android check would now fail.
This commit is contained in:
pj committed 2026-06-11 09:29:16 +05:30
1 parent 4c931635d7
commit b7d624662b
2 files changed
+22

No files matched your search

+3
View File
@@ -46,6 +46,9 @@ func (c *Client) SetClearStateReinstall(serial, apkPath string, output io.Writer
c.serial = serial
c.apkPath = apkPath
c.output = output
if c.reinstallApp == nil {
c.reinstallApp = android.ReinstallApp
}
}
// ForegroundApp reports the foreground package. Only Android is supported (via