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

Commit 8effed0b authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6296837 from 9490c52b5b317077e84612a32d36abc17804e321 to mainline-release

Change-Id: I16f4d7570b4c5a8bfe3a18a96a32f263a1047a7a
parents 69770751 f0d36b80
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(