Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +12 −4 Original line number Diff line number Diff line Loading @@ -358,7 +358,9 @@ public class AdapterService extends Service { private UserManager mUserManager; private CompanionDeviceManager mCompanionDeviceManager; private PhonePolicy mPhonePolicy; // Phone Policy is not used on all devices. Ensure you null check before using it @Nullable private PhonePolicy mPhonePolicy; private ActiveDeviceManager mActiveDeviceManager; private DatabaseManager mDatabaseManager; private SilenceDeviceManager mSilenceDeviceManager; Loading Loading @@ -6905,8 +6907,10 @@ public class AdapterService extends Service { /** Update PhonePolicy when new {@link BluetoothDevice} creates an ACL connection. */ public void updatePhonePolicyOnAclConnect(BluetoothDevice device) { if (mPhonePolicy != null) { mPhonePolicy.handleAclConnected(device); } } /** * Notify GATT of a Bluetooth profile's connection state change for a given {@link Loading @@ -6928,15 +6932,19 @@ public class AdapterService extends Service { */ public void handleProfileConnectionStateChange( int profile, BluetoothDevice device, int fromState, int toState) { if (mPhonePolicy != null) { mPhonePolicy.profileConnectionStateChanged(profile, device, fromState, toState); } } /** Handle Bluetooth app state when active device changes for a given {@code profile}. */ public void handleActiveDeviceChange(int profile, BluetoothDevice device) { mActiveDeviceManager.profileActiveDeviceChanged(profile, device); mSilenceDeviceManager.profileActiveDeviceChanged(profile, device); if (mPhonePolicy != null) { mPhonePolicy.profileActiveDeviceChanged(profile, device); } } static int convertScanModeToHal(int mode) { switch (mode) { Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +12 −4 Original line number Diff line number Diff line Loading @@ -358,7 +358,9 @@ public class AdapterService extends Service { private UserManager mUserManager; private CompanionDeviceManager mCompanionDeviceManager; private PhonePolicy mPhonePolicy; // Phone Policy is not used on all devices. Ensure you null check before using it @Nullable private PhonePolicy mPhonePolicy; private ActiveDeviceManager mActiveDeviceManager; private DatabaseManager mDatabaseManager; private SilenceDeviceManager mSilenceDeviceManager; Loading Loading @@ -6905,8 +6907,10 @@ public class AdapterService extends Service { /** Update PhonePolicy when new {@link BluetoothDevice} creates an ACL connection. */ public void updatePhonePolicyOnAclConnect(BluetoothDevice device) { if (mPhonePolicy != null) { mPhonePolicy.handleAclConnected(device); } } /** * Notify GATT of a Bluetooth profile's connection state change for a given {@link Loading @@ -6928,15 +6932,19 @@ public class AdapterService extends Service { */ public void handleProfileConnectionStateChange( int profile, BluetoothDevice device, int fromState, int toState) { if (mPhonePolicy != null) { mPhonePolicy.profileConnectionStateChanged(profile, device, fromState, toState); } } /** Handle Bluetooth app state when active device changes for a given {@code profile}. */ public void handleActiveDeviceChange(int profile, BluetoothDevice device) { mActiveDeviceManager.profileActiveDeviceChanged(profile, device); mSilenceDeviceManager.profileActiveDeviceChanged(profile, device); if (mPhonePolicy != null) { mPhonePolicy.profileActiveDeviceChanged(profile, device); } } static int convertScanModeToHal(int mode) { switch (mode) { Loading