• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
17 package com.android.internal.app;
18 
19 import com.android.internal.os.BatteryStatsImpl;
20 
21 import android.os.WorkSource;
22 import android.telephony.SignalStrength;
23 
24 interface IBatteryStats {
getStatistics()25     byte[] getStatistics();
noteStartWakelock(int uid, int pid, String name, int type)26     void noteStartWakelock(int uid, int pid, String name, int type);
noteStopWakelock(int uid, int pid, String name, int type)27     void noteStopWakelock(int uid, int pid, String name, int type);
28 
29     /* DO NOT CHANGE the position of noteStartSensor without updating
30        SensorService.cpp */
noteStartSensor(int uid, int sensor)31     void noteStartSensor(int uid, int sensor);
32 
33     /* DO NOT CHANGE the position of noteStopSensor without updating
34        SensorService.cpp */
noteStopSensor(int uid, int sensor)35     void noteStopSensor(int uid, int sensor);
36 
noteStartWakelockFromSource(in WorkSource ws, int pid, String name, int type)37     void noteStartWakelockFromSource(in WorkSource ws, int pid, String name, int type);
noteStopWakelockFromSource(in WorkSource ws, int pid, String name, int type)38     void noteStopWakelockFromSource(in WorkSource ws, int pid, String name, int type);
39 
noteStartGps(int uid)40     void noteStartGps(int uid);
noteStopGps(int uid)41     void noteStopGps(int uid);
noteScreenOn()42     void noteScreenOn();
noteScreenBrightness(int brightness)43     void noteScreenBrightness(int brightness);
noteScreenOff()44     void noteScreenOff();
noteInputEvent()45     void noteInputEvent();
noteUserActivity(int uid, int event)46     void noteUserActivity(int uid, int event);
notePhoneOn()47     void notePhoneOn();
notePhoneOff()48     void notePhoneOff();
notePhoneSignalStrength(in SignalStrength signalStrength)49     void notePhoneSignalStrength(in SignalStrength signalStrength);
notePhoneDataConnectionState(int dataType, boolean hasData)50     void notePhoneDataConnectionState(int dataType, boolean hasData);
notePhoneState(int phoneState)51     void notePhoneState(int phoneState);
noteWifiOn()52     void noteWifiOn();
noteWifiOff()53     void noteWifiOff();
noteWifiRunning(in WorkSource ws)54     void noteWifiRunning(in WorkSource ws);
noteWifiRunningChanged(in WorkSource oldWs, in WorkSource newWs)55     void noteWifiRunningChanged(in WorkSource oldWs, in WorkSource newWs);
noteWifiStopped(in WorkSource ws)56     void noteWifiStopped(in WorkSource ws);
noteBluetoothOn()57     void noteBluetoothOn();
noteBluetoothOff()58     void noteBluetoothOff();
noteFullWifiLockAcquired(int uid)59     void noteFullWifiLockAcquired(int uid);
noteFullWifiLockReleased(int uid)60     void noteFullWifiLockReleased(int uid);
noteScanWifiLockAcquired(int uid)61     void noteScanWifiLockAcquired(int uid);
noteScanWifiLockReleased(int uid)62     void noteScanWifiLockReleased(int uid);
noteWifiMulticastEnabled(int uid)63     void noteWifiMulticastEnabled(int uid);
noteWifiMulticastDisabled(int uid)64     void noteWifiMulticastDisabled(int uid);
noteFullWifiLockAcquiredFromSource(in WorkSource ws)65     void noteFullWifiLockAcquiredFromSource(in WorkSource ws);
noteFullWifiLockReleasedFromSource(in WorkSource ws)66     void noteFullWifiLockReleasedFromSource(in WorkSource ws);
noteScanWifiLockAcquiredFromSource(in WorkSource ws)67     void noteScanWifiLockAcquiredFromSource(in WorkSource ws);
noteScanWifiLockReleasedFromSource(in WorkSource ws)68     void noteScanWifiLockReleasedFromSource(in WorkSource ws);
noteWifiMulticastEnabledFromSource(in WorkSource ws)69     void noteWifiMulticastEnabledFromSource(in WorkSource ws);
noteWifiMulticastDisabledFromSource(in WorkSource ws)70     void noteWifiMulticastDisabledFromSource(in WorkSource ws);
noteNetworkInterfaceType(String iface, int type)71     void noteNetworkInterfaceType(String iface, int type);
setBatteryState(int status, int health, int plugType, int level, int temp, int volt)72     void setBatteryState(int status, int health, int plugType, int level, int temp, int volt);
getAwakeTimeBattery()73     long getAwakeTimeBattery();
getAwakeTimePlugged()74     long getAwakeTimePlugged();
75 }
76