Commit 2f734e25 authored by Armando Miraglia's avatar Armando Miraglia Committed by Commit Bot

[Enumerate Devices] Disable EnumerateDevicesHideDeviceIDs on Android.

It was noted that in the case of WebView the labels are not shown even
though the permission to access the devices were granted. After further
inspection, crrev.com/c/1964495 exposed an issue in permission checking
in the case of WebViews.

To give us time to look into the issue further and fix the actual
permission checking for WebViews, this CL disables by default the behavior
change of enumerateDevices on Android.

Bug: 1055770
Change-Id: I9dc557fed9961cf90794c87c4da4fa12213793f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078547
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745581}
parent 02bfd845
......@@ -16,6 +16,7 @@
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "content/browser/media/media_devices_permission_checker.h"
#include "content/browser/renderer_host/media/in_process_video_capture_provider.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
......@@ -281,8 +282,12 @@ class MediaDevicesDispatcherHostTest
enumerated_devices_[blink::MEDIA_DEVICE_TYPE_AUDIO_OUTPUT].empty());
EXPECT_FALSE(DoesContainRawIds(enumerated_devices_));
#if defined(OS_ANDROID)
EXPECT_TRUE(DoesEveryDeviceMapToRawId(enumerated_devices_, origin_));
#else
EXPECT_EQ(DoesEveryDeviceMapToRawId(enumerated_devices_, origin_),
permission_override_value);
#endif
}
bool DoesContainRawIds(
......
......@@ -170,7 +170,13 @@ const base::Feature kDocumentPolicy{"DocumentPolicy",
// device IDs will not be available.
// TODO(crbug.com/1019176): remove the feature in M82.
const base::Feature kEnumerateDevicesHideDeviceIDs{
"EnumerateDevicesHideDeviceIDs", base::FEATURE_ENABLED_BY_DEFAULT};
"EnumerateDevicesHideDeviceIDs",
#if defined(OS_ANDROID)
base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_ENABLED_BY_DEFAULT
#endif
};
// When a screen reader is detected, allow users the option of letting
// Google provide descriptions for unlabeled images.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment