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

Commit cf1e5e8b authored by Matt Pietal's avatar Matt Pietal
Browse files

Controls Ui - Remove temporary 'success' msg

This message was meant as a placeholder for action responses. Apps are
starting to send their own control updates and no longer need this
msg.

Bug: 150872080
Test: visual
Change-Id: I9c29250be9c3aeeb508c10305fc052b767617bcf
parent 4cf68151
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.service.controls.templates.TemperatureControlTemplate
import android.service.controls.templates.ThumbnailTemplate
import android.service.controls.templates.ToggleRangeTemplate
import android.service.controls.templates.ToggleTemplate
import android.util.Log
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
@@ -97,15 +98,8 @@ class ControlViewHolder(
    }

    fun actionResponse(@ControlAction.ResponseResult response: Int) {
        val text = when (response) {
            ControlAction.RESPONSE_OK -> "Success"
            ControlAction.RESPONSE_FAIL -> "Error"
            else -> ""
        }

        if (!text.isEmpty()) {
            setTransientStatus(text)
        }
        // TODO: b/150931809 - handle response codes
        Log.d(ControlsUiController.TAG, "Received response code: $response")
    }

    fun setTransientStatus(tempStatus: String) {