Remove bluetooth state change logging from BatteryStats
Bug: 281574270 Test: build Change-Id: Ie748edba80eaaaba20fd7369733d53c078679992 Merged-In: Ie748edba80eaaaba20fd7369733d53c078679992
This commit is contained in:
@@ -520,14 +520,10 @@ public final class BatteryStatsManager {
|
||||
* @param uid calling package uid
|
||||
* @param reason why Bluetooth has been turned on
|
||||
* @param packageName package responsible for this change
|
||||
* @Deprecated Bluetooth self report its state and no longer call this
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
|
||||
public void reportBluetoothOn(int uid, int reason, @NonNull String packageName) {
|
||||
try {
|
||||
mBatteryStats.noteBluetoothOn(uid, reason, packageName);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -536,14 +532,10 @@ public final class BatteryStatsManager {
|
||||
* @param uid calling package uid
|
||||
* @param reason why Bluetooth has been turned on
|
||||
* @param packageName package responsible for this change
|
||||
* @Deprecated Bluetooth self report its state and no longer call this
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
|
||||
public void reportBluetoothOff(int uid, int reason, @NonNull String packageName) {
|
||||
try {
|
||||
mBatteryStats.noteBluetoothOff(uid, reason, packageName);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -145,8 +145,6 @@ interface IBatteryStats {
|
||||
long getAwakeTimeBattery();
|
||||
long getAwakeTimePlugged();
|
||||
|
||||
void noteBluetoothOn(int uid, int reason, String packageName);
|
||||
void noteBluetoothOff(int uid, int reason, String packageName);
|
||||
void noteBleScanStarted(in WorkSource ws, boolean isUnoptimized);
|
||||
void noteBleScanStopped(in WorkSource ws, boolean isUnoptimized);
|
||||
void noteBleScanReset();
|
||||
|
||||
@@ -1982,32 +1982,6 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bluetooth on stat logging
|
||||
*/
|
||||
public void noteBluetoothOn(int uid, int reason, String packageName) {
|
||||
if (Binder.getCallingPid() != Process.myPid()) {
|
||||
mContext.enforcePermission(android.Manifest.permission.BLUETOOTH_CONNECT,
|
||||
Binder.getCallingPid(), uid, null);
|
||||
}
|
||||
FrameworkStatsLog.write_non_chained(FrameworkStatsLog.BLUETOOTH_ENABLED_STATE_CHANGED,
|
||||
uid, null, FrameworkStatsLog.BLUETOOTH_ENABLED_STATE_CHANGED__STATE__ENABLED,
|
||||
reason, packageName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bluetooth off stat logging
|
||||
*/
|
||||
public void noteBluetoothOff(int uid, int reason, String packageName) {
|
||||
if (Binder.getCallingPid() != Process.myPid()) {
|
||||
mContext.enforcePermission(android.Manifest.permission.BLUETOOTH_CONNECT,
|
||||
Binder.getCallingPid(), uid, null);
|
||||
}
|
||||
FrameworkStatsLog.write_non_chained(FrameworkStatsLog.BLUETOOTH_ENABLED_STATE_CHANGED,
|
||||
uid, null, FrameworkStatsLog.BLUETOOTH_ENABLED_STATE_CHANGED__STATE__DISABLED,
|
||||
reason, packageName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void noteBleScanStarted(final WorkSource ws, final boolean isUnoptimized) {
|
||||
enforceCallingPermission();
|
||||
|
||||
Reference in New Issue
Block a user