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

Commit 11c6822c authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/26497449'] into 24Q3-release.

Change-Id: Ic7a6f767f4108b190d4a50b9bf5af647ab362716
parents 347ad637 1f388167
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -163,6 +163,6 @@ constructor(
    }

    companion object {
        const val KEY_UP_TIMEOUT = 60L
        const val KEY_UP_TIMEOUT = 100L
    }
}
+4 −15
Original line number Diff line number Diff line
@@ -2082,9 +2082,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
                } else {
                    row.anim.cancel();
                    row.anim.setIntValues(progress, newProgress);
                    // The animator can't keep up with the volume changes so haptics need to be
                    // triggered here. This happens when the volume keys are continuously pressed.
                    row.deliverOnProgressChangedHaptics(false, newProgress);
                }
                row.animTargetProgress = newProgress;
                row.anim.setDuration(UPDATE_ANIMATION_DURATION);
@@ -2489,10 +2486,10 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
            if (getActiveRow().equals(mRow)
                    && mRow.slider.getVisibility() == VISIBLE
                    && mRow.mHapticPlugin != null) {
                if (fromUser || mRow.animTargetProgress == progress) {
                    // Deliver user-generated slider changes immediately, or when the animation
                    // completes
                    mRow.deliverOnProgressChangedHaptics(fromUser, progress);
                mRow.mHapticPlugin.onProgressChanged(seekBar, progress, fromUser);
                if (!fromUser) {
                    // Consider a change from program as the volume key being continuously pressed
                    mRow.mHapticPlugin.onKeyDown();
                }
            }
            if (D.BUG) Log.d(TAG, AudioSystem.streamToString(mRow.stream)
@@ -2645,14 +2642,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
        void removeHaptics() {
            slider.setOnTouchListener(null);
        }

        void deliverOnProgressChangedHaptics(boolean fromUser, int progress) {
            mHapticPlugin.onProgressChanged(slider, progress, fromUser);
            if (!fromUser) {
                // Consider a change from program as the volume key being continuously pressed
                mHapticPlugin.onKeyDown();
            }
        }
    }

    /**