private List<Wrapper> getAppropriateWrappers(Intent intent, String receiverPermission) {
    broadcastIntents.add(intent);

    List<Wrapper> result = new ArrayList<>();

    List<Wrapper> copy = new ArrayList<>();
    copy.addAll(registeredReceivers);
    String intentClass =
        intent.getComponent() != null ? intent.getComponent().getClassName() : null;
    for (Wrapper wrapper : copy) {
      if ((hasMatchingPermission(wrapper.broadcastPermission, receiverPermission)
              && wrapper.intentFilter.matchAction(intent.getAction()))
          || (intentClass != null
              && intentClass.equals(wrapper.broadcastReceiver.getClass().getName()))) {
        final int match =
            wrapper.intentFilter.matchData(intent.getType(), intent.getScheme(), intent.getData());
        if (match != IntentFilter.NO_MATCH_DATA && match != IntentFilter.NO_MATCH_TYPE) {
          result.add(wrapper);
        }
      }
    }
    return result;
  }
private List<Wrapper> getAppropriateWrappers(Intent intent, String receiverPermission) {
    broadcastIntents.add(intent);

    List<Wrapper> result = new ArrayList<>();

    List<Wrapper> copy = new ArrayList<>();
    copy.addAll(registeredReceivers);
    String intentClass =
        intent.getComponent() != null ? intent.getComponent().getClassName() : null;
    for (Wrapper wrapper : copy) {
      if ((hasMatchingPermission(wrapper.broadcastPermission, receiverPermission)
              && wrapper.intentFilter.matchAction(intent.getAction()))
          || (intentClass != null
              && intentClass.equals(wrapper.broadcastReceiver.getClass().getName()))) {
        final int match =
            wrapper.intentFilter.matchData(intent.getType(), intent.getScheme(), intent.getData());
        if (match != IntentFilter.NO_MATCH_DATA && match != IntentFilter.NO_MATCH_TYPE) {
          result.add(wrapper);
        }
      }
    }
    return result;
  }
private List < Wrapper > getAppropriateWrappers ( Intent intent , String receiverPermission ) { broadcastIntents . add ( intent ) ; List < Wrapper > result = new ArrayList <> ( ) ; List < Wrapper > copy = new ArrayList <> ( ) ; copy . addAll ( registeredReceivers ) ; String intentClass = intent . getComponent ( ) != null ? intent . getComponent ( ) . getClassName ( ) : null ; for ( Wrapper wrapper : copy ) { if ( ( hasMatchingPermission ( wrapper . broadcastPermission , receiverPermission ) && wrapper . intentFilter . matchAction ( intent . getAction ( ) ) ) || ( intentClass != null && intentClass . equals ( wrapper . broadcastReceiver . getClass ( ) . getName ( ) ) ) ) { final int match = wrapper . intentFilter . matchData ( intent . getType ( ) , intent . getScheme ( ) , intent . getData ( ) ) ; if ( match != IntentFilter . NO_MATCH_DATA && match != IntentFilter . NO_MATCH_TYPE ) { result . add ( wrapper ) ; } } } return result ; }
Returns the BroadcaseReceivers wrappers, matching intent's action and permissions.
Returns the BroadcaseReceivers wrappers matching intent s action and permissions .