Loading android/app/src/com/android/bluetooth/bas/BatteryService.java +6 −4 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.util.Log; import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import com.android.modules.utils.SynchronousResultReceiver; Loading @@ -62,6 +63,7 @@ public class BatteryService extends ProfileService { private static BatteryService sBatteryService; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private HandlerThread mStateMachinesThread; private final Map<BluetoothDevice, BatteryStateMachine> mStateMachines = new HashMap<>(); Loading Loading @@ -94,6 +96,8 @@ public class BatteryService extends ProfileService { mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when BatteryService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when BatteryService starts"); mStateMachines.clear(); mStateMachinesThread = new HandlerThread("BatteryService.StateMachines"); Loading Loading @@ -395,8 +399,7 @@ public class BatteryService extends ProfileService { if (DBG) { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } mAdapterService.getDatabase() .setProfileConnectionPolicy(device, BluetoothProfile.BATTERY, mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.BATTERY, connectionPolicy); if (connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -413,8 +416,7 @@ public class BatteryService extends ProfileService { public int getConnectionPolicy(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH_PRIVILEGED permission"); return mAdapterService.getDatabase() .getProfileConnectionPolicy(device, BluetoothProfile.BATTERY); return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.BATTERY); } /** * Called when the battery level of the device is notified. Loading android/app/src/com/android/bluetooth/bass_client/BassClientService.java +7 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.bluetooth.bass_client; import static android.Manifest.permission.BLUETOOTH_CONNECT; import static com.android.bluetooth.Utils.enforceBluetoothPrivilegedPermission; import android.bluetooth.BluetoothAdapter; Loading Loading @@ -47,6 +48,7 @@ import android.util.Log; import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import java.nio.ByteBuffer; Loading Loading @@ -74,6 +76,7 @@ public class BassClientService extends ProfileService { private HandlerThread mStateMachinesThread; private HandlerThread mCallbackHandlerThread; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private BluetoothAdapter mBluetoothAdapter = null; private BassUtils mBassUtils = null; private Map<BluetoothDevice, BluetoothDevice> mActiveSourceMap; Loading Loading @@ -218,6 +221,8 @@ public class BassClientService extends ProfileService { } mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when BassClientService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when BassClientService starts"); mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); mStateMachines.clear(); mStateMachinesThread = new HandlerThread("BassClientService.StateMachines"); Loading Loading @@ -545,7 +550,7 @@ public class BassClientService extends ProfileService { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } boolean setSuccessfully = mAdapterService.getDatabase().setProfileConnectionPolicy(device, mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT, connectionPolicy); if (setSuccessfully && connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -568,8 +573,7 @@ public class BassClientService extends ProfileService { * @return connection policy of the device */ public int getConnectionPolicy(BluetoothDevice device) { return mAdapterService .getDatabase() return mDatabaseManager .getProfileConnectionPolicy(device, BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT); } Loading android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java +7 −3 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.util.Pair; import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import com.android.modules.utils.SynchronousResultReceiver; Loading Loading @@ -76,6 +77,7 @@ public class CsipSetCoordinatorService extends ProfileService { private static CsipSetCoordinatorService sCsipSetCoordinatorService; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private HandlerThread mStateMachinesThread; private BluetoothDevice mPreviousAudioDevice; Loading Loading @@ -121,10 +123,12 @@ public class CsipSetCoordinatorService extends ProfileService { throw new IllegalStateException("start() called twice"); } // Get AdapterService, CsipSetCoordinatorNativeInterface. // Get AdapterService, DatabaseManager, CsipSetCoordinatorNativeInterface. // None of them can be null. mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when CsipSetCoordinatorService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when CsipSetCoordinatorService starts"); mCsipSetCoordinatorNativeInterface = Objects.requireNonNull( CsipSetCoordinatorNativeInterface.getInstance(), "CsipSetCoordinatorNativeInterface cannot be null when" Loading Loading @@ -461,7 +465,7 @@ public class CsipSetCoordinatorService extends ProfileService { if (DBG) { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } mAdapterService.getDatabase().setProfileConnectionPolicy( mDatabaseManager.setProfileConnectionPolicy( device, BluetoothProfile.CSIP_SET_COORDINATOR, connectionPolicy); if (connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -479,7 +483,7 @@ public class CsipSetCoordinatorService extends ProfileService { */ public int getConnectionPolicy(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH_PRIVILEGED permission"); return mAdapterService.getDatabase().getProfileConnectionPolicy( return mDatabaseManager.getProfileConnectionPolicy( device, BluetoothProfile.CSIP_SET_COORDINATOR); } Loading android/app/src/com/android/bluetooth/hap/HapClientService.java +7 −5 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.ServiceFactory; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.bluetooth.csip.CsipSetCoordinatorService; import com.android.internal.annotations.VisibleForTesting; import com.android.modules.utils.SynchronousResultReceiver; Loading Loading @@ -79,6 +80,7 @@ public class HapClientService extends ProfileService { @VisibleForTesting HapClientNativeInterface mHapClientNativeInterface; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private HandlerThread mStateMachinesThread; private BroadcastReceiver mBondStateChangedReceiver; private BroadcastReceiver mConnectionStateChangedReceiver; Loading Loading @@ -151,10 +153,12 @@ public class HapClientService extends ProfileService { throw new IllegalStateException("start() called twice"); } // Get AdapterService, HapClientNativeInterface, AudioManager. // Get AdapterService, HapClientNativeInterface, DatabaseManager, AudioManager. // None of them can be null. mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when HapClientService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when HapClientService starts"); mHapClientNativeInterface = Objects.requireNonNull( HapClientNativeInterface.getInstance(), "HapClientNativeInterface cannot be null when HapClientService starts"); Loading Loading @@ -368,8 +372,7 @@ public class HapClientService extends ProfileService { if (DBG) { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } mAdapterService.getDatabase() .setProfileConnectionPolicy(device, BluetoothProfile.HAP_CLIENT, mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.HAP_CLIENT, connectionPolicy); if (connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -392,8 +395,7 @@ public class HapClientService extends ProfileService { * @hide */ public int getConnectionPolicy(BluetoothDevice device) { return mAdapterService.getDatabase() .getProfileConnectionPolicy(device, BluetoothProfile.HAP_CLIENT); return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HAP_CLIENT); } /** Loading android/app/src/com/android/bluetooth/vc/VolumeControlService.java +7 −5 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.ServiceFactory; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import com.android.modules.utils.SynchronousResultReceiver; Loading @@ -71,6 +72,7 @@ public class VolumeControlService extends ProfileService { private static VolumeControlService sVolumeControlService; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private HandlerThread mStateMachinesThread; private BluetoothDevice mPreviousAudioDevice; Loading Loading @@ -211,10 +213,12 @@ public class VolumeControlService extends ProfileService { throw new IllegalStateException("start() called twice"); } // Get AdapterService, VolumeControlNativeInterface, AudioManager. // Get AdapterService, VolumeControlNativeInterface, DatabaseManager, AudioManager. // None of them can be null. mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when VolumeControlService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when VolumeControlService starts"); mVolumeControlNativeInterface = Objects.requireNonNull( VolumeControlNativeInterface.getInstance(), "VolumeControlNativeInterface cannot be null when VolumeControlService starts"); Loading Loading @@ -532,8 +536,7 @@ public class VolumeControlService extends ProfileService { if (DBG) { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } mAdapterService.getDatabase() .setProfileConnectionPolicy(device, BluetoothProfile.VOLUME_CONTROL, mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.VOLUME_CONTROL, connectionPolicy); if (connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -547,8 +550,7 @@ public class VolumeControlService extends ProfileService { public int getConnectionPolicy(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH_PRIVILEGED permission"); return mAdapterService.getDatabase() .getProfileConnectionPolicy(device, BluetoothProfile.VOLUME_CONTROL); return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.VOLUME_CONTROL); } boolean isVolumeOffsetAvailable(BluetoothDevice device) { Loading Loading
android/app/src/com/android/bluetooth/bas/BatteryService.java +6 −4 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.util.Log; import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import com.android.modules.utils.SynchronousResultReceiver; Loading @@ -62,6 +63,7 @@ public class BatteryService extends ProfileService { private static BatteryService sBatteryService; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private HandlerThread mStateMachinesThread; private final Map<BluetoothDevice, BatteryStateMachine> mStateMachines = new HashMap<>(); Loading Loading @@ -94,6 +96,8 @@ public class BatteryService extends ProfileService { mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when BatteryService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when BatteryService starts"); mStateMachines.clear(); mStateMachinesThread = new HandlerThread("BatteryService.StateMachines"); Loading Loading @@ -395,8 +399,7 @@ public class BatteryService extends ProfileService { if (DBG) { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } mAdapterService.getDatabase() .setProfileConnectionPolicy(device, BluetoothProfile.BATTERY, mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.BATTERY, connectionPolicy); if (connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -413,8 +416,7 @@ public class BatteryService extends ProfileService { public int getConnectionPolicy(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH_PRIVILEGED permission"); return mAdapterService.getDatabase() .getProfileConnectionPolicy(device, BluetoothProfile.BATTERY); return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.BATTERY); } /** * Called when the battery level of the device is notified. Loading
android/app/src/com/android/bluetooth/bass_client/BassClientService.java +7 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.bluetooth.bass_client; import static android.Manifest.permission.BLUETOOTH_CONNECT; import static com.android.bluetooth.Utils.enforceBluetoothPrivilegedPermission; import android.bluetooth.BluetoothAdapter; Loading Loading @@ -47,6 +48,7 @@ import android.util.Log; import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import java.nio.ByteBuffer; Loading Loading @@ -74,6 +76,7 @@ public class BassClientService extends ProfileService { private HandlerThread mStateMachinesThread; private HandlerThread mCallbackHandlerThread; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private BluetoothAdapter mBluetoothAdapter = null; private BassUtils mBassUtils = null; private Map<BluetoothDevice, BluetoothDevice> mActiveSourceMap; Loading Loading @@ -218,6 +221,8 @@ public class BassClientService extends ProfileService { } mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when BassClientService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when BassClientService starts"); mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); mStateMachines.clear(); mStateMachinesThread = new HandlerThread("BassClientService.StateMachines"); Loading Loading @@ -545,7 +550,7 @@ public class BassClientService extends ProfileService { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } boolean setSuccessfully = mAdapterService.getDatabase().setProfileConnectionPolicy(device, mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT, connectionPolicy); if (setSuccessfully && connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -568,8 +573,7 @@ public class BassClientService extends ProfileService { * @return connection policy of the device */ public int getConnectionPolicy(BluetoothDevice device) { return mAdapterService .getDatabase() return mDatabaseManager .getProfileConnectionPolicy(device, BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT); } Loading
android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java +7 −3 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.util.Pair; import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import com.android.modules.utils.SynchronousResultReceiver; Loading Loading @@ -76,6 +77,7 @@ public class CsipSetCoordinatorService extends ProfileService { private static CsipSetCoordinatorService sCsipSetCoordinatorService; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private HandlerThread mStateMachinesThread; private BluetoothDevice mPreviousAudioDevice; Loading Loading @@ -121,10 +123,12 @@ public class CsipSetCoordinatorService extends ProfileService { throw new IllegalStateException("start() called twice"); } // Get AdapterService, CsipSetCoordinatorNativeInterface. // Get AdapterService, DatabaseManager, CsipSetCoordinatorNativeInterface. // None of them can be null. mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when CsipSetCoordinatorService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when CsipSetCoordinatorService starts"); mCsipSetCoordinatorNativeInterface = Objects.requireNonNull( CsipSetCoordinatorNativeInterface.getInstance(), "CsipSetCoordinatorNativeInterface cannot be null when" Loading Loading @@ -461,7 +465,7 @@ public class CsipSetCoordinatorService extends ProfileService { if (DBG) { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } mAdapterService.getDatabase().setProfileConnectionPolicy( mDatabaseManager.setProfileConnectionPolicy( device, BluetoothProfile.CSIP_SET_COORDINATOR, connectionPolicy); if (connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -479,7 +483,7 @@ public class CsipSetCoordinatorService extends ProfileService { */ public int getConnectionPolicy(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH_PRIVILEGED permission"); return mAdapterService.getDatabase().getProfileConnectionPolicy( return mDatabaseManager.getProfileConnectionPolicy( device, BluetoothProfile.CSIP_SET_COORDINATOR); } Loading
android/app/src/com/android/bluetooth/hap/HapClientService.java +7 −5 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.ServiceFactory; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.bluetooth.csip.CsipSetCoordinatorService; import com.android.internal.annotations.VisibleForTesting; import com.android.modules.utils.SynchronousResultReceiver; Loading Loading @@ -79,6 +80,7 @@ public class HapClientService extends ProfileService { @VisibleForTesting HapClientNativeInterface mHapClientNativeInterface; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private HandlerThread mStateMachinesThread; private BroadcastReceiver mBondStateChangedReceiver; private BroadcastReceiver mConnectionStateChangedReceiver; Loading Loading @@ -151,10 +153,12 @@ public class HapClientService extends ProfileService { throw new IllegalStateException("start() called twice"); } // Get AdapterService, HapClientNativeInterface, AudioManager. // Get AdapterService, HapClientNativeInterface, DatabaseManager, AudioManager. // None of them can be null. mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when HapClientService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when HapClientService starts"); mHapClientNativeInterface = Objects.requireNonNull( HapClientNativeInterface.getInstance(), "HapClientNativeInterface cannot be null when HapClientService starts"); Loading Loading @@ -368,8 +372,7 @@ public class HapClientService extends ProfileService { if (DBG) { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } mAdapterService.getDatabase() .setProfileConnectionPolicy(device, BluetoothProfile.HAP_CLIENT, mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.HAP_CLIENT, connectionPolicy); if (connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -392,8 +395,7 @@ public class HapClientService extends ProfileService { * @hide */ public int getConnectionPolicy(BluetoothDevice device) { return mAdapterService.getDatabase() .getProfileConnectionPolicy(device, BluetoothProfile.HAP_CLIENT); return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.HAP_CLIENT); } /** Loading
android/app/src/com/android/bluetooth/vc/VolumeControlService.java +7 −5 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.btservice.ServiceFactory; import com.android.bluetooth.btservice.storage.DatabaseManager; import com.android.internal.annotations.VisibleForTesting; import com.android.modules.utils.SynchronousResultReceiver; Loading @@ -71,6 +72,7 @@ public class VolumeControlService extends ProfileService { private static VolumeControlService sVolumeControlService; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; private HandlerThread mStateMachinesThread; private BluetoothDevice mPreviousAudioDevice; Loading Loading @@ -211,10 +213,12 @@ public class VolumeControlService extends ProfileService { throw new IllegalStateException("start() called twice"); } // Get AdapterService, VolumeControlNativeInterface, AudioManager. // Get AdapterService, VolumeControlNativeInterface, DatabaseManager, AudioManager. // None of them can be null. mAdapterService = Objects.requireNonNull(AdapterService.getAdapterService(), "AdapterService cannot be null when VolumeControlService starts"); mDatabaseManager = Objects.requireNonNull(mAdapterService.getDatabase(), "DatabaseManager cannot be null when VolumeControlService starts"); mVolumeControlNativeInterface = Objects.requireNonNull( VolumeControlNativeInterface.getInstance(), "VolumeControlNativeInterface cannot be null when VolumeControlService starts"); Loading Loading @@ -532,8 +536,7 @@ public class VolumeControlService extends ProfileService { if (DBG) { Log.d(TAG, "Saved connectionPolicy " + device + " = " + connectionPolicy); } mAdapterService.getDatabase() .setProfileConnectionPolicy(device, BluetoothProfile.VOLUME_CONTROL, mDatabaseManager.setProfileConnectionPolicy(device, BluetoothProfile.VOLUME_CONTROL, connectionPolicy); if (connectionPolicy == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { connect(device); Loading @@ -547,8 +550,7 @@ public class VolumeControlService extends ProfileService { public int getConnectionPolicy(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH_PRIVILEGED permission"); return mAdapterService.getDatabase() .getProfileConnectionPolicy(device, BluetoothProfile.VOLUME_CONTROL); return mDatabaseManager.getProfileConnectionPolicy(device, BluetoothProfile.VOLUME_CONTROL); } boolean isVolumeOffsetAvailable(BluetoothDevice device) { Loading