bisq2 icon indicating copy to clipboard operation
bisq2 copied to clipboard

Fix request for permission to use the microphone

Open HenrikJannsen opened this issue 1 year ago • 2 comments

Users report that Bisq ask for permission to use the microphone. On MacOS there is NSMicrophoneUsageDescription entry in Info.plist file. It is not clear why that entry is in there as it is not in our source code or build system. Probably a bad default value from jPackager.

  <key>NSMicrophoneUsageDescription</key>
  <string>The application Bisq 2 is requesting access to the microphone.</string>

Not sure if it is only on Mac requested or also other OS.

Anyway there is not reason to grant permission so users should reject that faulty request.

HenrikJannsen avatar Mar 17 '24 16:03 HenrikJannsen

We use jpackage to create packages that contain the JDK, so that users don't have to install Java separately. The JDK can't know in advance what APIs a Jar is consuming and requests therefore all permission by default.

The microphone permission is hard-coded here: https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template#L36

I created a jpackage app image to modify the file but the jpackage app image creates the app bundle and there is no easy way to override the properties. At this point, It seems better to create the app bundle and runtime image ourselves to only request the permission we need.

alvasw avatar Apr 26 '24 16:04 alvasw

Maybe that approach can work? https://bugs.openjdk.org/browse/JDK-8272639?focusedId=14442630&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14442630

And https://bugs.openjdk.org/browse/JDK-8313579?focusedId=14621477&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14621477

HenrikJannsen avatar Apr 27 '24 15:04 HenrikJannsen

Fixed by using a custom Info.plist

HenrikJannsen avatar Jul 16 '24 10:07 HenrikJannsen