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

Commit 6fc65dae authored by Zhou Song's avatar Zhou Song Committed by Roman Birg
Browse files

AudioService: persist volume of ring stream when ringer mode changed

-Originally, when ringer mode changed from vibrate to normal by
 adjusting volume from 0 to 1 , volume index will not be persisted.
 After device rebooted, volume of ring stream will be restored to 0
-Persist volume index when ringer mode changed

Change-Id: I75fbeaab01d80b8bcee623795f59a9e9f16b9634
parent 48686c8c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2081,6 +2081,15 @@ public class AudioService extends IAudioService.Stub {
                                entry.setValue(10);
                            }
                        }
                        // Persist volume for stream when ringer mode changed
                        final int device = getDeviceForStream(streamType);
                        sendMsg(mAudioHandler,
                            MSG_PERSIST_VOLUME,
                            SENDMSG_QUEUE,
                            device,
                            0,
                            mStreamStates[streamType],
                            PERSIST_DELAY);
                    }
                }
                mStreamStates[streamType].mute(null, false);