hasLocalNetworkPermission
Return
true if opening a socket to a local-network address is currently permitted. Below API 37 local-network access is implicit via INTERNET; from 37 it is gated by the ACCESS_LOCAL_NETWORK runtime permission, whose grant is keyed on targetSdk rather than install history.