blob: cb3d528198254ea4c5a62074e19dbfe50a8b9260 [file] [log] [blame]
Jeff Brown6f357d32014-01-15 20:40:55 -08001/*
2 * Copyright (C) 2014 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 android.os;
18
19import android.view.WindowManagerPolicy;
20
21/**
22 * Power manager local system service interface.
23 *
24 * @hide Only for use within the system server.
25 */
Jeff Brown4ccb8232014-01-16 22:16:42 -080026public abstract class PowerManagerInternal {
Jeff Brown6f357d32014-01-15 20:40:55 -080027 /**
28 * Used by the window manager to override the screen brightness based on the
29 * current foreground activity.
30 *
31 * This method must only be called by the window manager.
32 *
33 * @param brightness The overridden brightness, or -1 to disable the override.
34 */
Jeff Brown4ccb8232014-01-16 22:16:42 -080035 public abstract void setScreenBrightnessOverrideFromWindowManager(int brightness);
Jeff Brown6f357d32014-01-15 20:40:55 -080036
37 /**
38 * Used by the window manager to override the button brightness based on the
39 * current foreground activity.
40 *
41 * This method must only be called by the window manager.
42 *
43 * @param brightness The overridden brightness, or -1 to disable the override.
44 */
Jeff Brown4ccb8232014-01-16 22:16:42 -080045 public abstract void setButtonBrightnessOverrideFromWindowManager(int brightness);
Jeff Brown6f357d32014-01-15 20:40:55 -080046
47 /**
48 * Used by the window manager to override the user activity timeout based on the
49 * current foreground activity. It can only be used to make the timeout shorter
50 * than usual, not longer.
51 *
52 * This method must only be called by the window manager.
53 *
54 * @param timeoutMillis The overridden timeout, or -1 to disable the override.
55 */
Jeff Brown4ccb8232014-01-16 22:16:42 -080056 public abstract void setUserActivityTimeoutOverrideFromWindowManager(long timeoutMillis);
Jeff Brown6f357d32014-01-15 20:40:55 -080057
58 // TODO: Remove this and retrieve as a local service instead.
Jeff Brown4ccb8232014-01-16 22:16:42 -080059 public abstract void setPolicy(WindowManagerPolicy policy);
Jeff Brown6f357d32014-01-15 20:40:55 -080060}