Don't add profiles to device details page if it's null
Change-Id: Ia79fa600c87905a6a2cbf8459910d67ffb9d22dd BUG: 341293298 Test: manually test in tablet Flag: EXEMPT minor bug fix
This commit is contained in:
@@ -334,12 +334,14 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
|
|||||||
// Only provide PBAP cabability if the client device has requested PBAP.
|
// Only provide PBAP cabability if the client device has requested PBAP.
|
||||||
if (pbapPermission != BluetoothDevice.ACCESS_UNKNOWN) {
|
if (pbapPermission != BluetoothDevice.ACCESS_UNKNOWN) {
|
||||||
final PbapServerProfile psp = mManager.getProfileManager().getPbapProfile();
|
final PbapServerProfile psp = mManager.getProfileManager().getPbapProfile();
|
||||||
result.add(psp);
|
if (psp != null) {
|
||||||
|
result.add(psp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final MapProfile mapProfile = mManager.getProfileManager().getMapProfile();
|
final MapProfile mapProfile = mManager.getProfileManager().getMapProfile();
|
||||||
final int mapPermission = device.getMessageAccessPermission();
|
final int mapPermission = device.getMessageAccessPermission();
|
||||||
if (mapPermission != BluetoothDevice.ACCESS_UNKNOWN) {
|
if (mapPermission != BluetoothDevice.ACCESS_UNKNOWN && mapProfile != null) {
|
||||||
result.add(mapProfile);
|
result.add(mapProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user