Merge "Add app op for Bluetooth scans" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6fb01a8a56
@@ -338,7 +338,9 @@ public class AppOpsManager {
|
||||
/** @hide Any app start foreground service. */
|
||||
public static final int OP_START_FOREGROUND = 76;
|
||||
/** @hide */
|
||||
public static final int _NUM_OP = 77;
|
||||
public static final int OP_BLUETOOTH_SCAN = 77;
|
||||
/** @hide */
|
||||
public static final int _NUM_OP = 78;
|
||||
|
||||
/** Access to coarse location information. */
|
||||
public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
|
||||
@@ -580,6 +582,8 @@ public class AppOpsManager {
|
||||
/** @hide */
|
||||
@SystemApi @TestApi
|
||||
public static final String OPSTR_START_FOREGROUND = "android:start_foreground";
|
||||
/** @hide */
|
||||
public static final String OPSTR_BLUETOOTH_SCAN = "android:bluetooth_scan";
|
||||
|
||||
// Warning: If an permission is added here it also has to be added to
|
||||
// com.android.packageinstaller.permission.utils.EventLogger
|
||||
@@ -717,6 +721,7 @@ public class AppOpsManager {
|
||||
OP_ACCEPT_HANDOVER, // ACCEPT_HANDOVER
|
||||
OP_MANAGE_IPSEC_TUNNELS, // MANAGE_IPSEC_HANDOVERS
|
||||
OP_START_FOREGROUND, // START_FOREGROUND
|
||||
OP_COARSE_LOCATION, // BLUETOOTH_SCAN
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -800,6 +805,7 @@ public class AppOpsManager {
|
||||
OPSTR_ACCEPT_HANDOVER,
|
||||
OPSTR_MANAGE_IPSEC_TUNNELS,
|
||||
OPSTR_START_FOREGROUND,
|
||||
OPSTR_BLUETOOTH_SCAN,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -884,6 +890,7 @@ public class AppOpsManager {
|
||||
"ACCEPT_HANDOVER",
|
||||
"MANAGE_IPSEC_TUNNELS",
|
||||
"START_FOREGROUND",
|
||||
"BLUETOOTH_SCAN",
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -968,6 +975,7 @@ public class AppOpsManager {
|
||||
Manifest.permission.ACCEPT_HANDOVER,
|
||||
null, // no permission for OP_MANAGE_IPSEC_TUNNELS
|
||||
Manifest.permission.FOREGROUND_SERVICE,
|
||||
null, // no permission for OP_BLUETOOTH_SCAN
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1053,6 +1061,7 @@ public class AppOpsManager {
|
||||
null, // ACCEPT_HANDOVER
|
||||
null, // MANAGE_IPSEC_TUNNELS
|
||||
null, // START_FOREGROUND
|
||||
null, // maybe should be UserManager.DISALLOW_SHARE_LOCATION, //BLUETOOTH_SCAN
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1137,6 +1146,7 @@ public class AppOpsManager {
|
||||
false, // ACCEPT_HANDOVER
|
||||
false, // MANAGE_IPSEC_HANDOVERS
|
||||
false, // START_FOREGROUND
|
||||
true, // BLUETOOTH_SCAN
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1220,6 +1230,7 @@ public class AppOpsManager {
|
||||
AppOpsManager.MODE_ALLOWED, // ACCEPT_HANDOVER
|
||||
AppOpsManager.MODE_ERRORED, // MANAGE_IPSEC_TUNNELS
|
||||
AppOpsManager.MODE_ALLOWED, // OP_START_FOREGROUND
|
||||
AppOpsManager.MODE_ALLOWED, // OP_BLUETOOTH_SCAN
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1307,6 +1318,7 @@ public class AppOpsManager {
|
||||
false, // ACCEPT_HANDOVER
|
||||
false, // MANAGE_IPSEC_TUNNELS
|
||||
false, // START_FOREGROUND
|
||||
false, // BLUETOOTH_SCAN
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user