code: protected static int[] appendUnknownNetworkTypeToTypes(int[] types) {
      int i = 0;
      final int[] extendedTypes = new int[types.length + 1];
      for (int type : types) {
        extendedTypes[i] = type;
        i++;
      }
      extendedTypes[i] = Connectivity.UNKNOWN_TYPE;
      return extendedTypes;
    }
docs: Returns network types from the input with additional unknown type,
  what helps during connections filtering when device
  is being disconnected from a specific network
  
  @param types of the network as an array of ints
  @return types of the network with unknown type as an array of ints