Loading service/src/com/android/server/bluetooth/AdapterBinder.kt +0 −13 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) Loading service/src/com/android/server/bluetooth/BluetoothManagerService.java +0 −12 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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()); Loading Loading @@ -1707,7 +1696,6 @@ class BluetoothManagerService { break; } mAdapter = null; mSupportedProfileList.clear(); } finally { mAdapterLock.writeLock().unlock(); } Loading Loading
service/src/com/android/server/bluetooth/AdapterBinder.kt +0 −13 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) Loading
service/src/com/android/server/bluetooth/BluetoothManagerService.java +0 −12 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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()); Loading Loading @@ -1707,7 +1696,6 @@ class BluetoothManagerService { break; } mAdapter = null; mSupportedProfileList.clear(); } finally { mAdapterLock.writeLock().unlock(); } Loading