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

Commit 518254d0 authored by Pradeep Panigrahi's avatar Pradeep Panigrahi Committed by Gerrit - the friendly Code Review server
Browse files

MAP: Persist authorization choice for paired device on BT reset.

Retain MAP permission choice after profile refresh.
Prevent remove MAP profile permission preference for a paired device,
in case the permission has already been granted.

CRs-fixed: 800455

Change-Id: Ia96141353b0ac76cb91339ae8add5fc5f635cd47
parent 85ea2939
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -333,6 +333,12 @@ public final class DeviceProfilesSettings extends SettingsPreferenceFragment
                    if (pbapPermission != CachedBluetoothDevice.ACCESS_UNKNOWN)
                        continue;
                }
                if (profile instanceof MapProfile) {
                    final int mapPermission = mCachedDevice.getMessagePermissionChoice();
                    Log.d(TAG, "refreshProfiles: mapPermission = " + mapPermission);
                    if (mapPermission != CachedBluetoothDevice.ACCESS_UNKNOWN)
                        continue;
                }
                Log.d(TAG, "Removing " + profile.toString() + " from profile list");
                mProfileContainer.removePreference(profilePref);
            }