Loading src/com/android/settings/sound/AudioSwitchPreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,6 @@ public abstract class AudioSwitchPreferenceController extends BasePreferenceCont Log.e(TAG, "Bluetooth is not supported on this device"); return; } mLocalBluetoothManager.setForegroundActivity(mContext); mProfileManager = mLocalBluetoothManager.getProfileManager(); } Loading Loading @@ -171,11 +170,13 @@ public abstract class AudioSwitchPreferenceController extends BasePreferenceCont @Override public void onStart() { mLocalBluetoothManager.setForegroundActivity(mContext); register(); } @Override public void onStop() { mLocalBluetoothManager.setForegroundActivity(null); unregister(); } Loading tests/robotests/src/com/android/settings/sound/AudioOutputSwitchPreferenceControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ public class AudioOutputSwitchPreferenceControllerTest { verify(mLocalBluetoothManager.getEventManager()).registerCallback( any(BluetoothCallback.class)); verify(mContext).registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class)); verify(mLocalBluetoothManager).setForegroundActivity(mContext); } @Test Loading @@ -240,6 +241,7 @@ public class AudioOutputSwitchPreferenceControllerTest { verify(mLocalBluetoothManager.getEventManager()).unregisterCallback( any(BluetoothCallback.class)); verify(mContext).unregisterReceiver(any(BroadcastReceiver.class)); verify(mLocalBluetoothManager).setForegroundActivity(null); } @Test Loading Loading
src/com/android/settings/sound/AudioSwitchPreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,6 @@ public abstract class AudioSwitchPreferenceController extends BasePreferenceCont Log.e(TAG, "Bluetooth is not supported on this device"); return; } mLocalBluetoothManager.setForegroundActivity(mContext); mProfileManager = mLocalBluetoothManager.getProfileManager(); } Loading Loading @@ -171,11 +170,13 @@ public abstract class AudioSwitchPreferenceController extends BasePreferenceCont @Override public void onStart() { mLocalBluetoothManager.setForegroundActivity(mContext); register(); } @Override public void onStop() { mLocalBluetoothManager.setForegroundActivity(null); unregister(); } Loading
tests/robotests/src/com/android/settings/sound/AudioOutputSwitchPreferenceControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ public class AudioOutputSwitchPreferenceControllerTest { verify(mLocalBluetoothManager.getEventManager()).registerCallback( any(BluetoothCallback.class)); verify(mContext).registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class)); verify(mLocalBluetoothManager).setForegroundActivity(mContext); } @Test Loading @@ -240,6 +241,7 @@ public class AudioOutputSwitchPreferenceControllerTest { verify(mLocalBluetoothManager.getEventManager()).unregisterCallback( any(BluetoothCallback.class)); verify(mContext).unregisterReceiver(any(BroadcastReceiver.class)); verify(mLocalBluetoothManager).setForegroundActivity(null); } @Test Loading