Updates no longer install by themselves unless turned on in Settings

This commit is contained in:
Seb3thehacker committed 2026-11-29 16:29:58 -08:00
1 parent db5025052b
commit b010c35a73
1 file changed
+6 -2
@@ -113,8 +113,12 @@ object UpdateChecker {
if (!on) NotificationManagerCompat.from(context).cancel(NOTIFICATION_ID)
}
/** Whether a Stable update installs by itself on Wi-Fi with no car connected. On by default. */
fun silentEnabled(context: Context): Boolean = prefs(context).getBoolean(KEY_SILENT, true)
/**
* Whether a Stable update installs by itself on Wi-Fi with no car connected. Off unless the
* driver turns it on: an app that replaces itself unasked was the first worry people raised
* about Gearslip's security, so by default an update waits for a tap.
*/
fun silentEnabled(context: Context): Boolean = prefs(context).getBoolean(KEY_SILENT, false)
fun setSilentEnabled(context: Context, on: Boolean) {
prefs(context).edit().putBoolean(KEY_SILENT, on).apply()