BridgePowerManager.java revision 120664816a9bf325b618d8dd40febae2e3636ec8
1/*
2 * Copyright (C) 2012 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.layoutlib.bridge.android;
18
19import android.os.IBinder;
20import android.os.IPowerManager;
21import android.os.RemoteException;
22import android.os.WorkSource;
23
24/**
25 * Fake implementation of IPowerManager.
26 *
27 */
28public class BridgePowerManager implements IPowerManager {
29
30    @Override
31    public boolean isScreenOn() throws RemoteException {
32        return true;
33    }
34
35    @Override
36    public IBinder asBinder() {
37        // pass for now.
38        return null;
39    }
40
41    @Override
42    public void acquireWakeLock(IBinder arg0, int arg1, String arg2, WorkSource arg3)
43            throws RemoteException {
44        // pass for now.
45    }
46
47    @Override
48    public void clearUserActivityTimeout(long arg0, long arg1) throws RemoteException {
49        // pass for now.
50    }
51
52    @Override
53    public void crash(String arg0) throws RemoteException {
54        // pass for now.
55    }
56
57    @Override
58    public void goToSleep(long arg0, int arg1) throws RemoteException {
59        // pass for now.
60    }
61
62    @Override
63    public void nap(long arg0) throws RemoteException {
64        // pass for now.
65    }
66
67    @Override
68    public void reboot(String arg0) throws RemoteException {
69        // pass for now.
70    }
71
72    @Override
73    public void releaseWakeLock(IBinder arg0, int arg1) throws RemoteException {
74        // pass for now.
75    }
76
77    @Override
78    public void setAttentionLight(boolean arg0, int arg1) throws RemoteException {
79        // pass for now.
80    }
81
82    @Override
83    public void setTemporaryScreenAutoBrightnessAdjustmentSettingOverride(float arg0) throws RemoteException {
84        // pass for now.
85    }
86
87    @Override
88    public void setTemporaryScreenBrightnessSettingOverride(int arg0) throws RemoteException {
89        // pass for now.
90    }
91
92    @Override
93    public void setMaximumScreenOffTimeoutFromDeviceAdmin(int arg0) throws RemoteException {
94        // pass for now.
95    }
96
97    @Override
98    public void setPokeLock(int arg0, IBinder arg1, String arg2) throws RemoteException {
99        // pass for now.
100    }
101
102    @Override
103    public void setStayOnSetting(int arg0) throws RemoteException {
104        // pass for now.
105    }
106
107    @Override
108    public void updateWakeLockWorkSource(IBinder arg0, WorkSource arg1) throws RemoteException {
109        // pass for now.
110    }
111
112    @Override
113    public boolean isWakeLockLevelSupported(int level) throws RemoteException {
114        // pass for now.
115        return true;
116    }
117
118    @Override
119    public void userActivity(long time, int event, int flags) throws RemoteException {
120        // pass for now.
121    }
122
123    @Override
124    public void wakeUp(long time) throws RemoteException {
125        // pass for now.
126    }
127}
128