summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/ConnectivityMetricsEvent.aidl2
-rw-r--r--core/java/android/net/ConnectivityMetricsEvent.java50
-rw-r--r--core/java/android/net/ConnectivityMetricsLogger.java92
-rw-r--r--core/java/android/net/IConnectivityMetricsLogger.aidl43
-rw-r--r--core/java/android/net/metrics/ApfProgramEvent.java4
-rw-r--r--core/java/android/net/metrics/ApfStats.java3
-rw-r--r--core/java/android/net/metrics/DefaultNetworkEvent.java7
-rw-r--r--core/java/android/net/metrics/DhcpClientEvent.java6
-rw-r--r--core/java/android/net/metrics/DhcpErrorEvent.java11
-rw-r--r--core/java/android/net/metrics/DnsEvent.java7
-rw-r--r--core/java/android/net/metrics/IpManagerEvent.java19
-rw-r--r--core/java/android/net/metrics/IpReachabilityEvent.java17
-rw-r--r--core/java/android/net/metrics/NetworkEvent.java18
-rw-r--r--core/java/android/net/metrics/RaEvent.java5
-rw-r--r--core/java/android/net/metrics/ValidationProbeEvent.java11
15 files changed, 9 insertions, 286 deletions
diff --git a/core/java/android/net/ConnectivityMetricsEvent.aidl b/core/java/android/net/ConnectivityMetricsEvent.aidl
index a027d7c38140..1c541dc4c8cc 100644
--- a/core/java/android/net/ConnectivityMetricsEvent.aidl
+++ b/core/java/android/net/ConnectivityMetricsEvent.aidl
@@ -16,5 +16,5 @@
package android.net;
+/** {@hide} */
parcelable ConnectivityMetricsEvent;
-parcelable ConnectivityMetricsEvent.Reference;
diff --git a/core/java/android/net/ConnectivityMetricsEvent.java b/core/java/android/net/ConnectivityMetricsEvent.java
index eaaef7f6c586..6fdc739a5f54 100644
--- a/core/java/android/net/ConnectivityMetricsEvent.java
+++ b/core/java/android/net/ConnectivityMetricsEvent.java
@@ -16,12 +16,10 @@
package android.net;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
/** {@hide} */
-@SystemApi
public final class ConnectivityMetricsEvent implements Parcelable {
/** The time when this event was collected, as returned by System.currentTimeMillis(). */
@@ -67,7 +65,6 @@ public final class ConnectivityMetricsEvent implements Parcelable {
return 0;
}
- /** Implement the Parcelable interface */
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(timestamp);
@@ -80,51 +77,4 @@ public final class ConnectivityMetricsEvent implements Parcelable {
return String.format("ConnectivityMetricsEvent(%tT.%tL, %d, %d): %s",
timestamp, timestamp, componentTag, eventTag, data);
}
-
- /** {@hide} */
- @SystemApi
- public final static class Reference implements Parcelable {
-
- private long mValue;
-
- public Reference(long ref) {
- this.mValue = ref;
- }
-
- /** Implement the Parcelable interface */
- public static final Parcelable.Creator<Reference> CREATOR
- = new Parcelable.Creator<Reference> (){
- public Reference createFromParcel(Parcel source) {
- return new Reference(source.readLong());
- }
-
- public Reference[] newArray(int size) {
- return new Reference[size];
- }
- };
-
- /** Implement the Parcelable interface */
- @Override
- public int describeContents() {
- return 0;
- }
-
- /** Implement the Parcelable interface */
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeLong(mValue);
- }
-
- public void readFromParcel(Parcel in) {
- mValue = in.readLong();
- }
-
- public long getValue() {
- return mValue;
- }
-
- public void setValue(long val) {
- mValue = val;
- }
- }
}
diff --git a/core/java/android/net/ConnectivityMetricsLogger.java b/core/java/android/net/ConnectivityMetricsLogger.java
deleted file mode 100644
index 67b6908ed020..000000000000
--- a/core/java/android/net/ConnectivityMetricsLogger.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.net;
-
-import android.annotation.SystemApi;
-import android.app.PendingIntent;
-import android.os.Bundle;
-import android.os.Parcelable;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-
-/** {@hide} */
-@SystemApi
-public class ConnectivityMetricsLogger {
- private static String TAG = "ConnectivityMetricsLogger";
- private static final boolean DBG = true;
-
- public static final String CONNECTIVITY_METRICS_LOGGER_SERVICE = "connectivity_metrics_logger";
-
- // Component Tags
- public static final int COMPONENT_TAG_CONNECTIVITY = 0;
- public static final int COMPONENT_TAG_BLUETOOTH = 1;
- public static final int COMPONENT_TAG_WIFI = 2;
- public static final int COMPONENT_TAG_TELECOM = 3;
- public static final int COMPONENT_TAG_TELEPHONY = 4;
- public static final int NUMBER_OF_COMPONENTS = 5;
-
- // Event Tag
- public static final int TAG_SKIPPED_EVENTS = -1;
-
- public static final String DATA_KEY_EVENTS_COUNT = "count";
-
- public ConnectivityMetricsLogger() {
- }
-
- /**
- * Log a ConnectivityMetricsEvent.
- *
- * This method keeps track of skipped events when MetricsLoggerService throttles input events.
- * It skips logging when MetricsLoggerService is active. When throttling ends, it logs a
- * meta-event containing the number of events dropped. It is not safe to call this method
- * concurrently from different threads.
- *
- * @param timestamp is the epoch timestamp of the event in ms.
- * @param componentTag is the COMPONENT_* constant the event belongs to.
- * @param eventTag is an event type constant whose meaning is specific to the component tag.
- * @param data is a Parcelable instance representing the event.
- */
- public void logEvent(long timestamp, int componentTag, int eventTag, Parcelable data) {
- }
-
- /**
- * Retrieve events
- *
- * @param reference of the last event previously returned. The function will return
- * events following it.
- * If 0 then all events will be returned.
- * After the function call it will contain reference of the
- * last returned event.
- * @return events
- */
- public ConnectivityMetricsEvent[] getEvents(ConnectivityMetricsEvent.Reference reference) {
- return new ConnectivityMetricsEvent[0];
- }
-
- /**
- * Register PendingIntent which will be sent when new events are ready to be retrieved.
- */
- public boolean register(PendingIntent newEventsIntent) {
- return false;
- }
-
- public boolean unregister(PendingIntent newEventsIntent) {
- return false;
- }
-}
diff --git a/core/java/android/net/IConnectivityMetricsLogger.aidl b/core/java/android/net/IConnectivityMetricsLogger.aidl
deleted file mode 100644
index a83a01935253..000000000000
--- a/core/java/android/net/IConnectivityMetricsLogger.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net;
-
-import android.app.PendingIntent;
-import android.net.ConnectivityMetricsEvent;
-
-/** {@hide} */
-interface IConnectivityMetricsLogger {
-
- /**
- * @return 0 on success
- * <0 if error happened
- * >0 timestamp after which new events will be accepted
- */
- long logEvent(in ConnectivityMetricsEvent event);
- long logEvents(in ConnectivityMetricsEvent[] events);
-
- /**
- * @param reference of the last event previously returned. The function will return
- * events following it.
- * If 0 then all events will be returned.
- * After the function call it will contain reference of the last event.
- */
- ConnectivityMetricsEvent[] getEvents(inout ConnectivityMetricsEvent.Reference reference);
-
- boolean register(in PendingIntent newEventsIntent);
- void unregister(in PendingIntent newEventsIntent);
-}
diff --git a/core/java/android/net/metrics/ApfProgramEvent.java b/core/java/android/net/metrics/ApfProgramEvent.java
index 258d8e13951f..c2795a2ab956 100644
--- a/core/java/android/net/metrics/ApfProgramEvent.java
+++ b/core/java/android/net/metrics/ApfProgramEvent.java
@@ -17,7 +17,6 @@
package android.net.metrics;
import android.annotation.IntDef;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -36,7 +35,6 @@ import java.util.List;
* the APF program in place with a new APF program.
* {@hide}
*/
-@SystemApi
public final class ApfProgramEvent implements Parcelable {
// Bitflag constants describing what an Apf program filters.
@@ -55,7 +53,6 @@ public final class ApfProgramEvent implements Parcelable {
public final int programLength; // Length of the APF program in bytes
public final int flags; // Bitfield compound of FLAG_* constants
- /** {@hide} */
public ApfProgramEvent(
long lifetime, int filteredRas, int currentRas, int programLength, @Flags int flags) {
this.lifetime = lifetime;
@@ -105,7 +102,6 @@ public final class ApfProgramEvent implements Parcelable {
}
};
- /** {@hide} */
public static @Flags int flagsFor(boolean hasIPv4, boolean multicastFilterOn) {
int bitfield = 0;
if (hasIPv4) {
diff --git a/core/java/android/net/metrics/ApfStats.java b/core/java/android/net/metrics/ApfStats.java
index 8451e539a7f6..f8d7fa9d2e8d 100644
--- a/core/java/android/net/metrics/ApfStats.java
+++ b/core/java/android/net/metrics/ApfStats.java
@@ -16,7 +16,6 @@
package android.net.metrics;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +23,6 @@ import android.os.Parcelable;
* An event logged for an interface with APF capabilities when its IpManager state machine exits.
* {@hide}
*/
-@SystemApi
public final class ApfStats implements Parcelable {
public final long durationMs; // time interval in milliseconds these stastistics covers
@@ -36,7 +34,6 @@ public final class ApfStats implements Parcelable {
public final int programUpdates; // number of APF program updates
public final int maxProgramSize; // maximum APF program size advertised by hardware
- /** {@hide} */
public ApfStats(long durationMs, int receivedRas, int matchingRas, int droppedRas,
int zeroLifetimeRas, int parseErrors, int programUpdates, int maxProgramSize) {
this.durationMs = durationMs;
diff --git a/core/java/android/net/metrics/DefaultNetworkEvent.java b/core/java/android/net/metrics/DefaultNetworkEvent.java
index 9f0bad7ee9fe..28cf42f2fe28 100644
--- a/core/java/android/net/metrics/DefaultNetworkEvent.java
+++ b/core/java/android/net/metrics/DefaultNetworkEvent.java
@@ -16,7 +16,6 @@
package android.net.metrics;
-import android.annotation.SystemApi;
import android.net.NetworkCapabilities;
import android.os.Parcel;
import android.os.Parcelable;
@@ -25,7 +24,6 @@ import android.os.Parcelable;
* An event recorded by ConnectivityService when there is a change in the default network.
* {@hide}
*/
-@SystemApi
public final class DefaultNetworkEvent implements Parcelable {
// The ID of the network that has become the new default or NETID_UNSET if none.
public final int netId;
@@ -38,7 +36,6 @@ public final class DefaultNetworkEvent implements Parcelable {
public final boolean prevIPv4;
public final boolean prevIPv6;
- /** {@hide} */
public DefaultNetworkEvent(int netId, int[] transportTypes,
int prevNetId, boolean prevIPv4, boolean prevIPv6) {
this.netId = netId;
@@ -106,8 +103,4 @@ public final class DefaultNetworkEvent implements Parcelable {
return new DefaultNetworkEvent[size];
}
};
-
- public static void logEvent(
- int netId, int[] transports, int prevNetId, boolean hadIPv4, boolean hadIPv6) {
- }
}
diff --git a/core/java/android/net/metrics/DhcpClientEvent.java b/core/java/android/net/metrics/DhcpClientEvent.java
index 4a9ff0511246..7e30ab59ccdf 100644
--- a/core/java/android/net/metrics/DhcpClientEvent.java
+++ b/core/java/android/net/metrics/DhcpClientEvent.java
@@ -16,7 +16,6 @@
package android.net.metrics;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +23,6 @@ import android.os.Parcelable;
* An event recorded when a DhcpClient state machine transitions to a new state.
* {@hide}
*/
-@SystemApi
public final class DhcpClientEvent implements Parcelable {
// Names for recording DhcpClient pseudo-state transitions.
@@ -37,7 +35,6 @@ public final class DhcpClientEvent implements Parcelable {
public final String msg;
public final int durationMs;
- /** {@hide} */
public DhcpClientEvent(String ifName, String msg, int durationMs) {
this.ifName = ifName;
this.msg = msg;
@@ -77,7 +74,4 @@ public final class DhcpClientEvent implements Parcelable {
return new DhcpClientEvent[size];
}
};
-
- public static void logStateEvent(String ifName, String state) {
- }
}
diff --git a/core/java/android/net/metrics/DhcpErrorEvent.java b/core/java/android/net/metrics/DhcpErrorEvent.java
index c3abcf7610b4..f34ffdfeb0d7 100644
--- a/core/java/android/net/metrics/DhcpErrorEvent.java
+++ b/core/java/android/net/metrics/DhcpErrorEvent.java
@@ -16,7 +16,6 @@
package android.net.metrics;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
@@ -27,7 +26,6 @@ import com.android.internal.util.MessageUtils;
* Event class used to record error events when parsing DHCP response packets.
* {@hide}
*/
-@SystemApi
public final class DhcpErrorEvent implements Parcelable {
public static final int L2_ERROR = 1;
public static final int L3_ERROR = 2;
@@ -50,12 +48,10 @@ public final class DhcpErrorEvent implements Parcelable {
public static final int DHCP_INVALID_OPTION_LENGTH = makeErrorCode(DHCP_ERROR, 3);
public static final int DHCP_NO_MSG_TYPE = makeErrorCode(DHCP_ERROR, 4);
public static final int DHCP_UNKNOWN_MSG_TYPE = makeErrorCode(DHCP_ERROR, 5);
- /** {@hide} */
public static final int DHCP_NO_COOKIE = makeErrorCode(DHCP_ERROR, 6);
public static final int BUFFER_UNDERFLOW = makeErrorCode(MISC_ERROR, 1);
public static final int RECEIVE_ERROR = makeErrorCode(MISC_ERROR, 2);
- /** {@hide} */
public static final int PARSING_ERROR = makeErrorCode(MISC_ERROR, 3);
public final String ifName;
@@ -66,7 +62,6 @@ public final class DhcpErrorEvent implements Parcelable {
// byte 3: optional code
public final int errorCode;
- /** {@hide} */
public DhcpErrorEvent(String ifName, int errorCode) {
this.ifName = ifName;
this.errorCode = errorCode;
@@ -99,12 +94,6 @@ public final class DhcpErrorEvent implements Parcelable {
}
};
- public static void logParseError(String ifName, int errorCode) {
- }
-
- public static void logReceiveError(String ifName) {
- }
-
public static int errorCodeWithOption(int errorCode, int option) {
return (0xFFFF0000 & errorCode) | (0xFF & option);
}
diff --git a/core/java/android/net/metrics/DnsEvent.java b/core/java/android/net/metrics/DnsEvent.java
index 6176b2c58deb..89ae1c258ee6 100644
--- a/core/java/android/net/metrics/DnsEvent.java
+++ b/core/java/android/net/metrics/DnsEvent.java
@@ -16,7 +16,6 @@
package android.net.metrics;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +23,6 @@ import android.os.Parcelable;
* A DNS event recorded by NetdEventListenerService.
* {@hide}
*/
-@SystemApi
final public class DnsEvent implements Parcelable {
public final int netId;
@@ -38,7 +36,6 @@ final public class DnsEvent implements Parcelable {
// queries.
public final int[] latenciesMs;
- /** {@hide} */
public DnsEvent(int netId, byte[] eventTypes, byte[] returnCodes, int[] latenciesMs) {
this.netId = netId;
this.eventTypes = eventTypes;
@@ -82,8 +79,4 @@ final public class DnsEvent implements Parcelable {
return new DnsEvent[size];
}
};
-
- public static void logEvent(
- int netId, byte[] eventTypes, byte[] returnCodes, int[] latenciesMs) {
- }
}
diff --git a/core/java/android/net/metrics/IpManagerEvent.java b/core/java/android/net/metrics/IpManagerEvent.java
index e0a026ed678d..50dda7cdb5dd 100644
--- a/core/java/android/net/metrics/IpManagerEvent.java
+++ b/core/java/android/net/metrics/IpManagerEvent.java
@@ -17,7 +17,6 @@
package android.net.metrics;
import android.annotation.IntDef;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
@@ -32,17 +31,15 @@ import java.lang.annotation.RetentionPolicy;
* when a network disconnects.
* {@hide}
*/
-@SystemApi
public final class IpManagerEvent implements Parcelable {
- public static final int PROVISIONING_OK = 1;
- public static final int PROVISIONING_FAIL = 2;
- public static final int COMPLETE_LIFECYCLE = 3;
- /** @hide */ public static final int ERROR_STARTING_IPV4 = 4;
- /** @hide */ public static final int ERROR_STARTING_IPV6 = 5;
- /** @hide */ public static final int ERROR_STARTING_IPREACHABILITYMONITOR = 6;
+ public static final int PROVISIONING_OK = 1;
+ public static final int PROVISIONING_FAIL = 2;
+ public static final int COMPLETE_LIFECYCLE = 3;
+ public static final int ERROR_STARTING_IPV4 = 4;
+ public static final int ERROR_STARTING_IPV6 = 5;
+ public static final int ERROR_STARTING_IPREACHABILITYMONITOR = 6;
- /** {@hide} */
@IntDef(value = {
PROVISIONING_OK, PROVISIONING_FAIL, COMPLETE_LIFECYCLE,
ERROR_STARTING_IPV4, ERROR_STARTING_IPV6, ERROR_STARTING_IPREACHABILITYMONITOR,
@@ -54,7 +51,6 @@ public final class IpManagerEvent implements Parcelable {
public final @EventType int eventType;
public final long durationMs;
- /** {@hide} */
public IpManagerEvent(String ifName, @EventType int eventType, long duration) {
this.ifName = ifName;
this.eventType = eventType;
@@ -90,9 +86,6 @@ public final class IpManagerEvent implements Parcelable {
}
};
- public static void logEvent(int eventType, String ifName, long durationMs) {
- }
-
@Override
public String toString() {
return String.format("IpManagerEvent(%s, %s, %dms)",
diff --git a/core/java/android/net/metrics/IpReachabilityEvent.java b/core/java/android/net/metrics/IpReachabilityEvent.java
index ee09e2292661..d69e806f6f22 100644
--- a/core/java/android/net/metrics/IpReachabilityEvent.java
+++ b/core/java/android/net/metrics/IpReachabilityEvent.java
@@ -16,7 +16,6 @@
package android.net.metrics;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
@@ -28,7 +27,6 @@ import com.android.internal.util.MessageUtils;
* a neighbor probe result.
* {@hide}
*/
-@SystemApi
public final class IpReachabilityEvent implements Parcelable {
// Event types.
@@ -38,9 +36,9 @@ public final class IpReachabilityEvent implements Parcelable {
public static final int NUD_FAILED = 2 << 8;
/** Neighbor unreachable after a forced probe, IP provisioning is also lost. */
public static final int PROVISIONING_LOST = 3 << 8;
- /** {@hide} Neighbor unreachable notification from kernel. */
+ /** Neighbor unreachable notification from kernel. */
public static final int NUD_FAILED_ORGANIC = 4 << 8;
- /** {@hide} Neighbor unreachable notification from kernel, IP provisioning is also lost. */
+ /** Neighbor unreachable notification from kernel, IP provisioning is also lost. */
public static final int PROVISIONING_LOST_ORGANIC = 5 << 8;
public final String ifName;
@@ -51,7 +49,6 @@ public final class IpReachabilityEvent implements Parcelable {
// byte 3: when byte 2 == PROBE, errno code from RTNetlink or IpReachabilityMonitor.
public final int eventType;
- /** {@hide} */
public IpReachabilityEvent(String ifName, int eventType) {
this.ifName = ifName;
this.eventType = eventType;
@@ -84,18 +81,8 @@ public final class IpReachabilityEvent implements Parcelable {
}
};
- public static void logProbeEvent(String ifName, int nlErrorCode) {
- }
-
- public static void logNudFailed(String ifName) {
- }
-
- public static void logProvisioningLost(String ifName) {
- }
-
/**
* Returns the NUD failure event type code corresponding to the given conditions.
- * {@hide}
*/
public static int nudFailureEventType(boolean isFromProbe, boolean isProvisioningLost) {
if (isFromProbe) {
diff --git a/core/java/android/net/metrics/NetworkEvent.java b/core/java/android/net/metrics/NetworkEvent.java
index 06674950a044..4df3bf095056 100644
--- a/core/java/android/net/metrics/NetworkEvent.java
+++ b/core/java/android/net/metrics/NetworkEvent.java
@@ -17,7 +17,6 @@
package android.net.metrics;
import android.annotation.IntDef;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
@@ -30,7 +29,6 @@ import java.lang.annotation.RetentionPolicy;
/**
* {@hide}
*/
-@SystemApi
public final class NetworkEvent implements Parcelable {
public static final int NETWORK_CONNECTED = 1;
@@ -41,16 +39,11 @@ public final class NetworkEvent implements Parcelable {
public static final int NETWORK_UNLINGER = 6;
public static final int NETWORK_DISCONNECTED = 7;
- /** {@hide} */
public static final int NETWORK_FIRST_VALIDATION_SUCCESS = 8;
- /** {@hide} */
public static final int NETWORK_REVALIDATION_SUCCESS = 9;
- /** {@hide} */
public static final int NETWORK_FIRST_VALIDATION_PORTAL_FOUND = 10;
- /** {@hide} */
public static final int NETWORK_REVALIDATION_PORTAL_FOUND = 11;
- /** {@hide} */
@IntDef(value = {
NETWORK_CONNECTED,
NETWORK_VALIDATED,
@@ -71,14 +64,12 @@ public final class NetworkEvent implements Parcelable {
public final @EventType int eventType;
public final long durationMs;
- /** {@hide} */
public NetworkEvent(int netId, @EventType int eventType, long durationMs) {
this.netId = netId;
this.eventType = eventType;
this.durationMs = durationMs;
}
- /** {@hide} */
public NetworkEvent(int netId, @EventType int eventType) {
this(netId, eventType, 0);
}
@@ -112,15 +103,6 @@ public final class NetworkEvent implements Parcelable {
}
};
- public static void logEvent(int netId, int eventType) {
- }
-
- public static void logValidated(int netId, long durationMs) {
- }
-
- public static void logCaptivePortalFound(int netId, long durationMs) {
- }
-
@Override
public String toString() {
return String.format("NetworkEvent(%d, %s, %dms)",
diff --git a/core/java/android/net/metrics/RaEvent.java b/core/java/android/net/metrics/RaEvent.java
index 91bd023cd56c..3249f8001724 100644
--- a/core/java/android/net/metrics/RaEvent.java
+++ b/core/java/android/net/metrics/RaEvent.java
@@ -16,7 +16,6 @@
package android.net.metrics;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,10 +23,8 @@ import android.os.Parcelable;
* An event logged when the APF packet socket receives an RA packet.
* {@hide}
*/
-@SystemApi
public final class RaEvent implements Parcelable {
- /** {@hide} */
public static final long NO_LIFETIME = -1L;
// Lifetime in seconds of options found in a single RA packet.
@@ -39,7 +36,6 @@ public final class RaEvent implements Parcelable {
public final long rdnssLifetime;
public final long dnsslLifetime;
- /** {@hide} */
public RaEvent(long routerLifetime, long prefixValidLifetime, long prefixPreferredLifetime,
long routeInfoLifetime, long rdnssLifetime, long dnsslLifetime) {
this.routerLifetime = routerLifetime;
@@ -96,7 +92,6 @@ public final class RaEvent implements Parcelable {
}
};
- /** {@hide} */
public static class Builder {
long routerLifetime = NO_LIFETIME;
diff --git a/core/java/android/net/metrics/ValidationProbeEvent.java b/core/java/android/net/metrics/ValidationProbeEvent.java
index a724ec12ed32..70c6e841285c 100644
--- a/core/java/android/net/metrics/ValidationProbeEvent.java
+++ b/core/java/android/net/metrics/ValidationProbeEvent.java
@@ -17,7 +17,6 @@
package android.net.metrics;
import android.annotation.IntDef;
-import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
@@ -31,14 +30,12 @@ import java.lang.annotation.RetentionPolicy;
* An event recorded by NetworkMonitor when sending a probe for finding captive portals.
* {@hide}
*/
-@SystemApi
public final class ValidationProbeEvent implements Parcelable {
public static final int PROBE_DNS = 0;
public static final int PROBE_HTTP = 1;
public static final int PROBE_HTTPS = 2;
public static final int PROBE_PAC = 3;
- /** {@hide} */
public static final int PROBE_FALLBACK = 4;
public static final int DNS_FAILURE = 0;
@@ -47,7 +44,6 @@ public final class ValidationProbeEvent implements Parcelable {
private static final int FIRST_VALIDATION = 1 << 8;
private static final int REVALIDATION = 2 << 8;
- /** {@hide} */
@IntDef(value = {DNS_FAILURE, DNS_SUCCESS})
@Retention(RetentionPolicy.SOURCE)
public @interface ReturnCode {}
@@ -62,7 +58,6 @@ public final class ValidationProbeEvent implements Parcelable {
public final int probeType;
public final @ReturnCode int returnCode;
- /** {@hide} */
public ValidationProbeEvent(
int netId, long durationMs, int probeType, @ReturnCode int returnCode) {
this.netId = netId;
@@ -102,24 +97,18 @@ public final class ValidationProbeEvent implements Parcelable {
}
};
- /** @hide */
public static int makeProbeType(int probeType, boolean firstValidation) {
return (probeType & 0xff) | (firstValidation ? FIRST_VALIDATION : REVALIDATION);
}
- /** @hide */
public static String getProbeName(int probeType) {
return Decoder.constants.get(probeType & 0xff, "PROBE_???");
}
- /** @hide */
public static String getValidationStage(int probeType) {
return Decoder.constants.get(probeType & 0xff00, "UNKNOWN");
}
- public static void logEvent(int netId, long durationMs, int probeType, int returnCode) {
- }
-
@Override
public String toString() {
return String.format("ValidationProbeEvent(%d, %s:%d %s, %dms)", netId,