-
Notifications
You must be signed in to change notification settings - Fork 781
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
Conversation
3afdf3e
to
c4acc2d
Compare
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 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() |
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.
Nit: you could use .orEmpty()
instead of ?: emptyArray()
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 see in the doc that In Android 11 or higher, the package name is
com.google.android.permission
and notcom.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 |
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.
Do we want to do that only on Android 13 and more?
9dbfac9
to
8dc71e0
Compare
SonarCloud Quality Gate failed. |
Fix #7224