Merge "Allow translation cts can add itself into allowlist for content capture" into sc-dev

This commit is contained in:
Joanne Chung
2021-03-08 04:08:19 +00:00
committed by Android (Google) Code Review

View File

@@ -134,7 +134,8 @@ public final class ContentCaptureOptions implements Parcelable {
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!");
}