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

Commit be1c803e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Set initial ModesTile state to inactive" into main

parents 024e943a a1ac4ee8
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.Flags
import android.content.Intent
import android.os.Handler
import android.os.Looper
import android.service.quicksettings.Tile
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.coroutineScope
import androidx.lifecycle.repeatOnLifecycle
@@ -94,7 +95,13 @@ constructor(

    override fun getTileLabel(): CharSequence = tileState.label

    override fun newTileState() = QSTile.State()
    override fun newTileState(): QSTile.State {
        return QSTile.State().apply {
            label = mContext.getString(R.string.quick_settings_modes_label)
            icon = ResourceIcon.get(R.drawable.qs_dnd_icon_off)
            state = Tile.STATE_INACTIVE
        }
    }

    override fun handleClick(expandable: Expandable?) = runBlocking {
        userActionInteractor.handleClick(expandable)