-
Notifications
You must be signed in to change notification settings - Fork 871
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
Update foregroundServiceType to systemExempted for VPN #25244
Conversation
@@ -181,7 +181,7 @@ | |||
|
|||
<service | |||
android:name="org.chromium.chrome.browser.vpn.wireguard.WireguardService" | |||
android:foregroundServiceType="dataSync" | |||
android:foregroundServiceType="systemExempted" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,2 @@ | |||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" /> | |||
<uses-permission android:name="android.permission.USE_EXACT_ALARM"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the description, it says :
Reserved for system applications and specific system integrations, to continue to use foreground services.
To use this type, an app must meet **at least one of** the following criteria:
Which includes VPN apps. but
i had to add above permission because of
Error: foregroundServiceType:systemExempted requires permission:[android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED] AND any permission in list:[android.permission.SCHEDULE_EXACT_ALARM, android.permission.USE_EXACT_ALARM] [ForegroundServicePermission] <service android:name="org.chromium.chrome.browser.vpn.wireguard.WireguardService" android:foregroundServiceType="systemExempted" android:exported="false">
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use https://developer.android.com/about/versions/14/changes/fgs-types-required#special-use. In that case, we need to explain and it may delay the release as reviewers would be manually checking the details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's really strange though that is requires some ALARM permission.
@deeppandya we need to open a security review as there are new permissions added. |
Yes creating now. |
Otherwise it looks good to me and it seems that the new service type is the one that Google suggests to use for VPN apps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
I have also verified the same service type with protonvpn and wireguard. |
@deeppandya do they have any ALARM permission as well? |
I looked for the same in their repo but I couldn't find anything related to alarm. But for us, it was giving an error as I mentioned in previous comment. We can use specialUse in this case but need to provide more details. |
it might be because they are still using api 34 which is android 14. here : https://github.com/ProtonVPN/android-app/blob/fc9e7f500fe56bacfb2bf5247611fc6f5c082f69/app/build.gradle#L141C24-L141C30 |
Resolves brave/brave-browser#40571
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: