Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable motion sensors by default without patching #319

Closed
Madis0 opened this issue Jun 11, 2019 · 6 comments
Closed

Disable motion sensors by default without patching #319

Madis0 opened this issue Jun 11, 2019 · 6 comments

Comments

@Madis0
Copy link
Contributor

Madis0 commented Jun 11, 2019

Is your feature request related to privacy?
Yes

Is there a patch available for this feature somewhere?
No

Describe the solution you'd like
Chromium 75 has a new option on Site Settings, called "Motion sensors". I think Bromite should disable it by default and remove any patches that attempt to do a similar thing, in order to simplify the maintainability and UX (users can toggle it) of Bromite.

Describe alternatives you've considered
N/A

@thestinger
Copy link

The default can be changed in components/content_settings/core/browser/content_settings_registry.cc:

https://github.com/GrapheneOS/chromium_patches/blob/1c44ecb36b904f7ab4ce3db2dae323d671cfb9e8/0020-disable-sensors-access-site-setting-by-default.patch

@thestinger
Copy link

I think it's also intended to be more than just a site setting now, but rather a proper permission that sites are able to request when it's disabled. Existing sites don't know how to request it, but eventually they should learn how to do it and users won't need to ever globally enable it. I haven't looked too closely into it yet, but that's why it's a content setting with support for a per-site value, similar to location, notifications, JavaScript, etc.

@csagan5
Copy link
Contributor

csagan5 commented Jun 18, 2019

@thestinger would you say that your patch can now replace this one?
https://github.com/bromite/bromite/blob/master/build/patches/Disable-generic-sensor-API-by-default.patch

The one about motion and orientation APIs will be kept instead, as there is no upstream setting for it:
https://github.com/bromite/bromite/blob/master/build/patches/Add-flags-to-disable-device-motion-and-orientation-APIs.patch

@thestinger
Copy link

@csagan5 Yes, it covers the generic sensors and extra generic sensors.

@csagan5
Copy link
Contributor

csagan5 commented Jun 24, 2019

@Madis0 you were probably referring to the device motion and orientation (https://github.com/bromite/bromite/blob/master/build/patches/Add-flags-to-disable-device-motion-and-orientation-APIs.patch) patch, however those cannot yet be controlled even with the new content settings (as far as I understood).

In 75.0.3770.109 (not yet released) the feature patch for generic sensors will be dropped and @thestinger's one for the default on content settings will be adopted instead.

@thestinger
Copy link

thestinger commented Jun 28, 2019

@csagan5

The motion sensors site setting does disable the Device Orientation API. This can be confirmed with https://timvolodine.github.io/deviceorientation-test/, https://www.audero.it/demo/device-orientation-api-demo.html and other tests.

It's still possible to use the Screen Orientation API to detect changes between portrait and landscape mode and to lock the orientation, but that's a much different feature.

I think it's likely that you don't need these extra flags anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants