Loading api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -2945,7 +2945,7 @@ package android.hardware.lights { public final class LightsManager.LightsSession implements java.lang.AutoCloseable { method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void close(); method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void setLights(@NonNull android.hardware.lights.LightsRequest); method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void requestLights(@NonNull android.hardware.lights.LightsRequest); } public final class LightsRequest { Loading api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1280,7 +1280,7 @@ package android.hardware.lights { public final class LightsManager.LightsSession implements java.lang.AutoCloseable { method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void close(); method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void setLights(@NonNull android.hardware.lights.LightsRequest); method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void requestLights(@NonNull android.hardware.lights.LightsRequest); } public final class LightsRequest { Loading core/java/android/hardware/lights/Light.java +21 −6 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ public final class Light implements Parcelable { /** * Creates a new light with the given data. * * @hide */ * @hide */ public Light(int id, int ordinal, int type) { mId = id; mOrdinal = ordinal; Loading Loading @@ -76,8 +77,24 @@ public final class Light implements Parcelable { } }; @Override public boolean equals(Object obj) { if (obj instanceof Light) { Light light = (Light) obj; return mId == light.mId && mOrdinal == light.mOrdinal && mType == light.mType; } return false; } @Override public int hashCode() { return mId; } /** * Returns the id of the light. * * <p>This is an opaque value used as a unique identifier for the light. */ public int getId() { return mId; Loading @@ -86,11 +103,9 @@ public final class Light implements Parcelable { /** * Returns the ordinal of the light. * * <p>This represents the physical order of the lights on the device. The exact values are * device-dependent, but for example, if there are lights in a row, sorting the Light objects * by ordinal should match the order in which they appear on the device. If the device has * 4 lights, the ordinals could be [1, 2, 3, 4] or [0, 10, 20, 30] or any other values that * have the same sort order. * <p>This is a sort key that represents the physical order of lights on the device with the * same type. In the case of multiple lights arranged in a line, for example, the ordinals * could be [1, 2, 3, 4], or [0, 10, 20, 30], or any other values that have the same sort order. */ public int getOrdinal() { return mOrdinal; Loading core/java/android/hardware/lights/LightsManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ public final class LightsManager { * @param request the settings for lights that should change */ @RequiresPermission(Manifest.permission.CONTROL_DEVICE_LIGHTS) public void setLights(@NonNull LightsRequest request) { public void requestLights(@NonNull LightsRequest request) { Preconditions.checkNotNull(request); if (!mClosed) { try { Loading core/java/android/hardware/lights/LightsRequest.java +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public final class LightsRequest { * Create a LightsRequest object used to override lights on the device. * * <p>The generated {@link LightsRequest} should be used in * {@link LightsManager.Session#setLights(LightsLightsRequest). * {@link LightsManager.Session#requestLights(LightsLightsRequest). */ public @NonNull LightsRequest build() { return new LightsRequest(mChanges); Loading Loading
api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -2945,7 +2945,7 @@ package android.hardware.lights { public final class LightsManager.LightsSession implements java.lang.AutoCloseable { method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void close(); method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void setLights(@NonNull android.hardware.lights.LightsRequest); method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void requestLights(@NonNull android.hardware.lights.LightsRequest); } public final class LightsRequest { Loading
api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1280,7 +1280,7 @@ package android.hardware.lights { public final class LightsManager.LightsSession implements java.lang.AutoCloseable { method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void close(); method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void setLights(@NonNull android.hardware.lights.LightsRequest); method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void requestLights(@NonNull android.hardware.lights.LightsRequest); } public final class LightsRequest { Loading
core/java/android/hardware/lights/Light.java +21 −6 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ public final class Light implements Parcelable { /** * Creates a new light with the given data. * * @hide */ * @hide */ public Light(int id, int ordinal, int type) { mId = id; mOrdinal = ordinal; Loading Loading @@ -76,8 +77,24 @@ public final class Light implements Parcelable { } }; @Override public boolean equals(Object obj) { if (obj instanceof Light) { Light light = (Light) obj; return mId == light.mId && mOrdinal == light.mOrdinal && mType == light.mType; } return false; } @Override public int hashCode() { return mId; } /** * Returns the id of the light. * * <p>This is an opaque value used as a unique identifier for the light. */ public int getId() { return mId; Loading @@ -86,11 +103,9 @@ public final class Light implements Parcelable { /** * Returns the ordinal of the light. * * <p>This represents the physical order of the lights on the device. The exact values are * device-dependent, but for example, if there are lights in a row, sorting the Light objects * by ordinal should match the order in which they appear on the device. If the device has * 4 lights, the ordinals could be [1, 2, 3, 4] or [0, 10, 20, 30] or any other values that * have the same sort order. * <p>This is a sort key that represents the physical order of lights on the device with the * same type. In the case of multiple lights arranged in a line, for example, the ordinals * could be [1, 2, 3, 4], or [0, 10, 20, 30], or any other values that have the same sort order. */ public int getOrdinal() { return mOrdinal; Loading
core/java/android/hardware/lights/LightsManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ public final class LightsManager { * @param request the settings for lights that should change */ @RequiresPermission(Manifest.permission.CONTROL_DEVICE_LIGHTS) public void setLights(@NonNull LightsRequest request) { public void requestLights(@NonNull LightsRequest request) { Preconditions.checkNotNull(request); if (!mClosed) { try { Loading
core/java/android/hardware/lights/LightsRequest.java +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ public final class LightsRequest { * Create a LightsRequest object used to override lights on the device. * * <p>The generated {@link LightsRequest} should be used in * {@link LightsManager.Session#setLights(LightsLightsRequest). * {@link LightsManager.Session#requestLights(LightsLightsRequest). */ public @NonNull LightsRequest build() { return new LightsRequest(mChanges); Loading