Skip to content

Add Activities of android permission controller in the whitelist #7225

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

Merged
merged 3 commits into from
Oct 4, 2022

Conversation

yostyle
Copy link
Contributor

@yostyle yostyle commented Sep 23, 2022

Fix #7224

@yostyle yostyle force-pushed the yostyle/fix_strandhogg_detection branch from 3afdf3e to c4acc2d Compare September 23, 2022 15:46
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see in the doc that In Android 11 or higher, the package name is com.google.android.permission and not com.google.android.permissioncontroller.

Can you confirm this?


activitiesInfo += tryOrNull {
packageManager.getPackageInfo("com.google.android.permissioncontroller", PackageManager.GET_ACTIVITIES).activities
} ?: emptyArray()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: you could use .orEmpty() instead of ?: emptyArray()

Copy link
Contributor Author

@yostyle yostyle Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see in the doc that In Android 11 or higher, the package name is com.google.android.permission and not com.google.android.permissioncontroller.

Can you confirm this?

Yes I read this too. However my emulator and my pixel 6A are both on Android 13 and the package name is com.google.android.permissioncontroller. I suggest adding both (com.google.android.permission and com.google.android.permissioncontroller). Are you ok ?

if (activitiesInfo.isEmpty()) {
activitiesInfo = packageManager.getPackageInfo(context.packageName, PackageManager.GET_ACTIVITIES).activities

activitiesInfo += tryOrNull {
packageManager.getPackageInfo("com.google.android.permissioncontroller", PackageManager.GET_ACTIVITIES).activities
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to do that only on Android 13 and more?

@yostyle yostyle force-pushed the yostyle/fix_strandhogg_detection branch from 9dbfac9 to 8dc71e0 Compare September 26, 2022 22:25
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@yostyle yostyle merged commit ef82cc6 into develop Oct 4, 2022
@yostyle yostyle deleted the yostyle/fix_strandhogg_detection branch October 4, 2022 09:51
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

Successfully merging this pull request may close these issues.

Crash - App restarts in a loop
3 participants