summaryrefslogtreecommitdiff
path: root/PermissionController/src/com/android/permissioncontroller/permission/service
diff options
context:
space:
mode:
authorJay Thomas Sullivan <jaysullivan@google.com>2023-04-10 16:41:17 -0700
committerJay Thomas Sullivan <jaysullivan@google.com>2023-04-14 16:46:38 -0700
commit0178de3aad8eeb2a45b9f7d726fb9b61d1fd99f5 (patch)
treea44b2df92d965249b9acb5b88aff6f660d47bb5f /PermissionController/src/com/android/permissioncontroller/permission/service
parent2ef665bc21858dcee0e6f39b14260e131944f734 (diff)
downloadPermission-0178de3aad8eeb2a45b9f7d726fb9b61d1fd99f5.tar.gz
[Safety Labels] Filter out auto, wear and tv
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
Diffstat (limited to 'PermissionController/src/com/android/permissioncontroller/permission/service')
-rw-r--r--PermissionController/src/com/android/permissioncontroller/permission/service/v34/SafetyLabelChangesJobService.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/PermissionController/src/com/android/permissioncontroller/permission/service/v34/SafetyLabelChangesJobService.kt b/PermissionController/src/com/android/permissioncontroller/permission/service/v34/SafetyLabelChangesJobService.kt
index 2cbc43f1f..56d6b8efa 100644
--- a/PermissionController/src/com/android/permissioncontroller/permission/service/v34/SafetyLabelChangesJobService.kt
+++ b/PermissionController/src/com/android/permissioncontroller/permission/service/v34/SafetyLabelChangesJobService.kt
@@ -104,7 +104,7 @@ class SafetyLabelChangesJobService : JobService() {
if (DEBUG) {
Log.d(LOG_TAG, "Received broadcast with intent action '${intent.action}'")
}
- if (!KotlinUtils.isSafetyLabelChangeNotificationsEnabled()) {
+ if (!KotlinUtils.isSafetyLabelChangeNotificationsEnabled(receiverContext)) {
Log.i(LOG_TAG, "onReceive: Safety label change notifications are not enabled.")
return
}
@@ -140,7 +140,7 @@ class SafetyLabelChangesJobService : JobService() {
class NotificationDeleteHandler : BroadcastReceiver() {
override fun onReceive(receiverContext: Context, intent: Intent) {
Log.d(LOG_TAG, "NotificationDeleteHandler: received broadcast")
- if (!KotlinUtils.isSafetyLabelChangeNotificationsEnabled()) {
+ if (!KotlinUtils.isSafetyLabelChangeNotificationsEnabled(receiverContext)) {
Log.i(
LOG_TAG,
"NotificationDeleteHandler: " +
@@ -167,7 +167,7 @@ class SafetyLabelChangesJobService : JobService() {
if (DEBUG) {
Log.d(LOG_TAG, "onStartJob called for job id: ${params.jobId}")
}
- if (!KotlinUtils.isSafetyLabelChangeNotificationsEnabled()) {
+ if (!KotlinUtils.isSafetyLabelChangeNotificationsEnabled(context)) {
Log.w(LOG_TAG, "Not starting job: safety label change notifications are not enabled.")
return false
}