Merge changes from topic "nearbyWifi"
* changes: Adding wifi nearby permission to DefaultPermissionGrantPolicy Add new wifi nearby devices app-ops New runtime permission NEARBY_WIFI_DEVICES
This commit is contained in:
@@ -112,6 +112,7 @@ package android {
|
|||||||
field public static final String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
|
field public static final String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
|
||||||
field public static final String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
|
field public static final String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
|
||||||
field public static final String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
|
field public static final String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
|
||||||
|
field public static final String NEARBY_WIFI_DEVICES = "android.permission.NEARBY_WIFI_DEVICES";
|
||||||
field public static final String NFC = "android.permission.NFC";
|
field public static final String NFC = "android.permission.NFC";
|
||||||
field public static final String NFC_PREFERRED_PAYMENT_INFO = "android.permission.NFC_PREFERRED_PAYMENT_INFO";
|
field public static final String NFC_PREFERRED_PAYMENT_INFO = "android.permission.NFC_PREFERRED_PAYMENT_INFO";
|
||||||
field public static final String NFC_TRANSACTION_EVENT = "android.permission.NFC_TRANSACTION_EVENT";
|
field public static final String NFC_TRANSACTION_EVENT = "android.permission.NFC_TRANSACTION_EVENT";
|
||||||
|
|||||||
@@ -1292,6 +1292,9 @@ public class AppOpsManager {
|
|||||||
/** @hide */
|
/** @hide */
|
||||||
public static final int OP_UWB_RANGING = AppProtoEnums.APP_OP_UWB_RANGING;
|
public static final int OP_UWB_RANGING = AppProtoEnums.APP_OP_UWB_RANGING;
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public static final int OP_NEARBY_WIFI_DEVICES = AppProtoEnums.APP_OP_NEARBY_WIFI_DEVICES;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activity recognition being accessed by an activity recognition source, which
|
* Activity recognition being accessed by an activity recognition source, which
|
||||||
* is a component that already has access since it is the one that detects
|
* is a component that already has access since it is the one that detects
|
||||||
@@ -1312,7 +1315,7 @@ public class AppOpsManager {
|
|||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||||
public static final int _NUM_OP = 116;
|
public static final int _NUM_OP = 117;
|
||||||
|
|
||||||
/** Access to coarse location information. */
|
/** Access to coarse location information. */
|
||||||
public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
|
public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
|
||||||
@@ -1731,6 +1734,8 @@ public class AppOpsManager {
|
|||||||
public static final String OPSTR_MANAGE_MEDIA = "android:manage_media";
|
public static final String OPSTR_MANAGE_MEDIA = "android:manage_media";
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public static final String OPSTR_UWB_RANGING = "android:uwb_ranging";
|
public static final String OPSTR_UWB_RANGING = "android:uwb_ranging";
|
||||||
|
/** @hide */
|
||||||
|
public static final String OPSTR_NEARBY_WIFI_DEVICES = "android:nearby_wifi_devices";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activity recognition being accessed by an activity recognition source, which
|
* Activity recognition being accessed by an activity recognition source, which
|
||||||
@@ -1819,6 +1824,7 @@ public class AppOpsManager {
|
|||||||
OP_BLUETOOTH_CONNECT,
|
OP_BLUETOOTH_CONNECT,
|
||||||
OP_BLUETOOTH_ADVERTISE,
|
OP_BLUETOOTH_ADVERTISE,
|
||||||
OP_UWB_RANGING,
|
OP_UWB_RANGING,
|
||||||
|
OP_NEARBY_WIFI_DEVICES,
|
||||||
|
|
||||||
// APPOP PERMISSIONS
|
// APPOP PERMISSIONS
|
||||||
OP_ACCESS_NOTIFICATIONS,
|
OP_ACCESS_NOTIFICATIONS,
|
||||||
@@ -1963,6 +1969,7 @@ public class AppOpsManager {
|
|||||||
OP_ACTIVITY_RECOGNITION, // OP_ACTIVITY_RECOGNITION_SOURCE
|
OP_ACTIVITY_RECOGNITION, // OP_ACTIVITY_RECOGNITION_SOURCE
|
||||||
OP_BLUETOOTH_ADVERTISE, // OP_BLUETOOTH_ADVERTISE
|
OP_BLUETOOTH_ADVERTISE, // OP_BLUETOOTH_ADVERTISE
|
||||||
OP_RECORD_INCOMING_PHONE_AUDIO, // OP_RECORD_INCOMING_PHONE_AUDIO
|
OP_RECORD_INCOMING_PHONE_AUDIO, // OP_RECORD_INCOMING_PHONE_AUDIO
|
||||||
|
OP_NEARBY_WIFI_DEVICES, // OP_NEARBY_WIFI_DEVICES
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2085,6 +2092,7 @@ public class AppOpsManager {
|
|||||||
OPSTR_ACTIVITY_RECOGNITION_SOURCE,
|
OPSTR_ACTIVITY_RECOGNITION_SOURCE,
|
||||||
OPSTR_BLUETOOTH_ADVERTISE,
|
OPSTR_BLUETOOTH_ADVERTISE,
|
||||||
OPSTR_RECORD_INCOMING_PHONE_AUDIO,
|
OPSTR_RECORD_INCOMING_PHONE_AUDIO,
|
||||||
|
OPSTR_NEARBY_WIFI_DEVICES,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2208,6 +2216,7 @@ public class AppOpsManager {
|
|||||||
"ACTIVITY_RECOGNITION_SOURCE",
|
"ACTIVITY_RECOGNITION_SOURCE",
|
||||||
"BLUETOOTH_ADVERTISE",
|
"BLUETOOTH_ADVERTISE",
|
||||||
"RECORD_INCOMING_PHONE_AUDIO",
|
"RECORD_INCOMING_PHONE_AUDIO",
|
||||||
|
"NEARBY_WIFI_DEVICES"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2332,6 +2341,7 @@ public class AppOpsManager {
|
|||||||
null, // no permission for OP_ACTIVITY_RECOGNITION_SOURCE,
|
null, // no permission for OP_ACTIVITY_RECOGNITION_SOURCE,
|
||||||
Manifest.permission.BLUETOOTH_ADVERTISE,
|
Manifest.permission.BLUETOOTH_ADVERTISE,
|
||||||
null, // no permission for OP_RECORD_INCOMING_PHONE_AUDIO,
|
null, // no permission for OP_RECORD_INCOMING_PHONE_AUDIO,
|
||||||
|
Manifest.permission.NEARBY_WIFI_DEVICES,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2456,6 +2466,7 @@ public class AppOpsManager {
|
|||||||
null, // ACTIVITY_RECOGNITION_SOURCE
|
null, // ACTIVITY_RECOGNITION_SOURCE
|
||||||
null, // BLUETOOTH_ADVERTISE
|
null, // BLUETOOTH_ADVERTISE
|
||||||
null, // RECORD_INCOMING_PHONE_AUDIO
|
null, // RECORD_INCOMING_PHONE_AUDIO
|
||||||
|
null, // NEARBY_WIFI_DEVICES
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2579,6 +2590,7 @@ public class AppOpsManager {
|
|||||||
null, // ACTIVITY_RECOGNITION_SOURCE
|
null, // ACTIVITY_RECOGNITION_SOURCE
|
||||||
null, // BLUETOOTH_ADVERTISE
|
null, // BLUETOOTH_ADVERTISE
|
||||||
null, // RECORD_INCOMING_PHONE_AUDIO
|
null, // RECORD_INCOMING_PHONE_AUDIO
|
||||||
|
null, // NEARBY_WIFI_DEVICES
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2701,6 +2713,7 @@ public class AppOpsManager {
|
|||||||
AppOpsManager.MODE_ALLOWED, // ACTIVITY_RECOGNITION_SOURCE
|
AppOpsManager.MODE_ALLOWED, // ACTIVITY_RECOGNITION_SOURCE
|
||||||
AppOpsManager.MODE_ALLOWED, // BLUETOOTH_ADVERTISE
|
AppOpsManager.MODE_ALLOWED, // BLUETOOTH_ADVERTISE
|
||||||
AppOpsManager.MODE_ALLOWED, // RECORD_INCOMING_PHONE_AUDIO
|
AppOpsManager.MODE_ALLOWED, // RECORD_INCOMING_PHONE_AUDIO
|
||||||
|
AppOpsManager.MODE_ALLOWED, // NEARBY_WIFI_DEVICES
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2827,6 +2840,7 @@ public class AppOpsManager {
|
|||||||
false, // ACTIVITY_RECOGNITION_SOURCE
|
false, // ACTIVITY_RECOGNITION_SOURCE
|
||||||
false, // BLUETOOTH_ADVERTISE
|
false, // BLUETOOTH_ADVERTISE
|
||||||
false, // RECORD_INCOMING_PHONE_AUDIO
|
false, // RECORD_INCOMING_PHONE_AUDIO
|
||||||
|
false, // NEARBY_WIFI_DEVICES
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1976,6 +1976,14 @@
|
|||||||
android:label="@string/permlab_uwb_ranging"
|
android:label="@string/permlab_uwb_ranging"
|
||||||
android:protectionLevel="dangerous" />
|
android:protectionLevel="dangerous" />
|
||||||
|
|
||||||
|
<!-- Required to be able to advertise and connect to nearby devices via Wi-Fi.
|
||||||
|
<p>Protection level: dangerous -->
|
||||||
|
<permission android:name="android.permission.NEARBY_WIFI_DEVICES"
|
||||||
|
android:permissionGroup="android.permission-group.UNDEFINED"
|
||||||
|
android:description="@string/permdesc_nearby_wifi_devices"
|
||||||
|
android:label="@string/permlab_nearby_wifi_devices"
|
||||||
|
android:protectionLevel="dangerous" />
|
||||||
|
|
||||||
<!-- @SystemApi @TestApi Allows an application to suspend other apps, which will prevent the
|
<!-- @SystemApi @TestApi Allows an application to suspend other apps, which will prevent the
|
||||||
user from using them until they are unsuspended.
|
user from using them until they are unsuspended.
|
||||||
@hide
|
@hide
|
||||||
|
|||||||
@@ -1488,6 +1488,11 @@
|
|||||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=120]-->
|
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=120]-->
|
||||||
<string name="permdesc_uwb_ranging">Allow the app to determine relative position between nearby Ultra-Wideband devices</string>
|
<string name="permdesc_uwb_ranging">Allow the app to determine relative position between nearby Ultra-Wideband devices</string>
|
||||||
|
|
||||||
|
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=50]-->
|
||||||
|
<string name="permlab_nearby_wifi_devices">interact with nearby Wi\u2011Fi devices</string>
|
||||||
|
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=120]-->
|
||||||
|
<string name="permdesc_nearby_wifi_devices">Allows the app to advertise, connect, and determine the relative position of nearby Wi\u2011Fi devices</string>
|
||||||
|
|
||||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
<string name="permlab_preferredPaymentInfo">Preferred NFC Payment Service Information</string>
|
<string name="permlab_preferredPaymentInfo">Preferred NFC Payment Service Information</string>
|
||||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ final class DefaultPermissionGrantPolicy {
|
|||||||
NEARBY_DEVICES_PERMISSIONS.add(Manifest.permission.BLUETOOTH_CONNECT);
|
NEARBY_DEVICES_PERMISSIONS.add(Manifest.permission.BLUETOOTH_CONNECT);
|
||||||
NEARBY_DEVICES_PERMISSIONS.add(Manifest.permission.BLUETOOTH_SCAN);
|
NEARBY_DEVICES_PERMISSIONS.add(Manifest.permission.BLUETOOTH_SCAN);
|
||||||
NEARBY_DEVICES_PERMISSIONS.add(Manifest.permission.UWB_RANGING);
|
NEARBY_DEVICES_PERMISSIONS.add(Manifest.permission.UWB_RANGING);
|
||||||
|
NEARBY_DEVICES_PERMISSIONS.add(Manifest.permission.NEARBY_WIFI_DEVICES);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int MSG_READ_DEFAULT_PERMISSION_EXCEPTIONS = 1;
|
private static final int MSG_READ_DEFAULT_PERMISSION_EXCEPTIONS = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user