Merge "removed hidden Bluetooth permissions in BatteryStatsManager"

This commit is contained in:
Etienne Ruffieux
2022-02-03 19:27:06 +00:00
committed by Android (Google) Code Review

View File

@@ -24,8 +24,6 @@ import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
import android.bluetooth.annotations.RequiresBluetoothConnectPermission;
import android.bluetooth.annotations.RequiresLegacyBluetoothAdminPermission;
import android.content.Context;
import android.net.NetworkStack;
import android.os.connectivity.CellularBatteryStats;
@@ -523,8 +521,6 @@ public final class BatteryStatsManager {
* @param reason why Bluetooth has been turned on
* @param packageName package responsible for this change
*/
@RequiresLegacyBluetoothAdminPermission
@RequiresBluetoothConnectPermission
@RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
public void reportBluetoothOn(int uid, int reason, @NonNull String packageName) {
try {
@@ -541,8 +537,6 @@ public final class BatteryStatsManager {
* @param reason why Bluetooth has been turned on
* @param packageName package responsible for this change
*/
@RequiresLegacyBluetoothAdminPermission
@RequiresBluetoothConnectPermission
@RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
public void reportBluetoothOff(int uid, int reason, @NonNull String packageName) {
try {