summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShai Barack <shayba@google.com>2024-03-12 18:24:28 +0000
committerShai Barack <shayba@google.com>2024-03-15 21:25:28 +0000
commitc3f0f9743dfb741703bf7d5d4df5fc4fda2858b2 (patch)
tree78689bec573d1392033b393b4fc7bbc09f90806c
parent6935a91ecb4b3c424c367cf4a12b339dc14aadf1 (diff)
downloadAdServices-c3f0f9743dfb741703bf7d5d4df5fc4fda2858b2.tar.gz
Precondition error string should be a compile time constant
Bug: 327646201 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9363f276f06eb0dfaed9195b90d990a8b25c83d9) Merged-In: I1ac5098cc2a7ab2bda04d7ab718741e61d38c21c Change-Id: I1ac5098cc2a7ab2bda04d7ab718741e61d38c21c Original patch: From 9363f276f06eb0dfaed9195b90d990a8b25c83d9 Mon Sep 17 00:00:00 2001 From: Shai Barack <shayba@google.com> Date: Tue, 12 Mar 2024 18:16:55 +0000 Subject: [PATCH] Precondition error string should be a compile time constant Bug: 327646201 Change-Id: I1ac5098cc2a7ab2bda04d7ab718741e61d38c21c ---
-rw-r--r--adservices/framework/java/android/adservices/adselection/ReportEventRequest.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/adservices/framework/java/android/adservices/adselection/ReportEventRequest.java b/adservices/framework/java/android/adservices/adselection/ReportEventRequest.java
index 1f0a0ca90..6581ab14f 100644
--- a/adservices/framework/java/android/adservices/adselection/ReportEventRequest.java
+++ b/adservices/framework/java/android/adservices/adselection/ReportEventRequest.java
@@ -48,10 +48,7 @@ public class ReportEventRequest {
public static final long REPORT_EVENT_MAX_INTERACTION_DATA_SIZE_B = 64 * 1024; // 64 KB
private static final String EVENT_DATA_SIZE_MAX_EXCEEDED =
- String.format(
- Locale.ENGLISH,
- "Event data should not exceed %d bytes",
- REPORT_EVENT_MAX_INTERACTION_DATA_SIZE_B);
+ "Event data should not exceed " + REPORT_EVENT_MAX_INTERACTION_DATA_SIZE_B + " bytes";
private final long mAdSelectionId;
@NonNull private final String mEventKey;