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

Commit 10454721 authored by Liejun Tao's avatar Liejun Tao Committed by android-build-merger
Browse files

Absolute volume: Black list device if remote can\'t change volume

am: 479f86d9

* commit '479f86d9':
  Absolute volume: Black list device if remote can't change volume

Change-Id: I1dd27493c5708f4d79e4134cfb00fe17d90b85f3
parents dd1096fd 479f86d9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ public final class Avrcp {
    private static final int SKIP_DOUBLE_INTERVAL = 3000;
    private static final long MAX_MULTIPLIER_VALUE = 128L;
    private static final int CMD_TIMEOUT_DELAY = 2000;
    private static final int MAX_ERROR_RETRY_TIMES = 3;
    private static final int MAX_ERROR_RETRY_TIMES = 6;
    private static final int AVRCP_MAX_VOL = 127;
    private static final int AVRCP_BASE_VOLUME_STEP = 1;

@@ -532,6 +532,8 @@ public final class Avrcp {
                mVolCmdSetInProgress = false;
                if (mAbsVolRetryTimes >= MAX_ERROR_RETRY_TIMES) {
                    mAbsVolRetryTimes = 0;
                    /* too many volume change failures, black list the device */
                    blackListCurrentDevice();
                } else {
                    mAbsVolRetryTimes += 1;
                    if (setVolumeNative(mLastRemoteVolume)) {