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

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

Merge "Safely clean up the cover art manager" into rvc-dev am: d17e3747 am:...

Merge "Safely clean up the cover art manager" into rvc-dev am: d17e3747 am: 7bd6c2be am: 9a32e36b

Change-Id: I3cfc5436a4141de12a4224592f93586e84faab06
parents 03697f71 9a32e36b
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public class AvrcpControllerService extends ProfileService {
    protected Map<BluetoothDevice, AvrcpControllerStateMachine> mDeviceStateMap =
            new ConcurrentHashMap<>(1);

    private boolean mCoverArtEnabled;
    private boolean mCoverArtEnabled = false;
    protected AvrcpCoverArtManager mCoverArtManager;

    private class ImageDownloadCallback implements AvrcpCoverArtManager.Callback {
@@ -127,7 +127,7 @@ public class AvrcpControllerService extends ProfileService {
    }

    @Override
    protected boolean start() {
    protected synchronized boolean start() {
        initNative();
        mCoverArtEnabled = getResources().getBoolean(R.bool.avrcp_controller_enable_cover_art);
        if (mCoverArtEnabled) {
@@ -143,7 +143,7 @@ public class AvrcpControllerService extends ProfileService {
    }

    @Override
    protected boolean stop() {
    protected synchronized boolean stop() {
        Intent stopIntent = new Intent(this, BluetoothMediaBrowserService.class);
        stopService(stopIntent);
        for (AvrcpControllerStateMachine stateMachine : mDeviceStateMap.values()) {
@@ -152,8 +152,10 @@ public class AvrcpControllerService extends ProfileService {

        sService = null;
        sBrowseTree = null;
        if (mCoverArtManager != null) {
            mCoverArtManager.cleanup();
            mCoverArtManager = null;
        }
        return true;
    }