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

Commit d7f81d32 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Print the runtime blacklisted devices for AVRCP absolute volume control

The AVRCP runtime blacklisted devices for absolute volume control
are printed in the bluetooth_manager dumpsys section:

AVRCP:
  ...
  Runtime Blacklisted Devices (absolute volume):
    XX:XX:XX:XX:XX:XX
    YY:YY:YY:YY:YY:YY

If there are no blacklisted devices, then:
  ...
  Runtime Blacklisted Devices (absolute volume):
    None

Bug: 63480852
Test: Manual
Change-Id: I01242b681c81b802ce44719a304b525292eaeb01
parent 31f04fc1
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -2374,6 +2374,20 @@ public final class Avrcp {
                ProfileService.println(sb, "  " + log);
            }
        }

        // Print the blacklisted devices (for absolute volume control)
        SharedPreferences pref =
                mContext.getSharedPreferences(ABSOLUTE_VOLUME_BLACKLIST, Context.MODE_PRIVATE);
        Map<String, ?> allKeys = pref.getAll();
        ProfileService.println(sb, "");
        ProfileService.println(sb, "Runtime Blacklisted Devices (absolute volume):");
        if (allKeys.isEmpty()) {
            ProfileService.println(sb, "  None");
        } else {
            for (String key : allKeys.keySet()) {
                ProfileService.println(sb, "  " + key);
            }
        }
    }

    public class AvrcpBrowseManager {