Loading core/java/android/app/ActivityThread.java +7 −0 Original line number Diff line number Diff line Loading @@ -4022,6 +4022,13 @@ public final class ActivityThread extends ClientTransactionHandler ActivityManager.getService().waitForNetworkStateUpdate(mNetworkBlockSeq); mNetworkBlockSeq = INVALID_PROC_STATE_SEQ; } catch (RemoteException ignored) {} if (android.app.Flags.clearDnsCacheOnNetworkRulesUpdate()) { // InetAddress will cache UnknownHostException failures. If the rules got // updated and the app has network access now, we need to clear the negative // cache to ensure valid dns queries can work immediately. // TODO: b/329133769 - Clear only the negative cache once it is available. InetAddress.clearDnsCache(); } } } } Loading core/java/android/app/network-policy.aconfig 0 → 100644 +11 −0 Original line number Diff line number Diff line package: "android.app" flag { namespace: "backstage_power" name: "clear_dns_cache_on_network_rules_update" description: "Clears the DNS cache when the network rules update" bug: "237556596" metadata { purpose: PURPOSE_BUGFIX } } No newline at end of file Loading
core/java/android/app/ActivityThread.java +7 −0 Original line number Diff line number Diff line Loading @@ -4022,6 +4022,13 @@ public final class ActivityThread extends ClientTransactionHandler ActivityManager.getService().waitForNetworkStateUpdate(mNetworkBlockSeq); mNetworkBlockSeq = INVALID_PROC_STATE_SEQ; } catch (RemoteException ignored) {} if (android.app.Flags.clearDnsCacheOnNetworkRulesUpdate()) { // InetAddress will cache UnknownHostException failures. If the rules got // updated and the app has network access now, we need to clear the negative // cache to ensure valid dns queries can work immediately. // TODO: b/329133769 - Clear only the negative cache once it is available. InetAddress.clearDnsCache(); } } } } Loading
core/java/android/app/network-policy.aconfig 0 → 100644 +11 −0 Original line number Diff line number Diff line package: "android.app" flag { namespace: "backstage_power" name: "clear_dns_cache_on_network_rules_update" description: "Clears the DNS cache when the network rules update" bug: "237556596" metadata { purpose: PURPOSE_BUGFIX } } No newline at end of file