Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ca98d7d authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[Demo Mode] Don't persist demo mode across restarts.

Fixes: 255962314
Test: turn on demo mode, then restart device, and verify demo mode is no
longer enabled (both visually and in Settings > System UI Demo Mode)

Change-Id: I4e7c85dafc70fe8b0d600898d591b98097901c03
parent 2c34290e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@ class DemoModeController constructor(
    private val receiverMap: Map<String, MutableList<DemoMode>>

    init {
        // Don't persist demo mode across restarts.
        requestFinishDemoMode()

        val m = mutableMapOf<String, MutableList<DemoMode>>()
        DemoMode.COMMANDS.map { command ->
            m.put(command, mutableListOf())
@@ -74,7 +77,6 @@ class DemoModeController constructor(
        // content changes to know if the setting turned on or off
        tracker.startTracking()

        // TODO: We should probably exit demo mode if we booted up with it on
        isInDemoMode = tracker.isInDemoMode

        val demoFilter = IntentFilter()