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

Commit 4493d4cb authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6289358 from a32f75b5ed5af7126333255f98a5c9b9a0bdb46d to sc-release

Change-Id: I253b47f4b594f1309079306945a7e7363e8eed02
parents 872926b2 5a02d0d7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -849,7 +849,7 @@ public final class BluetoothAdapter {
        synchronized (mLock) {
            if (sBluetoothLeScanner == null) {
                sBluetoothLeScanner = new BluetoothLeScanner(mManagerService, getOpPackageName(),
                        getFeatureId());
                        getAttributionTag());
            }
        }
        return sBluetoothLeScanner;
@@ -1663,11 +1663,11 @@ public final class BluetoothAdapter {
        return ActivityThread.currentOpPackageName();
    }

    private String getFeatureId() {
    private String getAttributionTag() {
        // Workaround for legacy API for getting a BluetoothAdapter not
        // passing a context
        if (mContext != null) {
            return mContext.getFeatureId();
            return mContext.getAttributionTag();
        }
        return null;
    }
@@ -1709,7 +1709,7 @@ public final class BluetoothAdapter {
        try {
            mServiceLock.readLock().lock();
            if (mService != null) {
                return mService.startDiscovery(getOpPackageName(), getFeatureId());
                return mService.startDiscovery(getOpPackageName(), getAttributionTag());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public final class BluetoothManager {
     * @hide
     */
    public BluetoothManager(Context context) {
        if (context.getFeatureId() == null) {
        if (context.getAttributionTag() == null) {
            context = context.getApplicationContext();
            if (context == null) {
                throw new IllegalArgumentException(