Merge "Move ACTION_CLEAR_DNS_CACHE to ConnectivityManager" am: ed4117ff40
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1667080 Change-Id: I4f180fc6e083b21d089dc15881e89a021557635a
This commit is contained in:
@@ -27,10 +27,6 @@ package android.content {
|
||||
field public static final String TEST_NETWORK_SERVICE = "test_network";
|
||||
}
|
||||
|
||||
public class Intent implements java.lang.Cloneable android.os.Parcelable {
|
||||
field public static final String ACTION_CLEAR_DNS_CACHE = "android.intent.action.CLEAR_DNS_CACHE";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.net {
|
||||
|
||||
@@ -2323,14 +2323,6 @@ public class Intent implements Parcelable, Cloneable {
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
||||
public static final String ACTION_TIMEZONE_CHANGED = "android.intent.action.TIMEZONE_CHANGED";
|
||||
/**
|
||||
* Clear DNS Cache Action: This is broadcast when networks have changed and old
|
||||
* DNS entries should be tossed.
|
||||
* @hide
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
||||
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
|
||||
public static final String ACTION_CLEAR_DNS_CACHE = "android.intent.action.CLEAR_DNS_CACHE";
|
||||
/**
|
||||
* Alarm Changed Action: This is broadcast when the AlarmClock
|
||||
* application's alarm is set or unset. It is used by the
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
<protected-broadcast android:name="android.nfc.handover.intent.action.HANDOVER_SEND_MULTIPLE" />
|
||||
<protected-broadcast android:name="com.android.nfc.handover.action.CANCEL_HANDOVER_TRANSFER" />
|
||||
|
||||
<protected-broadcast android:name="android.intent.action.CLEAR_DNS_CACHE" />
|
||||
<protected-broadcast android:name="android.net.action.CLEAR_DNS_CACHE" />
|
||||
<protected-broadcast android:name="android.intent.action.PROXY_CHANGE" />
|
||||
|
||||
<protected-broadcast android:name="android.os.UpdateLock.UPDATE_LOCK_CHANGED" />
|
||||
|
||||
@@ -26,6 +26,7 @@ package android.net {
|
||||
method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_TEST_NETWORKS, android.Manifest.permission.NETWORK_STACK}) public void simulateDataStall(int, long, @NonNull android.net.Network, @NonNull android.os.PersistableBundle);
|
||||
method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void startCaptivePortalApp(@NonNull android.net.Network);
|
||||
method public void systemReady();
|
||||
field public static final String ACTION_CLEAR_DNS_CACHE = "android.net.action.CLEAR_DNS_CACHE";
|
||||
field public static final String ACTION_PROMPT_LOST_VALIDATION = "android.net.action.PROMPT_LOST_VALIDATION";
|
||||
field public static final String ACTION_PROMPT_PARTIAL_CONNECTIVITY = "android.net.action.PROMPT_PARTIAL_CONNECTIVITY";
|
||||
field public static final String ACTION_PROMPT_UNVALIDATED = "android.net.action.PROMPT_UNVALIDATED";
|
||||
|
||||
@@ -449,6 +449,15 @@ public class ConnectivityManager {
|
||||
public static final String ACTION_PROMPT_PARTIAL_CONNECTIVITY =
|
||||
"android.net.action.PROMPT_PARTIAL_CONNECTIVITY";
|
||||
|
||||
/**
|
||||
* Clear DNS Cache Action: This is broadcast when networks have changed and old
|
||||
* DNS entries should be cleared.
|
||||
* @hide
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
||||
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
|
||||
public static final String ACTION_CLEAR_DNS_CACHE = "android.net.action.CLEAR_DNS_CACHE";
|
||||
|
||||
/**
|
||||
* Invalid tethering type.
|
||||
* @see #startTethering(int, boolean, OnStartTetheringCallback)
|
||||
|
||||
@@ -236,6 +236,7 @@ import android.graphics.Rect;
|
||||
import android.hardware.display.DisplayManagerInternal;
|
||||
import android.location.LocationManager;
|
||||
import android.media.audiofx.AudioEffect;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.Proxy;
|
||||
import android.net.Uri;
|
||||
import android.os.AppZygote;
|
||||
@@ -16458,7 +16459,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
stats.noteCurrentTimeChangedLocked();
|
||||
}
|
||||
break;
|
||||
case Intent.ACTION_CLEAR_DNS_CACHE:
|
||||
case ConnectivityManager.ACTION_CLEAR_DNS_CACHE:
|
||||
mHandler.sendEmptyMessage(CLEAR_DNS_CACHE_MSG);
|
||||
break;
|
||||
case Proxy.PROXY_CHANGE_ACTION:
|
||||
|
||||
@@ -420,7 +420,7 @@ public class DnsManager {
|
||||
/*
|
||||
* Tell the VMs to toss their DNS caches
|
||||
*/
|
||||
final Intent intent = new Intent(Intent.ACTION_CLEAR_DNS_CACHE);
|
||||
final Intent intent = new Intent(ConnectivityManager.ACTION_CLEAR_DNS_CACHE);
|
||||
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
|
||||
/*
|
||||
* Connectivity events can happen before boot has completed ...
|
||||
|
||||
Reference in New Issue
Block a user