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 ; }
Returns network types from the input with additional unknown type what helps during connections filtering when device is being disconnected from a specific network