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