Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +3 −4 Original line number Diff line number Diff line Loading @@ -6226,10 +6226,9 @@ public class AdapterService extends Service { Log.w(TAG, "GATT Service is not running!"); return; } if (Flags.scanManagerRefactor()) { mScanController.notifyProfileConnectionStateChange(profile, fromState, toState); } else { mGattService.notifyProfileConnectionStateChange(profile, fromState, toState); ScanController controller = getBluetoothScanController(); if (controller != null) { controller.notifyProfileConnectionStateChange(profile, fromState, toState); } } Loading android/app/src/com/android/bluetooth/gatt/GattService.java +0 −7 Original line number Diff line number Diff line Loading @@ -284,13 +284,6 @@ public class GattService extends ProfileService { return restrictedHandles != null && restrictedHandles.contains(handle); } /** Notify Scan manager of bluetooth profile connection state changes */ public void notifyProfileConnectionStateChange(int profile, int fromState, int toState) { if (mScanController != null) { mScanController.notifyProfileConnectionStateChange(profile, fromState, toState); } } class ServerDeathRecipient implements IBinder.DeathRecipient { int mAppIf; private String mPackageName; Loading android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +0 −4 Original line number Diff line number Diff line Loading @@ -2036,7 +2036,6 @@ public class LeAudioService extends ProfileService { } mAdapterService .getBluetoothScanController() .getTransitionalScanHelper() .registerScannerInternal(this, getAttributionSource(), null); } Loading @@ -2047,12 +2046,10 @@ public class LeAudioService extends ProfileService { } mAdapterService .getBluetoothScanController() .getTransitionalScanHelper() .stopScanInternal(mScannerId); mAdapterService .getBluetoothScanController() .getTransitionalScanHelper() .unregisterScannerInternal(mScannerId); mScannerId = 0; } Loading @@ -2079,7 +2076,6 @@ public class LeAudioService extends ProfileService { mAdapterService .getBluetoothScanController() .getTransitionalScanHelper() .startScanInternal(scannerId, settings, List.of(filter)); } Loading android/app/src/com/android/bluetooth/le_scan/AppScanStats.java +6 −6 Original line number Diff line number Diff line Loading @@ -65,8 +65,8 @@ public class AppScanStats { // ScannerMap here is needed to grab Apps ScannerMap mScannerMap; // TransitionalScanHelper is needed to add scan event protos to be dumped later final TransitionalScanHelper mScanHelper; // ScanController is needed to add scan event protos to be dumped later final ScanController mScanController; // Battery stats is used to keep track of scans and result stats BatteryStatsManager mBatteryStatsManager; Loading Loading @@ -173,13 +173,13 @@ public class AppScanStats { WorkSource source, ScannerMap map, AdapterService adapterService, TransitionalScanHelper scanHelper, ScanController scanController, TimeProvider timeProvider) { mAdapterService = requireNonNull(adapterService); mTimeProvider = requireNonNull(timeProvider); mAppName = name; mScannerMap = map; mScanHelper = scanHelper; mScanController = scanController; mBatteryStatsManager = adapterService.getSystemService(BatteryStatsManager.class); if (source == null) { Loading Loading @@ -310,7 +310,7 @@ public class AppScanStats { .setEventTimeMillis(System.currentTimeMillis()) .setInitiator(truncateAppName(mAppName)) .build(); mScanHelper.addScanEvent(scanEvent); mScanController.addScanEvent(scanEvent); if (!isScanning()) { mScanStartTime = startTime; Loading Loading @@ -362,7 +362,7 @@ public class AppScanStats { .setInitiator(truncateAppName(mAppName)) .setNumberResults(scan.results) .build(); mScanHelper.addScanEvent(scanEvent); mScanController.addScanEvent(scanEvent); mTotalScanTime += scanDuration; long activeDuration = scanDuration - scan.suspendDuration; Loading android/app/src/com/android/bluetooth/le_scan/ScanController.java +1596 −34 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +3 −4 Original line number Diff line number Diff line Loading @@ -6226,10 +6226,9 @@ public class AdapterService extends Service { Log.w(TAG, "GATT Service is not running!"); return; } if (Flags.scanManagerRefactor()) { mScanController.notifyProfileConnectionStateChange(profile, fromState, toState); } else { mGattService.notifyProfileConnectionStateChange(profile, fromState, toState); ScanController controller = getBluetoothScanController(); if (controller != null) { controller.notifyProfileConnectionStateChange(profile, fromState, toState); } } Loading
android/app/src/com/android/bluetooth/gatt/GattService.java +0 −7 Original line number Diff line number Diff line Loading @@ -284,13 +284,6 @@ public class GattService extends ProfileService { return restrictedHandles != null && restrictedHandles.contains(handle); } /** Notify Scan manager of bluetooth profile connection state changes */ public void notifyProfileConnectionStateChange(int profile, int fromState, int toState) { if (mScanController != null) { mScanController.notifyProfileConnectionStateChange(profile, fromState, toState); } } class ServerDeathRecipient implements IBinder.DeathRecipient { int mAppIf; private String mPackageName; Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +0 −4 Original line number Diff line number Diff line Loading @@ -2036,7 +2036,6 @@ public class LeAudioService extends ProfileService { } mAdapterService .getBluetoothScanController() .getTransitionalScanHelper() .registerScannerInternal(this, getAttributionSource(), null); } Loading @@ -2047,12 +2046,10 @@ public class LeAudioService extends ProfileService { } mAdapterService .getBluetoothScanController() .getTransitionalScanHelper() .stopScanInternal(mScannerId); mAdapterService .getBluetoothScanController() .getTransitionalScanHelper() .unregisterScannerInternal(mScannerId); mScannerId = 0; } Loading @@ -2079,7 +2076,6 @@ public class LeAudioService extends ProfileService { mAdapterService .getBluetoothScanController() .getTransitionalScanHelper() .startScanInternal(scannerId, settings, List.of(filter)); } Loading
android/app/src/com/android/bluetooth/le_scan/AppScanStats.java +6 −6 Original line number Diff line number Diff line Loading @@ -65,8 +65,8 @@ public class AppScanStats { // ScannerMap here is needed to grab Apps ScannerMap mScannerMap; // TransitionalScanHelper is needed to add scan event protos to be dumped later final TransitionalScanHelper mScanHelper; // ScanController is needed to add scan event protos to be dumped later final ScanController mScanController; // Battery stats is used to keep track of scans and result stats BatteryStatsManager mBatteryStatsManager; Loading Loading @@ -173,13 +173,13 @@ public class AppScanStats { WorkSource source, ScannerMap map, AdapterService adapterService, TransitionalScanHelper scanHelper, ScanController scanController, TimeProvider timeProvider) { mAdapterService = requireNonNull(adapterService); mTimeProvider = requireNonNull(timeProvider); mAppName = name; mScannerMap = map; mScanHelper = scanHelper; mScanController = scanController; mBatteryStatsManager = adapterService.getSystemService(BatteryStatsManager.class); if (source == null) { Loading Loading @@ -310,7 +310,7 @@ public class AppScanStats { .setEventTimeMillis(System.currentTimeMillis()) .setInitiator(truncateAppName(mAppName)) .build(); mScanHelper.addScanEvent(scanEvent); mScanController.addScanEvent(scanEvent); if (!isScanning()) { mScanStartTime = startTime; Loading Loading @@ -362,7 +362,7 @@ public class AppScanStats { .setInitiator(truncateAppName(mAppName)) .setNumberResults(scan.results) .build(); mScanHelper.addScanEvent(scanEvent); mScanController.addScanEvent(scanEvent); mTotalScanTime += scanDuration; long activeDuration = scanDuration - scan.suspendDuration; Loading
android/app/src/com/android/bluetooth/le_scan/ScanController.java +1596 −34 File changed.Preview size limit exceeded, changes collapsed. Show changes