Merge "Allow translation cts can add itself into allowlist for content capture" into sc-dev
diff --git a/core/java/android/content/ContentCaptureOptions.java b/core/java/android/content/ContentCaptureOptions.java
index c296bb5..7707289 100644
--- a/core/java/android/content/ContentCaptureOptions.java
+++ b/core/java/android/content/ContentCaptureOptions.java
@@ -134,7 +134,8 @@
final String packageName = at.getApplication().getPackageName();
- if (!"android.contentcaptureservice.cts".equals(packageName)) {
+ if (!"android.contentcaptureservice.cts".equals(packageName)
+ && !"android.translation.cts".equals(packageName)) {
Log.e(TAG, "forWhitelistingItself(): called by " + packageName);
throw new SecurityException("Thou shall not pass!");
}