diff options
| author | Jeff Sharkey <jsharkey@google.com> | 2020-09-14 23:10:42 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-09-14 23:10:42 +0000 |
| commit | 7d4e7a0e02e8542e4d5ac08880f7d24780a548ee (patch) | |
| tree | 9be431cc8f602d71ffe02b27bc052fd507f2af87 /framework/java/android | |
| parent | b5ee4848c22cf25ddaa64acbdbbcc3d907e01749 (diff) | |
| parent | 58d54530bb61290d3bdc65ee2fdfbe2261244741 (diff) | |
Merge changes from topic "sep11" am: c0b288133a am: 58d54530bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195
Change-Id: I7da537200efe31e803234bd1a0236843064186c8
Diffstat (limited to 'framework/java/android')
10 files changed, 30 insertions, 27 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index f062a39c6f..3c7d8fca20 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -2470,7 +2470,7 @@ public final class BluetoothAdapter { * {@link #SOCKET_CHANNEL_AUTO_STATIC_NO_SDP} as channel number. * * @param channel RFCOMM channel to listen on - * @param mitm enforce man-in-the-middle protection for authentication. + * @param mitm enforce person-in-the-middle protection for authentication. * @param min16DigitPin enforce a pin key length og minimum 16 digit for sec mode 2 * connections. * @return a listening RFCOMM BluetoothServerSocket @@ -2528,7 +2528,7 @@ public final class BluetoothAdapter { /** * Create a listening, insecure RFCOMM Bluetooth socket with Service Record. * <p>The link key is not required to be authenticated, i.e the communication may be - * vulnerable to Man In the Middle attacks. For Bluetooth 2.1 devices, + * vulnerable to Person In the Middle attacks. For Bluetooth 2.1 devices, * the link will be encrypted, as encryption is mandartory. * For legacy devices (pre Bluetooth 2.1 devices) the link will not * be encrypted. Use {@link #listenUsingRfcommWithServiceRecord}, if an @@ -2561,7 +2561,7 @@ public final class BluetoothAdapter { * Create a listening, encrypted, * RFCOMM Bluetooth socket with Service Record. * <p>The link will be encrypted, but the link key is not required to be authenticated - * i.e the communication is vulnerable to Man In the Middle attacks. Use + * i.e the communication is vulnerable to Person In the Middle attacks. Use * {@link #listenUsingRfcommWithServiceRecord}, to ensure an authenticated link key. * <p> Use this socket if authentication of link key is not possible. * For example, for Bluetooth 2.1 devices, if any of the devices does not have @@ -2646,7 +2646,7 @@ public final class BluetoothAdapter { * {@link #SOCKET_CHANNEL_AUTO_STATIC_NO_SDP} as port number. * * @param port the PSM to listen on - * @param mitm enforce man-in-the-middle protection for authentication. + * @param mitm enforce person-in-the-middle protection for authentication. * @param min16DigitPin enforce a pin key length og minimum 16 digit for sec mode 2 * connections. * @return An L2CAP BluetoothServerSocket @@ -3347,7 +3347,7 @@ public final class BluetoothAdapter { * assign a dynamic PSM value. This socket can be used to listen for incoming connections. The * supported Bluetooth transport is LE only. * <p>The link key is not required to be authenticated, i.e the communication may be vulnerable - * to man-in-the-middle attacks. Use {@link #listenUsingL2capChannel}, if an encrypted and + * to person-in-the-middle attacks. Use {@link #listenUsingL2capChannel}, if an encrypted and * authenticated communication channel is desired. * <p>Use {@link BluetoothServerSocket#accept} to retrieve incoming connections from a listening * {@link BluetoothServerSocket}. diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java index 5c13c08f75..cf8cdd4ea9 100644 --- a/framework/java/android/bluetooth/BluetoothDevice.java +++ b/framework/java/android/bluetooth/BluetoothDevice.java @@ -1813,7 +1813,7 @@ public final class BluetoothDevice implements Parcelable { * socket will be encrypted. * <p> Use this socket only if an authenticated socket link is possible. * Authentication refers to the authentication of the link key to - * prevent man-in-the-middle type of attacks. + * prevent person-in-the-middle type of attacks. * For example, for Bluetooth 2.1 devices, if any of the devices does not * have an input and output capability or just has the ability to * display a numeric key, a secure socket connection is not possible. @@ -1848,7 +1848,7 @@ public final class BluetoothDevice implements Parcelable { * socket will be encrypted. * <p> Use this socket only if an authenticated socket link is possible. * Authentication refers to the authentication of the link key to - * prevent man-in-the-middle type of attacks. + * prevent person-in-the-middle type of attacks. * For example, for Bluetooth 2.1 devices, if any of the devices does not * have an input and output capability or just has the ability to * display a numeric key, a secure socket connection is not possible. @@ -1905,7 +1905,7 @@ public final class BluetoothDevice implements Parcelable { * socket will be encrypted. * <p> Use this socket only if an authenticated socket link is possible. * Authentication refers to the authentication of the link key to - * prevent man-in-the-middle type of attacks. + * prevent person-in-the-middle type of attacks. * For example, for Bluetooth 2.1 devices, if any of the devices does not * have an input and output capability or just has the ability to * display a numeric key, a secure socket connection is not possible. @@ -1937,7 +1937,7 @@ public final class BluetoothDevice implements Parcelable { * Create an RFCOMM {@link BluetoothSocket} socket ready to start an insecure * outgoing connection to this remote device using SDP lookup of uuid. * <p> The communication channel will not have an authenticated link key - * i.e it will be subject to man-in-the-middle attacks. For Bluetooth 2.1 + * i.e it will be subject to person-in-the-middle attacks. For Bluetooth 2.1 * devices, the link key will be encrypted, as encryption is mandatory. * For legacy devices (pre Bluetooth 2.1 devices) the link key will * be not be encrypted. Use {@link #createRfcommSocketToServiceRecord} if an @@ -2193,7 +2193,7 @@ public final class BluetoothDevice implements Parcelable { * <p>The remote device will be authenticated and communication on this socket will be * encrypted. * <p> Use this socket if an authenticated socket link is possible. Authentication refers - * to the authentication of the link key to prevent man-in-the-middle type of attacks. + * to the authentication of the link key to prevent person-in-the-middle type of attacks. * * @param psm dynamic PSM value from remote device * @return a CoC #BluetoothSocket ready for an outgoing connection @@ -2220,7 +2220,7 @@ public final class BluetoothDevice implements Parcelable { * <p>Use {@link BluetoothSocket#connect} to initiate the outgoing connection. * <p>Application using this API is responsible for obtaining PSM value from remote device. * <p> The communication channel may not have an authenticated link key, i.e. it may be subject - * to man-in-the-middle attacks. Use {@link #createL2capChannel(int)} if an encrypted and + * to person-in-the-middle attacks. Use {@link #createL2capChannel(int)} if an encrypted and * authenticated communication channel is possible. * * @param psm dynamic PSM value from remote device diff --git a/framework/java/android/bluetooth/BluetoothGatt.java b/framework/java/android/bluetooth/BluetoothGatt.java index f877f04626..c58b5d218e 100644 --- a/framework/java/android/bluetooth/BluetoothGatt.java +++ b/framework/java/android/bluetooth/BluetoothGatt.java @@ -134,14 +134,14 @@ public final class BluetoothGatt implements BluetoothProfile { /*package*/ static final int AUTHENTICATION_NONE = 0; /** - * Authentication requested; no man-in-the-middle protection required. + * Authentication requested; no person-in-the-middle protection required. * * @hide */ /*package*/ static final int AUTHENTICATION_NO_MITM = 1; /** - * Authentication with man-in-the-middle protection requested. + * Authentication with person-in-the-middle protection requested. * * @hide */ diff --git a/framework/java/android/bluetooth/BluetoothGattCallback.java b/framework/java/android/bluetooth/BluetoothGattCallback.java index cf82a33045..f718c0b57c 100644 --- a/framework/java/android/bluetooth/BluetoothGattCallback.java +++ b/framework/java/android/bluetooth/BluetoothGattCallback.java @@ -183,7 +183,7 @@ public abstract class BluetoothGattCallback { * @param gatt GATT client involved * @param interval Connection interval used on this connection, 1.25ms unit. Valid range is from * 6 (7.5ms) to 3200 (4000ms). - * @param latency Slave latency for the connection in number of connection events. Valid range + * @param latency Worker latency for the connection in number of connection events. Valid range * is from 0 to 499 * @param timeout Supervision timeout for this connection, in 10ms unit. Valid range is from 10 * (0.1s) to 3200 (32s) diff --git a/framework/java/android/bluetooth/BluetoothGattCharacteristic.java b/framework/java/android/bluetooth/BluetoothGattCharacteristic.java index 7066f470aa..8f1b59cf69 100644 --- a/framework/java/android/bluetooth/BluetoothGattCharacteristic.java +++ b/framework/java/android/bluetooth/BluetoothGattCharacteristic.java @@ -84,7 +84,7 @@ public class BluetoothGattCharacteristic implements Parcelable { public static final int PERMISSION_READ_ENCRYPTED = 0x02; /** - * Characteristic permission: Allow reading with man-in-the-middle protection + * Characteristic permission: Allow reading with person-in-the-middle protection */ public static final int PERMISSION_READ_ENCRYPTED_MITM = 0x04; @@ -99,7 +99,7 @@ public class BluetoothGattCharacteristic implements Parcelable { public static final int PERMISSION_WRITE_ENCRYPTED = 0x20; /** - * Characteristic permission: Allow encrypted writes with man-in-the-middle + * Characteristic permission: Allow encrypted writes with person-in-the-middle * protection */ public static final int PERMISSION_WRITE_ENCRYPTED_MITM = 0x40; @@ -111,7 +111,7 @@ public class BluetoothGattCharacteristic implements Parcelable { /** * Characteristic permission: Allow signed write operations with - * man-in-the-middle protection + * person-in-the-middle protection */ public static final int PERMISSION_WRITE_SIGNED_MITM = 0x100; diff --git a/framework/java/android/bluetooth/BluetoothGattDescriptor.java b/framework/java/android/bluetooth/BluetoothGattDescriptor.java index 7cc2d6bc53..49ba281e2e 100644 --- a/framework/java/android/bluetooth/BluetoothGattDescriptor.java +++ b/framework/java/android/bluetooth/BluetoothGattDescriptor.java @@ -58,7 +58,7 @@ public class BluetoothGattDescriptor implements Parcelable { public static final int PERMISSION_READ_ENCRYPTED = 0x02; /** - * Descriptor permission: Allow reading with man-in-the-middle protection + * Descriptor permission: Allow reading with person-in-the-middle protection */ public static final int PERMISSION_READ_ENCRYPTED_MITM = 0x04; @@ -73,7 +73,7 @@ public class BluetoothGattDescriptor implements Parcelable { public static final int PERMISSION_WRITE_ENCRYPTED = 0x20; /** - * Descriptor permission: Allow encrypted writes with man-in-the-middle + * Descriptor permission: Allow encrypted writes with person-in-the-middle * protection */ public static final int PERMISSION_WRITE_ENCRYPTED_MITM = 0x40; @@ -85,7 +85,7 @@ public class BluetoothGattDescriptor implements Parcelable { /** * Descriptor permission: Allow signed write operations with - * man-in-the-middle protection + * person-in-the-middle protection */ public static final int PERMISSION_WRITE_SIGNED_MITM = 0x100; diff --git a/framework/java/android/bluetooth/BluetoothGattServerCallback.java b/framework/java/android/bluetooth/BluetoothGattServerCallback.java index 2c8114be3f..0ead5f57e8 100644 --- a/framework/java/android/bluetooth/BluetoothGattServerCallback.java +++ b/framework/java/android/bluetooth/BluetoothGattServerCallback.java @@ -187,7 +187,7 @@ public abstract class BluetoothGattServerCallback { * @param device The remote device involved * @param interval Connection interval used on this connection, 1.25ms unit. Valid range is from * 6 (7.5ms) to 3200 (4000ms). - * @param latency Slave latency for the connection in number of connection events. Valid range + * @param latency Worker latency for the connection in number of connection events. Valid range * is from 0 to 499 * @param timeout Supervision timeout for this connection, in 10ms unit. Valid range is from 10 * (0.1s) to 3200 (32s) diff --git a/framework/java/android/bluetooth/BluetoothGattService.java b/framework/java/android/bluetooth/BluetoothGattService.java index 13d6d7021e..e7809aeb1b 100644 --- a/framework/java/android/bluetooth/BluetoothGattService.java +++ b/framework/java/android/bluetooth/BluetoothGattService.java @@ -44,7 +44,7 @@ public class BluetoothGattService implements Parcelable { /** - * The remote device his service is associated with. + * The remote device this service is associated with. * This applies to client applications only. * * @hide diff --git a/framework/java/android/bluetooth/BluetoothServerSocket.java b/framework/java/android/bluetooth/BluetoothServerSocket.java index 88c186c88a..5c1bcaf313 100644 --- a/framework/java/android/bluetooth/BluetoothServerSocket.java +++ b/framework/java/android/bluetooth/BluetoothServerSocket.java @@ -110,7 +110,7 @@ public final class BluetoothServerSocket implements Closeable { * @param auth require the remote device to be authenticated * @param encrypt require the connection to be encrypted * @param port remote port - * @param mitm enforce man-in-the-middle protection for authentication. + * @param mitm enforce person-in-the-middle protection for authentication. * @param min16DigitPin enforce a minimum length of 16 digits for a sec mode 2 connection * @throws IOException On error, for example Bluetooth not available, or insufficient * privileges diff --git a/framework/java/android/bluetooth/BluetoothSocket.java b/framework/java/android/bluetooth/BluetoothSocket.java index f774369655..d41a6d064d 100644 --- a/framework/java/android/bluetooth/BluetoothSocket.java +++ b/framework/java/android/bluetooth/BluetoothSocket.java @@ -128,9 +128,12 @@ public final class BluetoothSocket implements Closeable { private final BluetoothInputStream mInputStream; private final BluetoothOutputStream mOutputStream; private final ParcelUuid mUuid; - private boolean mExcludeSdp = false; /* when true no SPP SDP record will be created */ - private boolean mAuthMitm = false; /* when true Man-in-the-middle protection will be enabled*/ - private boolean mMin16DigitPin = false; /* Minimum 16 digit pin for sec mode 2 connections */ + /** when true no SPP SDP record will be created */ + private boolean mExcludeSdp = false; + /** when true Person-in-the-middle protection will be enabled */ + private boolean mAuthMitm = false; + /** Minimum 16 digit pin for sec mode 2 connections */ + private boolean mMin16DigitPin = false; @UnsupportedAppUsage(publicAlternatives = "Use {@link BluetoothSocket} public API instead.") private ParcelFileDescriptor mPfd; @UnsupportedAppUsage @@ -190,7 +193,7 @@ public final class BluetoothSocket implements Closeable { * @param device remote device that this socket can connect to * @param port remote port * @param uuid SDP uuid - * @param mitm enforce man-in-the-middle protection. + * @param mitm enforce person-in-the-middle protection. * @param min16DigitPin enforce a minimum length of 16 digits for a sec mode 2 connection * @throws IOException On error, for example Bluetooth not available, or insufficient * privileges |
