2 * Copyright (C) 2012 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.android.layoutlib.bridge.android;
19 import android.os.IBinder;
20 import android.os.IPowerManager;
21 import android.os.RemoteException;
22 import android.os.WorkSource;
25 * Fake implementation of IPowerManager.
28 public class BridgePowerManager implements IPowerManager {
31 public boolean isInteractive() throws RemoteException {
36 public boolean isPowerSaveMode() throws RemoteException {
41 public boolean setPowerSaveMode(boolean mode) throws RemoteException {
46 public IBinder asBinder() {
52 public void acquireWakeLock(IBinder arg0, int arg1, String arg2, String arg2_5, WorkSource arg3, String arg4)
53 throws RemoteException {
58 public void acquireWakeLockWithUid(IBinder arg0, int arg1, String arg2, String arg2_5, int arg3)
59 throws RemoteException {
64 public void powerHint(int hintId, int data) {
69 public void crash(String arg0) throws RemoteException {
74 public void goToSleep(long arg0, int arg1, int arg2) throws RemoteException {
79 public void nap(long arg0) throws RemoteException {
84 public void reboot(boolean confirm, String reason, boolean wait) {
89 public void shutdown(boolean confirm, boolean wait) {
94 public void releaseWakeLock(IBinder arg0, int arg1) throws RemoteException {
99 public void updateWakeLockUids(IBinder arg0, int[] arg1) throws RemoteException {
104 public void setAttentionLight(boolean arg0, int arg1) throws RemoteException {
109 public void setTemporaryScreenAutoBrightnessAdjustmentSettingOverride(float arg0) throws RemoteException {
114 public void setTemporaryScreenBrightnessSettingOverride(int arg0) throws RemoteException {
119 public void setMaximumScreenOffTimeoutFromDeviceAdmin(int arg0) throws RemoteException {
124 public void setStayOnSetting(int arg0) throws RemoteException {
129 public void updateWakeLockWorkSource(IBinder arg0, WorkSource arg1, String arg2) throws RemoteException {
134 public boolean isWakeLockLevelSupported(int level) throws RemoteException {
140 public void userActivity(long time, int event, int flags) throws RemoteException {
145 public void wakeUp(long time) throws RemoteException {