Add new appOps to track the behavior of VPN app am: e89ec676a4 am: f050c4f072 am: 071b7b5ed8 am: 6a6fe48094 am: 5a21857ed0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854373 Change-Id: I24beb21c1504901a1e41bfbbb0ca03af878872a5
This commit is contained in:
@@ -485,6 +485,8 @@ package android.app {
|
||||
field public static final String OPSTR_AUTO_REVOKE_PERMISSIONS_IF_UNUSED = "android:auto_revoke_permissions_if_unused";
|
||||
field public static final String OPSTR_BIND_ACCESSIBILITY_SERVICE = "android:bind_accessibility_service";
|
||||
field public static final String OPSTR_CHANGE_WIFI_STATE = "android:change_wifi_state";
|
||||
field public static final String OPSTR_ESTABLISH_VPN_MANAGER = "android:establish_vpn_manager";
|
||||
field public static final String OPSTR_ESTABLISH_VPN_SERVICE = "android:establish_vpn_service";
|
||||
field public static final String OPSTR_GET_ACCOUNTS = "android:get_accounts";
|
||||
field public static final String OPSTR_GPS = "android:gps";
|
||||
field public static final String OPSTR_INSTANT_APP_START_FOREGROUND = "android:instant_app_start_foreground";
|
||||
|
||||
@@ -1313,9 +1313,23 @@ public class AppOpsManager {
|
||||
public static final int OP_RECORD_INCOMING_PHONE_AUDIO =
|
||||
AppProtoEnums.APP_OP_RECORD_INCOMING_PHONE_AUDIO;
|
||||
|
||||
/**
|
||||
* VPN app establishes a connection through the VpnService API.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final int OP_ESTABLISH_VPN_SERVICE = AppProtoEnums.APP_OP_ESTABLISH_VPN_SERVICE;
|
||||
|
||||
/**
|
||||
* VPN app establishes a connection through the VpnManager API.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final int OP_ESTABLISH_VPN_MANAGER = AppProtoEnums.APP_OP_ESTABLISH_VPN_MANAGER;
|
||||
|
||||
/** @hide */
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||
public static final int _NUM_OP = 117;
|
||||
public static final int _NUM_OP = 119;
|
||||
|
||||
/** Access to coarse location information. */
|
||||
public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
|
||||
@@ -1754,6 +1768,22 @@ public class AppOpsManager {
|
||||
public static final String OPSTR_RECORD_INCOMING_PHONE_AUDIO =
|
||||
"android:record_incoming_phone_audio";
|
||||
|
||||
/**
|
||||
* VPN app establishes a connection through the VpnService API.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final String OPSTR_ESTABLISH_VPN_SERVICE = "android:establish_vpn_service";
|
||||
|
||||
/**
|
||||
* VPN app establishes a connection through the VpnManager API.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final String OPSTR_ESTABLISH_VPN_MANAGER = "android:establish_vpn_manager";
|
||||
|
||||
/** {@link #sAppOpsToNote} not initialized yet for this op */
|
||||
private static final byte SHOULD_COLLECT_NOTE_OP_NOT_INITIALIZED = 0;
|
||||
/** Should not collect noting of this app-op in {@link #sAppOpsToNote} */
|
||||
@@ -1972,6 +2002,8 @@ public class AppOpsManager {
|
||||
OP_BLUETOOTH_ADVERTISE, // OP_BLUETOOTH_ADVERTISE
|
||||
OP_RECORD_INCOMING_PHONE_AUDIO, // OP_RECORD_INCOMING_PHONE_AUDIO
|
||||
OP_NEARBY_WIFI_DEVICES, // OP_NEARBY_WIFI_DEVICES
|
||||
OP_ESTABLISH_VPN_SERVICE, // OP_ESTABLISH_VPN_SERVICE
|
||||
OP_ESTABLISH_VPN_MANAGER, // OP_ESTABLISH_VPN_MANAGER
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2095,6 +2127,8 @@ public class AppOpsManager {
|
||||
OPSTR_BLUETOOTH_ADVERTISE,
|
||||
OPSTR_RECORD_INCOMING_PHONE_AUDIO,
|
||||
OPSTR_NEARBY_WIFI_DEVICES,
|
||||
OPSTR_ESTABLISH_VPN_SERVICE,
|
||||
OPSTR_ESTABLISH_VPN_MANAGER,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2218,7 +2252,9 @@ public class AppOpsManager {
|
||||
"ACTIVITY_RECOGNITION_SOURCE",
|
||||
"BLUETOOTH_ADVERTISE",
|
||||
"RECORD_INCOMING_PHONE_AUDIO",
|
||||
"NEARBY_WIFI_DEVICES"
|
||||
"NEARBY_WIFI_DEVICES",
|
||||
"ESTABLISH_VPN_SERVICE",
|
||||
"ESTABLISH_VPN_MANAGER",
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2344,6 +2380,8 @@ public class AppOpsManager {
|
||||
Manifest.permission.BLUETOOTH_ADVERTISE,
|
||||
null, // no permission for OP_RECORD_INCOMING_PHONE_AUDIO,
|
||||
Manifest.permission.NEARBY_WIFI_DEVICES,
|
||||
null, // no permission for OP_ESTABLISH_VPN_SERVICE
|
||||
null, // no permission for OP_ESTABLISH_VPN_MANAGER
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2469,6 +2507,8 @@ public class AppOpsManager {
|
||||
null, // BLUETOOTH_ADVERTISE
|
||||
null, // RECORD_INCOMING_PHONE_AUDIO
|
||||
null, // NEARBY_WIFI_DEVICES
|
||||
null, // ESTABLISH_VPN_SERVICE
|
||||
null, // ESTABLISH_VPN_MANAGER
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2593,6 +2633,8 @@ public class AppOpsManager {
|
||||
null, // BLUETOOTH_ADVERTISE
|
||||
null, // RECORD_INCOMING_PHONE_AUDIO
|
||||
null, // NEARBY_WIFI_DEVICES
|
||||
null, // ESTABLISH_VPN_SERVICE
|
||||
null, // ESTABLISH_VPN_MANAGER
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2716,6 +2758,8 @@ public class AppOpsManager {
|
||||
AppOpsManager.MODE_ALLOWED, // BLUETOOTH_ADVERTISE
|
||||
AppOpsManager.MODE_ALLOWED, // RECORD_INCOMING_PHONE_AUDIO
|
||||
AppOpsManager.MODE_ALLOWED, // NEARBY_WIFI_DEVICES
|
||||
AppOpsManager.MODE_ALLOWED, // ESTABLISH_VPN_SERVICE
|
||||
AppOpsManager.MODE_ALLOWED, // ESTABLISH_VPN_MANAGER
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2843,6 +2887,8 @@ public class AppOpsManager {
|
||||
false, // BLUETOOTH_ADVERTISE
|
||||
false, // RECORD_INCOMING_PHONE_AUDIO
|
||||
false, // NEARBY_WIFI_DEVICES
|
||||
false, // OP_ESTABLISH_VPN_SERVICE
|
||||
false, // OP_ESTABLISH_VPN_MANAGER
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user