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

Commit f873353a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "SystemServer: Delete non-oneway call never used" into main

parents 54043c67 6a67df82
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
 */
package com.android.server.bluetooth

import android.bluetooth.BluetoothProfile
import android.bluetooth.IBluetooth
import android.bluetooth.IBluetoothCallback
import android.content.AttributionSource
@@ -71,18 +70,6 @@ class AdapterBinder(rawBinder: IBinder) {
        adapterBinder.unregisterCallback(callback, source)
    }

    @Throws(RemoteException::class)
    fun getSupportedProfiles(source: AttributionSource): MutableList<Int> {
        val supportedProfiles = ArrayList<Int>()
        val supportedProfilesBitMask = adapterBinder.getSupportedProfiles(source)
        for (i in 0..BluetoothProfile.MAX_PROFILE_ID) {
            if (supportedProfilesBitMask and (1 shl i).toLong() != 0L) {
                supportedProfiles.add(i)
            }
        }
        return supportedProfiles
    }

    @Throws(RemoteException::class)
    fun setForegroundUserId(userId: Int, source: AttributionSource) {
        adapterBinder.setForegroundUserId(userId, source)
+0 −12
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ import java.time.Duration;
import java.time.Instant;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
@@ -209,8 +208,6 @@ class BluetoothManagerService {
    @GuardedBy("mAdapterLock")
    private AdapterBinder mAdapter = null;

    private List<Integer> mSupportedProfileList = new ArrayList<>();

    // used inside handler thread
    private boolean mQuietEnable = false;
    private boolean mEnable = false;
@@ -1620,14 +1617,6 @@ class BluetoothManagerService {
                            sendBluetoothServiceUpCallback();
                        }

                        // Get the supported profiles list
                        try {
                            mSupportedProfileList =
                                    mAdapter.getSupportedProfiles(mContext.getAttributionSource());
                        } catch (RemoteException e) {
                            Log.e(TAG, "Unable to get the supported profiles list", e);
                        }

                        // Do enable request
                        try {
                            mAdapter.enable(mQuietEnable, mContext.getAttributionSource());
@@ -1707,7 +1696,6 @@ class BluetoothManagerService {
                            break;
                        }
                        mAdapter = null;
                        mSupportedProfileList.clear();
                    } finally {
                        mAdapterLock.writeLock().unlock();
                    }