Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24bf20f0 authored by Haijie Hong's avatar Haijie Hong
Browse files

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
parent 83f934b5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -334,12 +334,14 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
        // Only provide PBAP cabability if the client device has requested PBAP.
        if (pbapPermission != BluetoothDevice.ACCESS_UNKNOWN) {
            final PbapServerProfile psp = mManager.getProfileManager().getPbapProfile();
            if (psp != null) {
                result.add(psp);
            }
        }

        final MapProfile mapProfile = mManager.getProfileManager().getMapProfile();
        final int mapPermission = device.getMessageAccessPermission();
        if (mapPermission != BluetoothDevice.ACCESS_UNKNOWN) {
        if (mapPermission != BluetoothDevice.ACCESS_UNKNOWN && mapProfile != null) {
            result.add(mapProfile);
        }