diff options
author | Eric Laurent <elaurent@google.com> | 2014-10-10 15:24:04 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-10-27 10:13:00 -0700 |
commit | 91377de6f23af2b0b08adae22810cae6fc35cb1a (patch) | |
tree | 48f1d4baa45bacf821ecc732fb24e9822a281180 /packages/SettingsProvider | |
parent | b32f04b785306f06d7d07b824fb8dcc1b4a61aa6 (diff) | |
download | frameworks_base-91377de6f23af2b0b08adae22810cae6fc35cb1a.zip frameworks_base-91377de6f23af2b0b08adae22810cae6fc35cb1a.tar.gz frameworks_base-91377de6f23af2b0b08adae22810cae6fc35cb1a.tar.bz2 |
audioservice: fix default stream volume
When the max stream volume is configurable by
a system property, the default stream volume should
be set accordingly.
Bug: 17507571.
Change-Id: I9d9378292fc7b9c9e32acc55a275cc0ae5b203d4
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index e56806a..eea97ea 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -568,7 +568,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)" + " VALUES(?,?);"); loadSetting(stmt, Settings.System.VOLUME_BLUETOOTH_SCO, - AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_BLUETOOTH_SCO]); + AudioService.getDefaultStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO)); db.setTransactionSuccessful(); } finally { db.endTransaction(); @@ -2169,25 +2169,25 @@ public class DatabaseHelper extends SQLiteOpenHelper { + " VALUES(?,?);"); loadSetting(stmt, Settings.System.VOLUME_MUSIC, - AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_MUSIC]); + AudioService.getDefaultStreamVolume(AudioManager.STREAM_MUSIC)); loadSetting(stmt, Settings.System.VOLUME_RING, - AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_RING]); + AudioService.getDefaultStreamVolume(AudioManager.STREAM_RING)); loadSetting(stmt, Settings.System.VOLUME_SYSTEM, - AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_SYSTEM]); + AudioService.getDefaultStreamVolume(AudioManager.STREAM_SYSTEM)); loadSetting( stmt, Settings.System.VOLUME_VOICE, - AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_VOICE_CALL]); + AudioService.getDefaultStreamVolume(AudioManager.STREAM_VOICE_CALL)); loadSetting(stmt, Settings.System.VOLUME_ALARM, - AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_ALARM]); + AudioService.getDefaultStreamVolume(AudioManager.STREAM_ALARM)); loadSetting( stmt, Settings.System.VOLUME_NOTIFICATION, - AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_NOTIFICATION]); + AudioService.getDefaultStreamVolume(AudioManager.STREAM_NOTIFICATION)); loadSetting( stmt, Settings.System.VOLUME_BLUETOOTH_SCO, - AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_BLUETOOTH_SCO]); + AudioService.getDefaultStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO)); // By default: // - ringtones, notification, system and music streams are affected by ringer mode |