Skip to content
Snippets Groups Projects
Commit d87813a7 authored by Nick's avatar Nick :v: Committed by Dhina17
Browse files

EasterEgg: allow using toy without unlocking

* useful to test proper operation of home controls modifications
* easier than buying an smart home :)

Change-Id: I7fb23089611be6d50f252e2d8f6c1d1bba202cb6
parent b13135a9
No related branches found
No related tags found
No related merge requests found
......@@ -125,6 +125,7 @@ public class NekoControlsService : ControlsProviderService(), PrefState.PrefsLis
private fun makeToyControl(icon: Icon?, thrown: Boolean): Control {
return Control.StatefulBuilder(CONTROL_ID_TOY, getPendingIntent())
.setDeviceType(DeviceTypes.TYPE_UNKNOWN)
.setAuthRequired(false)
.setCustomIcon(icon)
// ?.setTint(COLOR_TOY_FG)) // TODO(b/159559045): uncomment when fixed
.setCustomColor(ColorStateList.valueOf(COLOR_TOY_BG))
......@@ -141,6 +142,7 @@ public class NekoControlsService : ControlsProviderService(), PrefState.PrefsLis
private fun makeWaterBowlControl(fillLevel: Float): Control {
return Control.StatefulBuilder(CONTROL_ID_WATER, getPendingIntent())
.setAuthRequired(true)
.setDeviceType(DeviceTypes.TYPE_KETTLE)
.setTitle(colorize(getString(R.string.control_water_title), COLOR_WATER_FG))
.setCustomColor(ColorStateList.valueOf(COLOR_WATER_BG))
......@@ -156,6 +158,7 @@ public class NekoControlsService : ControlsProviderService(), PrefState.PrefsLis
private fun makeFoodBowlControl(filled: Boolean): Control {
return Control.StatefulBuilder(CONTROL_ID_FOOD, getPendingIntent())
.setAuthRequired(true)
.setDeviceType(DeviceTypes.TYPE_UNKNOWN)
.setCustomColor(ColorStateList.valueOf(COLOR_FOOD_BG))
.setTitle(colorize(getString(R.string.control_food_title), COLOR_FOOD_FG))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment