WebView: Grant sensor permission requests
Commit b6c4e590 ("Grant generic sensor permission for Android WebView") started always granting sensors permission requests in GetPermissionStatus(). However, commit 94c082d4 ("[sensors] Add sensors usage indicator") caused SensorProviderProxyImpl to query PermissionManager via RequestPermission() before making a given sensor available. The Android WebView case was overlooked, and its RequestPermission() implementation was still denying all requests for sensors. Update the policy to always-grant, and while at it make CancelPermissionRequest() not show a "not implemented" error for sensor requests, as the requests are always granted anyway. Doing so re-allows the WebView to provide device motion/orientation data to users, while SensorProviderImpl::GetSensor() still prevents other types of sensors from being accessed, just like before. Bug: 852543 Change-Id: I3bd45f955f8ff9dca67b7b9bda940590dce258f1 Reviewed-on: https://chromium-review.googlesource.com/1104417Reviewed-by:Tao Bai <michaelbai@chromium.org> Reviewed-by:
Jun Cai <juncai@chromium.org> Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#568068}
Showing
Please register or sign in to comment