blob: 706c74137755bfe77d6ae0940a24e9da4028c000 [file] [log] [blame]
Adam Lesinski182f73f2013-12-05 16:48:06 -08001/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.server.lights;
18
Robin Leeb9e44e52020-02-07 04:18:20 +010019import android.annotation.Nullable;
Steven Moreland8b9ec4f2016-10-04 17:25:52 -070020import android.hardware.light.V2_0.Type;
21
Adam Lesinski182f73f2013-12-05 16:48:06 -080022public abstract class LightsManager {
Steven Moreland8b9ec4f2016-10-04 17:25:52 -070023 public static final int LIGHT_ID_BACKLIGHT = Type.BACKLIGHT;
24 public static final int LIGHT_ID_KEYBOARD = Type.KEYBOARD;
25 public static final int LIGHT_ID_BUTTONS = Type.BUTTONS;
26 public static final int LIGHT_ID_BATTERY = Type.BATTERY;
27 public static final int LIGHT_ID_NOTIFICATIONS = Type.NOTIFICATIONS;
28 public static final int LIGHT_ID_ATTENTION = Type.ATTENTION;
29 public static final int LIGHT_ID_BLUETOOTH = Type.BLUETOOTH;
30 public static final int LIGHT_ID_WIFI = Type.WIFI;
31 public static final int LIGHT_ID_COUNT = Type.COUNT;
Adam Lesinski182f73f2013-12-05 16:48:06 -080032
Ivailo Karamanolevf773e102020-01-16 16:10:42 +010033 /**
Robin Leeb9e44e52020-02-07 04:18:20 +010034 * Returns the logical light with the given type, if it exists, or null.
Ivailo Karamanolevf773e102020-01-16 16:10:42 +010035 */
Robin Leeb9e44e52020-02-07 04:18:20 +010036 @Nullable
Ivailo Karamanolevf773e102020-01-16 16:10:42 +010037 public abstract LogicalLight getLight(int id);
Adam Lesinski182f73f2013-12-05 16:48:06 -080038}