Skip to content

Commit

Permalink
Merge pull request #36 from MetaMask/fix/host-in-sensor-permission
Browse files Browse the repository at this point in the history
fix: host in sensor permission
  • Loading branch information
tommasini authored Jul 4, 2024
2 parents f97ca83 + b9a795e commit 2a93612
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ public void onPermissionRequest(final PermissionRequest request) {
*/
androidPermission = PermissionRequest.RESOURCE_PROTECTED_MEDIA_ID;
} }
Uri originUri = request.getOrigin();
String host = originUri.getHost();
// TODO: RESOURCE_MIDI_SYSEX, RESOURCE_PROTECTED_MEDIA_ID.
String alertMessage = String.format("Allow this app to use your " + requestPermissionIdentifier + "?");
String alertMessage = String.format("Allow " + host + " to use your " + requestPermissionIdentifier + "?");
if (androidPermission != null) {
if (ContextCompat.checkSelfPermission(this.mWebView.getThemedReactContext(), androidPermission) == PackageManager.PERMISSION_GRANTED) {
AlertDialog.Builder builder = new AlertDialog.Builder(this.mWebView.getContext());
Expand Down

0 comments on commit 2a93612

Please sign in to comment.