diff options
| author | 2023-05-04 00:48:50 +0000 | |
|---|---|---|
| committer | 2023-05-04 00:48:50 +0000 | |
| commit | 3e09bdb54e27ea44e34091e20855f6e8a4637e1c (patch) | |
| tree | 05c1625dd4fdefdd76e02784630593e9eb950bf8 | |
| parent | 5869befbff381bc77aaaa92edfc3990831d14565 (diff) | |
| parent | 8765c548cc444284e2e039987ffce7d846719fee (diff) | |
Merge "Revert "Ensure only valid events are reported."" into udc-dev
| -rw-r--r-- | services/usage/java/com/android/server/usage/UsageStatsService.java | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java index ef1359449b9b..a98429ad4902 100644 --- a/services/usage/java/com/android/server/usage/UsageStatsService.java +++ b/services/usage/java/com/android/server/usage/UsageStatsService.java @@ -2539,20 +2539,10 @@ public class UsageStatsService extends SystemService implements } @Override - public void reportChooserSelection(@NonNull String packageName, int userId, - @NonNull String contentType, String[] annotations, @NonNull String action) { + public void reportChooserSelection(String packageName, int userId, String contentType, + String[] annotations, String action) { if (packageName == null) { - throw new IllegalArgumentException("Package selection must not be null."); - } - if (contentType == null) { - throw new IllegalArgumentException("Content type for selection must not be null."); - } - if (action == null) { - throw new IllegalArgumentException("Selection action must not be null."); - } - // Verify if this package exists before reporting an event for it. - if (mPackageManagerInternal.getPackageUid(packageName, 0, userId) < 0) { - Slog.w(TAG, "Event report user selecting an invalid package"); + Slog.w(TAG, "Event report user selecting a null package"); return; } |