Loading service/src/com/android/server/bluetooth/BluetoothManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -659,7 +659,7 @@ class BluetoothManagerService { filter.addAction(Intent.ACTION_SETTING_RESTORED); filter.addAction(Intent.ACTION_SHUTDOWN); filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY); mContext.registerReceiver(mReceiver, filter); mContext.registerReceiver(mReceiver, filter, null, mHandler); IntentFilter filterUser = new IntentFilter(); filterUser.addAction(UserManager.ACTION_USER_RESTRICTIONS_CHANGED); Loading Loading @@ -688,7 +688,7 @@ class BluetoothManagerService { }, filterUser, null, null); mHandler); loadStoredNameAndAddress(); if (isBluetoothPersistedStateOn()) { Loading service/tests/src/com/android/server/bluetooth/BluetoothManagerServiceTest.java +4 −7 Original line number Diff line number Diff line Loading @@ -95,13 +95,12 @@ public class BluetoothManagerServiceTest { TestLooper mLooper; boolean mHasException = false; static { // Required for reading DeviceConfig. InstrumentationRegistry.getInstrumentation() .getUiAutomation() .adoptShellPermissionIdentity(android.Manifest.permission.READ_DEVICE_CONFIG); .adoptShellPermissionIdentity( android.Manifest.permission.INTERACT_ACROSS_USERS_FULL); } @Before Loading Loading @@ -168,10 +167,8 @@ public class BluetoothManagerServiceTest { mManagerService = null; } mLooper.moveTimeForward(120_000); // 120 seconds // Do not try to assert if `syncHandler()` already raised an exception for it if (!mHasException) { assertThat(mLooper.nextMessage()).isNull(); } validateMockitoUsage(); } Loading Loading
service/src/com/android/server/bluetooth/BluetoothManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -659,7 +659,7 @@ class BluetoothManagerService { filter.addAction(Intent.ACTION_SETTING_RESTORED); filter.addAction(Intent.ACTION_SHUTDOWN); filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY); mContext.registerReceiver(mReceiver, filter); mContext.registerReceiver(mReceiver, filter, null, mHandler); IntentFilter filterUser = new IntentFilter(); filterUser.addAction(UserManager.ACTION_USER_RESTRICTIONS_CHANGED); Loading Loading @@ -688,7 +688,7 @@ class BluetoothManagerService { }, filterUser, null, null); mHandler); loadStoredNameAndAddress(); if (isBluetoothPersistedStateOn()) { Loading
service/tests/src/com/android/server/bluetooth/BluetoothManagerServiceTest.java +4 −7 Original line number Diff line number Diff line Loading @@ -95,13 +95,12 @@ public class BluetoothManagerServiceTest { TestLooper mLooper; boolean mHasException = false; static { // Required for reading DeviceConfig. InstrumentationRegistry.getInstrumentation() .getUiAutomation() .adoptShellPermissionIdentity(android.Manifest.permission.READ_DEVICE_CONFIG); .adoptShellPermissionIdentity( android.Manifest.permission.INTERACT_ACROSS_USERS_FULL); } @Before Loading Loading @@ -168,10 +167,8 @@ public class BluetoothManagerServiceTest { mManagerService = null; } mLooper.moveTimeForward(120_000); // 120 seconds // Do not try to assert if `syncHandler()` already raised an exception for it if (!mHasException) { assertThat(mLooper.nextMessage()).isNull(); } validateMockitoUsage(); } Loading