From 8b0cff710816999fddd33d3591bc52c87600c095 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 9 Mar 2020 15:49:01 -0600 Subject: Give hidden API behavior to legacy apps. Starting in R, there is a new public API overload that delivers a flags argument. Some apps may be relying on a previous hidden API that delivered a userId argument, and this change is used to control delivery of the new flags argument in its place. There are dozens of these hidden API users are in the system UID, either in the system process or the Settings app, so we hard-code giving them the legacy behavior, since refactoring would be messy between internal and AOSP branches. Also adjust incoming and outgoing method signatures to use slightly more flexible Collection, which has handy methods like contains() and isEmpty(). Bug: 150939131 Test: atest --test-mapping packages/providers/MediaProvider Test: atest FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest Exempt-From-Owner-Approval: trivial refactoring Change-Id: If6a77449e19215cf1c60d4217e62fc04b0959bfc --- test-mock/src/android/test/mock/MockContentResolver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test-mock') diff --git a/test-mock/src/android/test/mock/MockContentResolver.java b/test-mock/src/android/test/mock/MockContentResolver.java index 8283019a10ec..8f4bcccb0cba 100644 --- a/test-mock/src/android/test/mock/MockContentResolver.java +++ b/test-mock/src/android/test/mock/MockContentResolver.java @@ -25,6 +25,7 @@ import android.content.IContentProvider; import android.database.ContentObserver; import android.net.Uri; +import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -172,7 +173,7 @@ public class MockContentResolver extends ContentResolver { * from observers elsewhere in the system. */ @Override - public void notifyChange(@NonNull Iterable uris, @Nullable ContentObserver observer, + public void notifyChange(@NonNull Collection uris, @Nullable ContentObserver observer, @NotifyFlags int flags) { } } -- cgit v1.2.3