Merge "Mark all published authorities for a provider as ready" into sc-dev am: d39b5f032c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15019800

Change-Id: Ib63f630c6ee65fa22697bebdcb1f21a261c92882
This commit is contained in:
Amith Yamasani
2021-06-21 16:31:40 +00:00
committed by Automerger Merge Worker
2 changed files with 10 additions and 7 deletions

View File

@@ -449,7 +449,7 @@ public final class ActivityThread extends ClientTransactionHandler
@GuardedBy("mLock")
ContentProviderHolder mHolder; // Temp holder to be used between notifier and waiter
Object mLock; // The lock to be used to get notified when the provider is ready
final Object mLock; // The lock to be used to get notified when the provider is ready
public ProviderKey(String authority, int userId) {
this.authority = authority;
@@ -1829,11 +1829,14 @@ public final class ActivityThread extends ClientTransactionHandler
@Override
public void notifyContentProviderPublishStatus(@NonNull ContentProviderHolder holder,
@NonNull String auth, int userId, boolean published) {
final ProviderKey key = getGetProviderKey(auth, userId);
synchronized (key.mLock) {
key.mHolder = holder;
key.mLock.notifyAll();
@NonNull String authorities, int userId, boolean published) {
final String auths[] = authorities.split(";");
for (String auth: auths) {
final ProviderKey key = getGetProviderKey(auth, userId);
synchronized (key.mLock) {
key.mHolder = holder;
key.mLock.notifyAll();
}
}
}

View File

@@ -153,7 +153,7 @@ oneway interface IApplicationThread {
void performDirectAction(IBinder activityToken, String actionId,
in Bundle arguments, in RemoteCallback cancellationCallback,
in RemoteCallback resultCallback);
void notifyContentProviderPublishStatus(in ContentProviderHolder holder, String auth,
void notifyContentProviderPublishStatus(in ContentProviderHolder holder, String authorities,
int userId, boolean published);
void instrumentWithoutRestart(in ComponentName instrumentationName,
in Bundle instrumentationArgs,