Merge "Add unaudited exported flag to exposed runtime receivers"
This commit is contained in:
committed by
Android (Google) Code Review
commit
0835d0140e
@@ -341,7 +341,8 @@ public final class CommunalManagerService extends SystemService {
|
||||
UserHandle.SYSTEM,
|
||||
mIntentFilter,
|
||||
/* broadcastPermission= */null,
|
||||
/* scheduler= */ null);
|
||||
/* scheduler= */ null,
|
||||
Context.RECEIVER_EXPORTED_UNAUDITED);
|
||||
}
|
||||
|
||||
private void unregister() {
|
||||
|
||||
@@ -29,6 +29,7 @@ import static com.android.server.wm.ActivityInterceptorCallback.COMMUNAL_MODE_OR
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.spy;
|
||||
@@ -138,7 +139,7 @@ public class CommunalManagerServiceTest {
|
||||
ArgumentCaptor<BroadcastReceiver> packageReceiverCaptor =
|
||||
ArgumentCaptor.forClass(BroadcastReceiver.class);
|
||||
verify(mContextSpy).registerReceiverAsUser(packageReceiverCaptor.capture(),
|
||||
eq(UserHandle.SYSTEM), any(), any(), any());
|
||||
eq(UserHandle.SYSTEM), any(), any(), any(), anyInt());
|
||||
mPackageReceiver = packageReceiverCaptor.getValue();
|
||||
|
||||
mBinder = mService.getBinderServiceInstance();
|
||||
|
||||
Reference in New Issue
Block a user