Update airplane mode checkbox when toggled from system bar.
Bug: 3148095 Also fix an NPE crash I saw when exiting Settings immediately after toggling the airplane mode. Change-Id: I83eb2d90e203fd56b09269cf9fa8f74a4354834f
This commit is contained in:
@@ -111,8 +111,10 @@ class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
|
||||
" newProfileState " + newProfileState);
|
||||
}
|
||||
|
||||
int newState = LocalBluetoothProfileManager.getProfileManager(mLocalManager,
|
||||
profile).convertState(newProfileState);
|
||||
final LocalBluetoothProfileManager pm =
|
||||
LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
|
||||
if (pm == null) return;
|
||||
int newState = pm.convertState(newProfileState);
|
||||
|
||||
if (newState == SettingsBtStatus.CONNECTION_STATUS_CONNECTED) {
|
||||
if (!mProfiles.contains(profile)) {
|
||||
|
Reference in New Issue
Block a user