mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-12-01 07:40:31 +01:00
Updates no longer install by themselves unless turned on in Settings
This commit is contained in:
1 parent
db5025052b
commit
b010c35a73
1 file changed
+6
-2
@@ -113,8 +113,12 @@ object UpdateChecker {
|
|||||||
if (!on) NotificationManagerCompat.from(context).cancel(NOTIFICATION_ID)
|
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) {
|
fun setSilentEnabled(context: Context, on: Boolean) {
|
||||||
prefs(context).edit().putBoolean(KEY_SILENT, on).apply()
|
prefs(context).edit().putBoolean(KEY_SILENT, on).apply()
|
||||||
|
|||||||
Reference in new issue
Block a user