settings: Fix more NPEs when bluetooth is missing.
Fix a couple NPEs in the settings app when device doesn't support bluetooth. BUG:27600761 Change-Id: I356f5e7f321e8230f85ec74da9e405449431846b
This commit is contained in:
@@ -454,6 +454,9 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
|
||||
return STATE_UNKNOWN; // On emulator?
|
||||
}
|
||||
sLocalBluetoothAdapter = manager.getBluetoothAdapter();
|
||||
if (sLocalBluetoothAdapter == null) {
|
||||
return STATE_UNKNOWN; // On emulator?
|
||||
}
|
||||
}
|
||||
return bluetoothStateToFiveState(sLocalBluetoothAdapter.getBluetoothState());
|
||||
}
|
||||
|
Reference in New Issue
Block a user