From 1bff62ecf37910ed1be175ffeba09df4f752f48f Mon Sep 17 00:00:00 2001 From: Ashwini Oruganti Date: Fri, 23 Oct 2020 11:15:09 -0700 Subject: [PATCH] DevicePolicyManagerService: Suppress one off errorprone warnings for AndroidFrameworkPendingIntentMutability These are false positives that are just taking the flags in as an argument and passing that over to PendingIntent methods. This change should clear up the noise. Bug: 170162102 Test: Errorprone builds should no longer show these as violations Exempt-From-Owner-Approval: Trivial warning suppression Change-Id: Ida7237f60b2c8ab6dae6426d01a17fcfd67e2436 --- .../android/server/devicepolicy/DevicePolicyManagerService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index e8f12767d5c6a..ddda392ea9519 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -1231,12 +1231,14 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { return "/data/system/"; } + @SuppressWarnings("AndroidFrameworkPendingIntentMutability") PendingIntent pendingIntentGetActivityAsUser(Context context, int requestCode, @NonNull Intent intent, int flags, Bundle options, UserHandle user) { return PendingIntent.getActivityAsUser( context, requestCode, intent, flags, options, user); } + @SuppressWarnings("AndroidFrameworkPendingIntentMutability") PendingIntent pendingIntentGetBroadcast( Context context, int requestCode, Intent intent, int flags) { return PendingIntent.getBroadcast(context, requestCode, intent, flags);