Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9fdcc96 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Annotate @SystemApi with required permissions.

Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
parent 71f6d4fe
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ package android.bluetooth;


import android.Manifest;
import android.Manifest;
import android.annotation.RequiresPermission;
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
import android.content.Context;
import android.content.Context;
import android.os.RemoteException;
import android.os.RemoteException;
import android.util.Log;
import android.util.Log;
@@ -48,6 +49,7 @@ import java.util.List;
 * @see Context#getSystemService
 * @see Context#getSystemService
 * @see BluetoothAdapter#getDefaultAdapter()
 * @see BluetoothAdapter#getDefaultAdapter()
 */
 */
@SystemService(Context.BLUETOOTH_SERVICE)
public final class BluetoothManager {
public final class BluetoothManager {
    private static final String TAG = "BluetoothManager";
    private static final String TAG = "BluetoothManager";
    private static final boolean DBG = true;
    private static final boolean DBG = true;