blob: 6a0cd36c32e4654b5a39c4ecd622eaba778eb6ac [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2008 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.internal.app;
18
19import com.android.internal.os.BatteryStatsImpl;
20
Dianne Hackborn7e9f4eb2010-09-10 18:43:00 -070021import android.os.WorkSource;
Wink Savillee9b06d72009-05-18 21:47:50 -070022import android.telephony.SignalStrength;
23
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080024interface IBatteryStats {
25 byte[] getStatistics();
Dianne Hackborn9adb9c32010-08-13 14:09:56 -070026 void noteStartWakelock(int uid, int pid, String name, int type);
27 void noteStopWakelock(int uid, int pid, String name, int type);
Mathias Agopian32123fde2010-07-22 22:19:43 -070028
29 /* DO NOT CHANGE the position of noteStartSensor without updating
30 SensorService.cpp */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031 void noteStartSensor(int uid, int sensor);
Mathias Agopian32123fde2010-07-22 22:19:43 -070032
33 /* DO NOT CHANGE the position of noteStopSensor without updating
34 SensorService.cpp */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080035 void noteStopSensor(int uid, int sensor);
Mathias Agopian32123fde2010-07-22 22:19:43 -070036
Dianne Hackborn7e9f4eb2010-09-10 18:43:00 -070037 void noteStartWakelockFromSource(in WorkSource ws, int pid, String name, int type);
38 void noteStopWakelockFromSource(in WorkSource ws, int pid, String name, int type);
39
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080040 void noteStartGps(int uid);
41 void noteStopGps(int uid);
42 void noteScreenOn();
Dianne Hackborn617f8772009-03-31 15:04:46 -070043 void noteScreenBrightness(int brightness);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044 void noteScreenOff();
Dianne Hackborn617f8772009-03-31 15:04:46 -070045 void noteInputEvent();
46 void noteUserActivity(int uid, int event);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080047 void notePhoneOn();
48 void notePhoneOff();
Wink Savillee9b06d72009-05-18 21:47:50 -070049 void notePhoneSignalStrength(in SignalStrength signalStrength);
Dianne Hackborn627bba72009-03-24 22:32:56 -070050 void notePhoneDataConnectionState(int dataType, boolean hasData);
Amith Yamasanif37447b2009-10-08 18:28:01 -070051 void notePhoneState(int phoneState);
Dianne Hackborn58e0eef2010-09-16 01:22:10 -070052 void noteWifiOn();
53 void noteWifiOff();
54 void noteWifiRunning(in WorkSource ws);
55 void noteWifiRunningChanged(in WorkSource oldWs, in WorkSource newWs);
56 void noteWifiStopped(in WorkSource ws);
The Android Open Source Project10592532009-03-18 17:39:46 -070057 void noteBluetoothOn();
58 void noteBluetoothOff();
59 void noteFullWifiLockAcquired(int uid);
60 void noteFullWifiLockReleased(int uid);
61 void noteScanWifiLockAcquired(int uid);
62 void noteScanWifiLockReleased(int uid);
Robert Greenwalt5347bd42009-05-13 15:10:16 -070063 void noteWifiMulticastEnabled(int uid);
64 void noteWifiMulticastDisabled(int uid);
Dianne Hackborn7e9f4eb2010-09-10 18:43:00 -070065 void noteFullWifiLockAcquiredFromSource(in WorkSource ws);
66 void noteFullWifiLockReleasedFromSource(in WorkSource ws);
67 void noteScanWifiLockAcquiredFromSource(in WorkSource ws);
68 void noteScanWifiLockReleasedFromSource(in WorkSource ws);
69 void noteWifiMulticastEnabledFromSource(in WorkSource ws);
70 void noteWifiMulticastDisabledFromSource(in WorkSource ws);
Jeff Sharkey1059c3c2011-10-04 16:54:49 -070071 void noteNetworkInterfaceType(String iface, int type);
Dianne Hackborn6b7b4842010-06-14 17:17:44 -070072 void setBatteryState(int status, int health, int plugType, int level, int temp, int volt);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080073 long getAwakeTimeBattery();
74 long getAwakeTimePlugged();
75}