PermissionRequest

This class defines a permission request and is used when web content
requests access to protected resources. The permission request related events
are delivered via onPermissionRequest(PermissionRequest) and
onPermissionRequestCanceled(PermissionRequest).
Either grant() or deny() must be called in UI
thread to respond to the request.
New protected resources whose names are not defined here may be requested in
future versions of WebView, even when running on an older Android release. To
avoid unintentionally granting requests for new permissions, you should pass the
specific permissions you intend to grant to grant(),
and avoid writing code like this example:

permissionRequest.grant(permissionRequest.getResources()) // This is wrong!!!

See the WebView's release notes for information about new protected resources.

Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.

RESOURCE_MIDI_SYSEX

Resource will allow sysex messages to be sent to or received from MIDI devices. These
messages are privileged operations, e.g. modifying sound libraries and sampling data, or
even updating the MIDI device's firmware.
Permission may be requested for this resource in API levels 21 and above, if the Android
device has been updated to WebView 45 or above.

grant

Call this method to grant origin the permission to access the given resources.
The granted permission is only valid for this WebView.

Parameters

resources

String: the resources granted to be accessed by origin, to grant
request, the requested resources returned by getResources()
must be equals or a subset of granted resources.
This parameter is designed to avoid granting permission by accident
especially when new resources are requested by web content.