SharedContentChangedReceiver extends BroadcastReceiver implements Types { public static void sendBroadcast(@NonNull Context context, @NonNull Map<String, ?> data) { String sharedPermission = MetaDataUtils.getSharedPermission(context); String senderAuthority = MetaDataUtils.getAppAuthority(context); Intent intent = new Intent(sharedPermission); intent.putExtra(SENDER_AUTHORITY_KEY, senderAuthority); putDataIntoIntent(intent, data); context.sendBroadcast(intent, sharedPermission); } SharedContentChangedReceiver(); static void sendBroadcast(@NonNull Context context, @NonNull Map<String, ?> data); @Override void onReceive(Context context, Intent intent); static final String SENDER_AUTHORITY_KEY; }
@Test public void testSendBroadcast() throws Exception { }