2nd attempt handle BT is not supported on emulator am: 59287d40d1

am: de3d9a0a73

Change-Id: I27c16d76f25480a36b5b73cdcb3042cee7754a5f
This commit is contained in:
ryanywlin
2018-06-08 11:33:53 -07:00
committed by android-build-merger
2 changed files with 10 additions and 0 deletions

View File

@@ -170,12 +170,20 @@ public abstract class AudioSwitchPreferenceController extends BasePreferenceCont
@Override
public void onStart() {
if (mLocalBluetoothManager == null) {
Log.e(TAG, "Bluetooth is not supported on this device");
return;
}
mLocalBluetoothManager.setForegroundActivity(mContext);
register();
}
@Override
public void onStop() {
if (mLocalBluetoothManager == null) {
Log.e(TAG, "Bluetooth is not supported on this device");
return;
}
mLocalBluetoothManager.setForegroundActivity(null);
unregister();
}