stride3d / stride

Stride Game Engine (formerly Xenko)
https://stride3d.net
MIT License
6.49k stars 941 forks source link

Update StrideActivity.cs #2351

Open Rif009 opened 3 months ago

Rif009 commented 3 months ago

PR Details

🐞 Bug Fixes

Related Issue

https://github.com/stride3d/stride/issues/2349

Types of changes

Checklist

Rif009 commented 3 months ago

@Rif009 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

MeharDT commented 3 months ago

Nice work! I think this is a useful workaround but it might be best to keep the PR open and eventually work in the updated Silk.NET binaries as they contain fixes for this and other Android bugs,

https://github.com/dotnet/Silk.NET/issues/2232

Basewq commented 3 months ago

I suspect this might only require a NotExported flag rather than a Exported flag. As per google's docs: https://developer.android.com/develop/background-work/background-tasks/broadcasts#java

If you flag your receiver with RECEIVER_NOT_EXPORTED, the receiver is able to receive some system broadcasts and broadcasts from your app, but not broadcasts from the highly privileged apps.

I think AudioManager does not fall under 'highly privileged apps', but will definitely test to see if this is the case.