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

Commit 9e0d25fb authored by Eric Laurent's avatar Eric Laurent
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

Bug: 18762217

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