Add thread safety documentation
An upcoming change will remove "synchronized" from the API docs. This change documents those cases where the guarantees can be determined from code inspection. Bug: 25767152 Change-Id: I75083ce01513ed315222304fe3f34190d40748cb
This commit is contained in:
@ -74,6 +74,8 @@ import java.util.UUID;
|
||||
* {@link #listenUsingRfcommWithServiceRecord(String,UUID)}; or start a scan for
|
||||
* Bluetooth LE devices with {@link #startLeScan(LeScanCallback callback)}.
|
||||
*
|
||||
* <p>This class is thread safe.
|
||||
*
|
||||
* <p class="note"><strong>Note:</strong>
|
||||
* Most methods require the {@link android.Manifest.permission#BLUETOOTH}
|
||||
* permission and some also require the
|
||||
@ -82,7 +84,7 @@ import java.util.UUID;
|
||||
* <div class="special reference">
|
||||
* <h3>Developer Guides</h3>
|
||||
* <p>For more information about using Bluetooth, read the
|
||||
* <a href="{@docRoot}guide/topics/wireless/bluetooth.html">Bluetooth</a> developer guide.</p>
|
||||
* <a href="{@docRoot}guide/topics/wireless/bluetooth.html">Bluetooth</a> developer guide.
|
||||
* </div>
|
||||
*
|
||||
* {@see BluetoothDevice}
|
||||
|
@ -25,7 +25,8 @@ import java.net.SocketOptions;
|
||||
|
||||
/**
|
||||
* Creates a (non-server) socket in the UNIX-domain namespace. The interface
|
||||
* here is not entirely unlike that of java.net.Socket
|
||||
* here is not entirely unlike that of java.net.Socket. This class and the streams
|
||||
* returned from it may be used from multiple threads.
|
||||
*/
|
||||
public class LocalSocket implements Closeable {
|
||||
|
||||
|
@ -36,7 +36,8 @@ import java.util.Map;
|
||||
* saving time and bandwidth. This class supports {@link
|
||||
* java.net.HttpURLConnection} and {@link javax.net.ssl.HttpsURLConnection};
|
||||
* there is no platform-provided cache for {@code DefaultHttpClient} or
|
||||
* {@code AndroidHttpClient}.
|
||||
* {@code AndroidHttpClient}. Installation and instances are thread
|
||||
* safe.
|
||||
*
|
||||
* <h3>Installing an HTTP response cache</h3>
|
||||
* Enable caching of all of your application's HTTP requests by installing the
|
||||
|
@ -52,7 +52,7 @@ public class EventLog {
|
||||
private static HashMap<String, Integer> sTagCodes = null;
|
||||
private static HashMap<Integer, String> sTagNames = null;
|
||||
|
||||
/** A previously logged event read from the logs. */
|
||||
/** A previously logged event read from the logs. Instances are thread safe. */
|
||||
public static final class Event {
|
||||
private final ByteBuffer mBuffer;
|
||||
|
||||
|
@ -73,7 +73,8 @@ import android.util.SparseIntArray;
|
||||
|
||||
/**
|
||||
* Applies all of the metadata changes that have been set since the MediaMetadataEditor instance
|
||||
* was created or since {@link #clear()} was called.
|
||||
* was created or since {@link #clear()} was called. Subclasses should synchronize on
|
||||
* {@code this} for thread safety.
|
||||
*/
|
||||
public abstract void apply();
|
||||
|
||||
|
Reference in New Issue
Block a user