summaryrefslogtreecommitdiff
path: root/PermissionController/src/com/android/permissioncontroller/permission/utils
AgeCommit message (Collapse)Author
2023-06-22Don't show Health Permissions if the app doesn't handle VIEW_PERMISSION_USAGEPyuli Naithani
Relnote: Filter invalid health permission usage apps BUG:273946678 Test: atest HealthConnectAppPermissionFragmentTest Test: atest HealthConnectAllAppPermissionFragmentTest Change-Id: I6892177329471591ee3cfb67ce570453e6baf231
2023-06-13Rename SafetyCenterResourcesContext to SafetyCenterResourcesApk.Elliot Sisteron
It's not really a Context anymore. Bug: 283100177 Test: atest CtsSafetyCenterTestCases Relnote: N/A Change-Id: Iab9d28440f10c02a5e1a90fd0fbb95c53ab6b383
2023-05-09Allow granting READ_SMS if managed sub policy setAyush Sharma
We would only allow admin to grant READ_SMS permission when managed subscriptions policy is set, this is to ensure that admin could archive work related messages sent/received via an app in work profile but can not otherwise grant this permission to access personal messages sent via an app in personal profile. Bug: 279559169 Test: atest android.devicepolicy.cts.PermissionGrantTest Change-Id: I364643c7f304393045e3f64ecd29d75f8a822d26
2023-04-24Update text and icon of privacy source notificationsNate Myren
This brings the privacy source UX in line with the new spec. Also updatest the Safety Label Change notification to match Fixes: 275734262 Fixes: 279214752 Test: atest NotificationListenerCheckTest, LocationAccessCheckTest Change-Id: I60508d2401025bdda076a145d439b10105baa3d3
2023-04-14[Safety Labels] Filter out auto, wear and tvJay Thomas Sullivan
This feature should never be enabled on these form factors. Bug: 277601279 Test: atest CtsPermission3TestCases:SafetyLabelChangesJobServiceTest Test: atest CtsPermission3TestCases:AppDataSharingUpdatesTest Test: atest PermissionControllerMockingTests Change-Id: I3eb08e53e8f28028ace4e247005f8f07ece713da
2023-04-14Merge "[Safety Labels] Change safety label feature flags to be default on" ↵Karishma Vakil
into udc-dev
2023-04-13[Safety Labels] Change safety label feature flags to be default onKarishma Vakil
Bug: 245922571 Bug: 261249312 Test: atest CtsPermission3TestCases Change-Id: Id7cf367be4687a1e6e43dfc3ab76cca1ac5df02c
2023-04-12Merge "Refactor TV SafetyNetLogger" into udc-devYi-an Chen
2023-04-12Merge "PC: Remove unused getSLChangesJobDelay" into udc-devAhaan Ugale
2023-04-12Refactor TV SafetyNetLoggerYi-an Chen
Bug: 274702991 For R coverage calculation: This CL is expected to remove 43 lines from calculations Test: Build Change-Id: I17001c470a76ee53762f9e04ef28daf88b658ac8
2023-04-11Merge "Remove unused util function for U+" into udc-devFaye Yan
2023-04-11Merge "Add CollectionUtilsTest" into udc-devYi-an Chen
2023-04-11Merge "Revert "Introduced granular skin temperature permissions"" into udc-devNagesh Pachorkar
2023-04-11Remove unused util function for U+fayey
Test: Presubmit Bug: 274702991 Change-Id: Idcc2e30e79e691488e16b00c80c146a3e1d79bd9
2023-04-11Add CollectionUtilsTestYi-an Chen
Bug: 274702991 For R coverage calculation: Expect to remove 5 lines and add 10 lines of coverage Test: COllectionUtilsTest Change-Id: I1a1730bd97ac867c3e8ee7fc02e539218d0b5f91
2023-04-11Merge "Add tests for PermissionMapping" into udc-devYi-an Chen
2023-04-11PC: Remove unused getSLChangesJobDelayAhaan Ugale
Bug: 274702991 Test: atest PermissionControllerInProcessTests \ PermissionControllerOutOfProcessTests PermissionControllerMockingTests \ PermissionUiTestCases Change-Id: Id876befe3bcc2a0bf9e940551c7a1f9a8baec288
2023-04-10Add tests for PermissionMappingYi-an Chen
Bug: 274702991 Notes for R coverage calculation: This change removes 16 lines and add 8 lines of coverage. Together with the 37 lines of exemption from init {} and addHealthPermissionsToPlatform, it closes 61 lines of gap. Test: PermissionMappingTest Change-Id: Ibde6cf4149481631539a8a3de4cecab86ab6338a
2023-04-07Revert "Introduced granular skin temperature permissions"Nagesh Pachorkar
Revert submission 20678628-Granular_Body_Sensor_Permissions_In_U Reason for revert: According to the WHS product decision, this permission is no more required. Bug: 274938077 Reverted changes: /q/submissionid:20678628-Granular_Body_Sensor_Permissions_In_U Change-Id: Iff1ceb3e1e30fdfc4cf10be14df0fc8434f6d235
2023-04-06Merge "Add test coverage for mainline pc module class" into udc-devFaye Yan
2023-04-06Merge "Clean up file structure for utils for coverage calculation" into udc-devYi-an Chen
2023-04-05Add test coverage for mainline pc module classfayey
com.android.permissioncontroller.permission.util.Utils 1)getGroupPermissionInfos 2)remove no longer used func Test: atest GooglePermissionControllerInProcessTests Bug: 274702991 Change-Id: Ib9dd9b275d154280a38e14a9f1b68a7dfc9a3039
2023-04-04Clean up file structure for utils for coverage calculationYi-an Chen
Bug: 275388028 We expect to remove 159 lines from the R coverage calculation Test: build Change-Id: I748c3bc9ad0a7fa7ac964775b250dad1134a2e78
2023-04-03Clear identity whe checking privacy flag for callsPyuli Naithani
from Binder transaction calls. BUG:271400574 Test: Downloaded failing app and checked. Change-Id: I37dcea5bb39981f68d99f06a33ca5b7544f07d5c
2023-03-29Hide "Introduced granular skin temperature permissions"Nagesh Pachorkar
Hiding submission 20678628-Granular_Body_Sensor_Permissions_In_U Reason for hiding: According to the WHS product decision, this permission is no more required. Bug: 274938077 Test: Presubmit CTS Hiding API changes: /q/submissionid:20678628-Granular_Body_Sensor_Permissions_In_U Change-Id: Ie5fdb360a82eb0c7f22273c1e43cb806e8817562
2023-03-24Merge "Add code to catch invalid user Context creation in LightPackageInfo" ↵Nate Myren
into udc-dev
2023-03-24Merge "Fixing Kotlin warning discrepancies between Soong and Gradle" into ↵Joe Castro
udc-dev
2023-03-24Merge "Exclude auto, wear, and tv from photo picker behavior" into udc-devNate Myren
2023-03-24Exclude auto, wear, and tv from photo picker behaviorNate Myren
They do not yet support photo picker Bug: 271385365 Test: manual Change-Id: Ibaaa2e8c165e25d38b925b02a860d63fb41ef931 Merged-In: Ibaaa2e8c165e25d38b925b02a860d63fb41ef931
2023-03-24Fixing Kotlin warning discrepancies between Soong and GradleJoe Castro
Test: atest Bug: 195346174 Change-Id: Icf1ed639ea6aa093445e1354bf6b2f03a51fec86
2023-03-24Merge "Revert "Revert "Don't unnecessarily query package metadata for ↵Joe Castro
SafetyLabels""" into udc-dev
2023-03-23Revert "Revert "Don't unnecessarily query package metadata for SafetyLabels""Joe Castro
This reverts commit dcc53073c5b079a8e3f9b975169418df832feedd. Reason for revert: CTS failure was due to underlying bug in Permissions that has been addressed. Bug: 260873483 Test: atest Change-Id: I140c31dc3fd5fd2ead4ae71cb0f28b926838538c
2023-03-23Merge "Fix SafetyProtectionUtils" into udc-devYi-an Chen
2023-03-20Add code to catch invalid user Context creation in LightPackageInfoNate Myren
This livedata is rarely failing to create a context for a particular user. Catch this in LightPackageInfoLiveData, until we better understand how this is happening. TODO(b/269429074): remove this Bug: 269429074 Test: build Change-Id: Idf4fc3184192f49d7c0a8d3c49432bb2fa62c739
2023-03-20Add permission rationale logging to grant dialogRichard MacGregor
Bug: 259953948 Test: atest PermissionRationale Test: atest PermissionRationalePermissionGrantDialogTest Test: statsd_testdrive 170 //PERMISSION_GRANT_REQUEST_RESULT_REPORTED Test: statsd_testdrive 213 //GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS Change-Id: I411a9d4503eed09889c372b7d1e55fc58672f008
2023-03-16Add a kill switch for SafetyLabelChangesJobServiceJay Thomas Sullivan
Bug: 268685095 Test: manual Change-Id: Ie05fc059078b1de102a334b2b11d931178954387 Merged-In: Ie05fc059078b1de102a334b2b11d931178954387 (cherry picked from commit 18aba8032d17d9714de6e761dbfb3e238810cebb)
2023-03-16Fix SafetyProtectionUtilsYi-an Chen
This util was expecting getString() and getDrawable() to return null when resource is not found but it's actually throwing an exception. Changed the logic in this class to expect an exception when the resource it not available Bug: 269874157 Test: SafetyProtectionTest Change-Id: I7431a54451f274b2db7a620b6433140128e98283
2023-03-15Merge "Treat AML as a "partial grant" for apps that support photo picker" ↵Nate Myren
into udc-dev
2023-03-13Removing Placeholder SafetyLabel metadata for testingJoe Castro
Bug: 257293222 Test: atest Change-Id: Ife01296d4ea262e1494c46e64373c2c6f62a1594
2023-03-10Treat AML as a "partial grant" for apps that support photo pickerNate Myren
When an app supports the photo picker permission prompt (by targeting T+ and explicitly requesting READ_MEDIA_VISUAL_USER_SELECTED), then treat the ACCESS_MEDIA_LOCATION permission as a "partial grant", given when clicking "select photos" or "allow all", and not silently expanding if READ_MEDIA_IMAGES/VIDEO are requested later Bug: 268075614 Test: atest PhotoPickerPermissionTest Change-Id: I5ba2dadeee3e6e4548c9eab2f859a0d6bd046a9d
2023-03-08[automerge] Fix allow app-op for multiple foreground permissions 2p: 89cfdfe951Presubmit Automerger Backend
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Permission/+/21898501 Fix: 272129392 Change-Id: I4d5c7340e1dd2f3db6f0ace629ddc1cac745a603 Merged-In: I48d0c387c11f5501e17c2a83019aefd85e88a47c
2023-03-08Fix allow app-op for multiple foreground permissionsManjeet Rulhania
Change-Id: I48d0c387c11f5501e17c2a83019aefd85e88a47c Relnote: N/A Fix: 272129392 Test: build (cherry picked from commit 88b206135d3341e5e78db0e878bb061ea6863627) Change-Id: I19cfec3429cb843a293aa2e1282c9a21a7570d74 Merged-In: I48d0c387c11f5501e17c2a83019aefd85e88a47c
2023-03-06[Permissions Hub Refactor] Miscellaneous bug fixesKarishma Vakil
* Add filter for profiles in current user * Fix display/update of show system / show 7 day toggles * Update list of app permissions on every live data update * Add support for ops not backing permissions * Remove refresh button as page self-updates now Bug: 262250540 Bug: 262250003 Bug: 260468690 Bug: 260389143 Bug: 260471388 Bug: 262260897 Test: atest CtsPermission3TestCases:PermissionHistoryTest Change-Id: I78d6e929df3fd999ba515f13ac77353bd3963833
2023-03-02Set RMI/V appops, change ux specs of more photos dialogNate Myren
When performing the "withoutappops" grant, explicitly disallow the appop. Also brings the dialog into UX spec. Fixes: 267445531 Bug: 270706359 Test: atest PhotoPickerPermissionTest Change-Id: Ie4ce9c32d2969995e76eabbbb3fecd518d460bc7
2023-03-01Adjust Photo Picker button placement and textNate Myren
Put the "All photos" button below the other buttons. After the user selects photos, change text to be "more photos". For apps that don't support photo picker, grant USER_SELECTED first, then apply state to READ_MEDIA_IMAGES/VIDEO. When clicking "don't allow more", no longer revokes USER_SELECTED. If the user tries to revoke in settings while in the false grant state, this now works properly. Bug: 270705891 Bug: 268050719 Bug: 270700724 Fixes: 270700735 Test: atest PhotoPickerPermissionTest Change-Id: If48cc096a0fcf51c0e884151cf8c59747403c69f Merged-In: If48cc096a0fcf51c0e884151cf8c59747403c69f
2023-02-28Fixing compiler warnings for PermissionController projectJoe Castro
Test: atest Bug: 195346174 Change-Id: Ic1c1098dab6aed52695c31dc6632c38f8e2b0caf Merged-In: Ic1c1098dab6aed52695c31dc6632c38f8e2b0caf
2023-02-22Revert "Don't unnecessarily query package metadata for SafetyLabels"Adam Wright
This reverts commit dba921871424ac9913344419c7307593522e62b3. Reason for revert: DM P0 breakage (b/270255253) Change-Id: Ibf50d32e2d0cb4cc8e25ff604ecd8d92c97a56dc
2023-02-18Don't unnecessarily query package metadata for SafetyLabelsJoe Castro
Only querying metadata for packages in SafetyLabel display when we know that the package has permissions that should include safety labels. Right now that is limited to LOCATION permissions. As part of this, I consolidated some of the utilities and made it so there is less branching and less need to check in multiple places whether the feature is enabled. Bug: 260873483 Test: atest Change-Id: I30efd202985fecb95eb919952deaf555d289fc0e
2023-02-15Merge "Added Exemption Check for OP_SYSTEM_EXEMPT_FROM_HIBERNATION"Alex Johnston
2023-02-15Merge "[Safety Labels] Decouple safety label changes from permission rationale"Jay Sullivan