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

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

Controls API - Add support for routines

Apps can support the idea of a routine. Routines tie together multiple
actions across multiple controls to support everyday tasks that would
otherwise require multiple clicks.

Bug: 150869263
Test: atest ControlProviderTest
Change-Id: I3ee2c87c6130420032ebe407b2ffc1e3e8c1504f
parent 2f24aa6d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43504,6 +43504,7 @@ package android.service.controls {
    field public static final int TYPE_RADIATOR = 16; // 0x10
    field public static final int TYPE_REFRIGERATOR = 48; // 0x30
    field public static final int TYPE_REMOTE_CONTROL = 17; // 0x11
    field public static final int TYPE_ROUTINE = 52; // 0x34
    field public static final int TYPE_SECURITY_SYSTEM = 46; // 0x2e
    field public static final int TYPE_SET_TOP = 18; // 0x12
    field public static final int TYPE_SHOWER = 29; // 0x1d
+8 −2
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ import java.lang.annotation.RetentionPolicy;
public class DeviceTypes {

    // Update this when adding new concrete types. Does not count TYPE_UNKNOWN
    private static final int NUM_CONCRETE_TYPES = 51;
    private static final int NUM_CONCRETE_TYPES = 52;

    public static final @DeviceType int TYPE_UNKNOWN = 0;
    public static final @DeviceType int TYPE_AC_HEATER = 1;
@@ -87,6 +87,11 @@ public class DeviceTypes {
    public static final @DeviceType int TYPE_CAMERA = 50;
    public static final @DeviceType int TYPE_DOORBELL = 51;

    /*
     * Also known as macros, routines can aggregate a series of actions across multiple devices
     */
    public static final @DeviceType int TYPE_ROUTINE = 52;

    // Update this when adding new generic types.
    private static final int NUM_GENERIC_TYPES = 7;
    public static final @DeviceType int TYPE_GENERIC_ON_OFF = -1;
@@ -165,7 +170,8 @@ public class DeviceTypes {
            TYPE_REFRIGERATOR,
            TYPE_THERMOSTAT,
            TYPE_CAMERA,
            TYPE_DOORBELL
            TYPE_DOORBELL,
            TYPE_ROUTINE
            })
    public @interface DeviceType {}