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

Commit 7f827c29 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Jeff Sharkey
Browse files

Add RequiresFeature annotation.

Certain APIs require that a device have a specific feature to operate
correctly, so start annotating them.

Test: builds, boots
Bug: 72284763
Change-Id: Ie2f30284bdfdb6acc4067f434eba3b5433837606
Exempt-From-Owner-Approval: simple annotations
parent cda8c1fc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -17,9 +17,11 @@
package android.bluetooth;

import android.Manifest;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.RemoteException;
import android.util.Log;

@@ -47,6 +49,7 @@ import java.util.List;
 * @see BluetoothAdapter#getDefaultAdapter()
 */
@SystemService(Context.BLUETOOTH_SERVICE)
@RequiresFeature(PackageManager.FEATURE_BLUETOOTH)
public final class BluetoothManager {
    private static final String TAG = "BluetoothManager";
    private static final boolean DBG = true;