NetworkSecurityPolicy

Class of android.security · NetworkSecurityPolicy.java · Android's reference

public class NetworkSecurityPolicy

The network security policy of the app. Cleartext traffic follows Android's default: permitted when the manifest sets usesCleartextTraffic or the app targets API 27 or lower. The domains of a network security config are not read.

Methods

public static NetworkSecurityPolicy getInstance() source
public boolean isCleartextTrafficPermitted() source
public boolean isCleartextTrafficPermitted(String hostname) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.