Revert "Ensure only valid events are reported."
Revert submission 22788860-b229633537
Reason for revert: Droidfood blocking bug: b/280401153
Reverted changes: /q/submissionid:22788860-b229633537
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8765c548cc444284e2e039987ffce7d846719fee)
Merged-In: I584678ebe28fb8c6e0131f6205fcc7f878f32a81
Change-Id: I584678ebe28fb8c6e0131f6205fcc7f878f32a81
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index ef13594..a98429a 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 @@
}
@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;
}