Install the Network Security Config Provider
The provider is installed early in ActivityThread to ensure that no TLS objects are created in the application before the provider is installed. Change-Id: I5f77addfa75a4ee19301de54e01507d8dca33657
This commit is contained in:
@@ -78,6 +78,7 @@ import android.os.Trace;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.security.NetworkSecurityPolicy;
|
||||
import android.security.net.config.NetworkSecurityConfigProvider;
|
||||
import android.util.AndroidRuntimeException;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.DisplayMetrics;
|
||||
@@ -4831,6 +4832,11 @@ public final class ActivityThread {
|
||||
}
|
||||
}
|
||||
|
||||
// Install the Network Security Config Provider. This must happen before the application
|
||||
// code is loaded to prevent issues with instances of TLS objects being created before
|
||||
// the provider is installed.
|
||||
NetworkSecurityConfigProvider.install(appContext);
|
||||
|
||||
// Continue loading instrumentation.
|
||||
if (ii != null) {
|
||||
final ApplicationInfo instrApp = new ApplicationInfo();
|
||||
|
||||
Reference in New Issue
Block a user