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

Commit f425c419 authored by Sal Savage's avatar Sal Savage Committed by Automerger Merge Worker
Browse files

Disable browsed cover art by default am: e0700dc3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/11922315

Change-Id: I1b68bb26a4d735cb60503bb8cc507768d8969202
parents 4833c1bd e0700dc3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@
    <!-- For enabling the AVRCP Controller Cover Artwork feature -->
    <bool name="avrcp_controller_enable_cover_art">false</bool>

    <!-- For enabling browsed cover art with the AVRCP Controller Cover Artwork feature -->
    <bool name="avrcp_controller_cover_art_browsed_images">false</bool>

    <!-- For enabling the hfp client connection service -->
    <bool name="hfp_client_connection_service_enabled">false</bool>

+10 −2
Original line number Diff line number Diff line
@@ -704,9 +704,12 @@ class AvrcpControllerStateMachine extends StateMachine {
                            + " received " + folderList.size());

                    // Queue up image download if the item has an image and we don't have it yet
                    // Only do this if the feature is enabled.
                    if (shouldDownloadBrowsedImages()) {
                        for (AvrcpItem track : folderList) {
                            downloadImageIfNeeded(track);
                        }
                    }

                    // Always update the node so that the user does not wait forever
                    // for the list to populate.
@@ -974,6 +977,11 @@ class AvrcpControllerStateMachine extends StateMachine {
        return newIndex;
    }

    private boolean shouldDownloadBrowsedImages() {
        return mService.getResources()
                .getBoolean(R.bool.avrcp_controller_cover_art_browsed_images);
    }

    private void downloadImageIfNeeded(AvrcpItem track) {
        if (mCoverArtManager == null) return;
        String handle = track.getCoverArtHandle();