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

Commit 2caf7fa7 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Controls Ui - Remove temporary 'success' msg" into rvc-dev am: 9f63e946

Change-Id: I3d66b185c4f1cea778d8f9724a7744e22dbf6c0c
parents ec1088c1 9f63e946
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) {