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

Commit 718d25f8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114)...

Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master" into stage-aosp-master
parents c41d9e25 457aa2e3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -201,10 +201,11 @@ public class AsyncRingtonePlayer {
                // can know whether to trigger the vibrator.
                if (mHapticsFuture != null && !mHapticsFuture.isDone()) {
                    boolean hasHaptics = factory.hasHapticChannels(mRingtone);

                    Log.i(this, "handlePlay: hasHaptics=%b, isVibrationEnabled=%b", hasHaptics,
                            isVibrationEnabled);
                    if (hasHaptics) {
                    SystemSettingsUtil systemSettingsUtil = new SystemSettingsUtil();
                    if (hasHaptics && (volumeShaperConfig == null
                            || systemSettingsUtil.enableAudioCoupledVibrationForRampingRinger())) {
                        AudioAttributes attributes = mRingtone.getAudioAttributes();
                        Log.d(this, "handlePlay: %s haptic channel",
                                (isVibrationEnabled ? "unmuting" : "muting"));
+6 −1
Original line number Diff line number Diff line
@@ -346,6 +346,12 @@ public class Ringer {
                            isUsingAudioCoupledHaptics, mIsHapticPlaybackSupportedByDevice);
                    maybeStartVibration(foregroundCall, shouldRingForContact, effect,
                            isVibratorEnabled, isRingerAudible);
                } else if (mSystemSettingsUtil.applyRampingRinger(mContext)
                           && mSystemSettingsUtil.enableRampingRingerFromDeviceConfig()
                           && !mSystemSettingsUtil.enableAudioCoupledVibrationForRampingRinger()) {
                    Log.i(this, "startRinging: apply ramping ringer vibration");
                    maybeStartVibration(foregroundCall, shouldRingForContact, effect,
                            isVibratorEnabled, isRingerAudible);
                } else {
                    Log.addEvent(foregroundCall, LogUtils.Events.SKIP_VIBRATION,
                            "using audio-coupled haptics");
@@ -368,7 +374,6 @@ public class Ringer {

    private void maybeStartVibration(Call foregroundCall, boolean shouldRingForContact,
        VibrationEffect effect, boolean isVibrationEnabled, boolean isRingerAudible) {

        if (isVibrationEnabled
                && !mIsVibrating && shouldRingForContact) {
            if (mSystemSettingsUtil.applyRampingRinger(mContext)