Relax threading restrictions
VolumeControlAndroid should be allowed to perform these operations. See internal bug #15 for details. Bug: internal b/174680080 Test: on device Change-Id: I654c8c33c5991894cd44ba2bedfa08f2f1eb7288 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2572131 Reviewed-by: Kenneth MacKay <kmackay@chromium.org> Commit-Queue: Andrei Pascovici <apascovici@chromium.org> Cr-Commit-Position: refs/heads/master@{#833734}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
86b11bed1f
commit
3660900696
@ -133,7 +133,8 @@ void VolumeControlAndroid::OnVolumeChange(
|
||||
thread_.task_runner()->PostTask(
|
||||
FROM_HERE,
|
||||
base::BindOnce(&VolumeControlAndroid::ReportVolumeChangeOnThread,
|
||||
base::Unretained(this), (AudioContentType)type, level));
|
||||
base::Unretained(this),
|
||||
static_cast<AudioContentType>(type), level));
|
||||
}
|
||||
|
||||
void VolumeControlAndroid::OnMuteChange(
|
||||
@ -142,9 +143,9 @@ void VolumeControlAndroid::OnMuteChange(
|
||||
jint type,
|
||||
jboolean muted) {
|
||||
thread_.task_runner()->PostTask(
|
||||
FROM_HERE,
|
||||
base::BindOnce(&VolumeControlAndroid::ReportMuteChangeOnThread,
|
||||
base::Unretained(this), (AudioContentType)type, muted));
|
||||
FROM_HERE, base::BindOnce(&VolumeControlAndroid::ReportMuteChangeOnThread,
|
||||
base::Unretained(this),
|
||||
static_cast<AudioContentType>(type), muted));
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_VOLUME_TABLES_ACCESS)
|
||||
@ -335,7 +336,7 @@ float VolumeControlAndroid::DbFSToVolumeCached(AudioContentType type,
|
||||
|
||||
// static
|
||||
void VolumeControl::Initialize(const std::vector<std::string>& argv) {
|
||||
// Nothing to do.
|
||||
GetVolumeControl();
|
||||
}
|
||||
|
||||
// static
|
||||
|
Reference in New Issue
Block a user