Migrate to @Override to remove warnings.
Bug: 6303344
Change-Id: I0d33b2ed448467379d576ccd71fb5ae20c878852
diff --git a/core/java/android/net/NetworkQuotaInfo.java b/core/java/android/net/NetworkQuotaInfo.java
index 6535256..1725ed7 100644
--- a/core/java/android/net/NetworkQuotaInfo.java
+++ b/core/java/android/net/NetworkQuotaInfo.java
@@ -57,12 +57,12 @@
return mHardLimitBytes;
}
- /** {@inheritDoc} */
+ @Override
public int describeContents() {
return 0;
}
- /** {@inheritDoc} */
+ @Override
public void writeToParcel(Parcel out, int flags) {
out.writeLong(mEstimatedBytes);
out.writeLong(mSoftLimitBytes);
@@ -70,10 +70,12 @@
}
public static final Creator<NetworkQuotaInfo> CREATOR = new Creator<NetworkQuotaInfo>() {
+ @Override
public NetworkQuotaInfo createFromParcel(Parcel in) {
return new NetworkQuotaInfo(in);
}
+ @Override
public NetworkQuotaInfo[] newArray(int size) {
return new NetworkQuotaInfo[size];
}
diff --git a/core/java/android/net/NetworkState.java b/core/java/android/net/NetworkState.java
index 704111b..2fc69ad 100644
--- a/core/java/android/net/NetworkState.java
+++ b/core/java/android/net/NetworkState.java
@@ -52,12 +52,12 @@
subscriberId = in.readString();
}
- /** {@inheritDoc} */
+ @Override
public int describeContents() {
return 0;
}
- /** {@inheritDoc} */
+ @Override
public void writeToParcel(Parcel out, int flags) {
out.writeParcelable(networkInfo, flags);
out.writeParcelable(linkProperties, flags);
@@ -66,10 +66,12 @@
}
public static final Creator<NetworkState> CREATOR = new Creator<NetworkState>() {
+ @Override
public NetworkState createFromParcel(Parcel in) {
return new NetworkState(in);
}
+ @Override
public NetworkState[] newArray(int size) {
return new NetworkState[size];
}
diff --git a/core/java/android/net/NetworkStats.java b/core/java/android/net/NetworkStats.java
index c58725d..844d055 100644
--- a/core/java/android/net/NetworkStats.java
+++ b/core/java/android/net/NetworkStats.java
@@ -155,7 +155,7 @@
operations = parcel.createLongArray();
}
- /** {@inheritDoc} */
+ @Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(elapsedRealtime);
dest.writeInt(size);
@@ -662,16 +662,18 @@
return writer.toString();
}
- /** {@inheritDoc} */
+ @Override
public int describeContents() {
return 0;
}
public static final Creator<NetworkStats> CREATOR = new Creator<NetworkStats>() {
+ @Override
public NetworkStats createFromParcel(Parcel in) {
return new NetworkStats(in);
}
+ @Override
public NetworkStats[] newArray(int size) {
return new NetworkStats[size];
}
diff --git a/core/java/android/net/NetworkStatsHistory.java b/core/java/android/net/NetworkStatsHistory.java
index faf8a3f..0003c6e 100644
--- a/core/java/android/net/NetworkStatsHistory.java
+++ b/core/java/android/net/NetworkStatsHistory.java
@@ -130,7 +130,7 @@
totalBytes = in.readLong();
}
- /** {@inheritDoc} */
+ @Override
public void writeToParcel(Parcel out, int flags) {
out.writeLong(bucketDuration);
writeLongArray(out, bucketStart, bucketCount);
@@ -191,7 +191,7 @@
writeVarLongArray(out, operations, bucketCount);
}
- /** {@inheritDoc} */
+ @Override
public int describeContents() {
return 0;
}
@@ -586,10 +586,12 @@
}
public static final Creator<NetworkStatsHistory> CREATOR = new Creator<NetworkStatsHistory>() {
+ @Override
public NetworkStatsHistory createFromParcel(Parcel in) {
return new NetworkStatsHistory(in);
}
+ @Override
public NetworkStatsHistory[] newArray(int size) {
return new NetworkStatsHistory[size];
}
diff --git a/services/java/com/android/server/net/NetworkPolicyManagerService.java b/services/java/com/android/server/net/NetworkPolicyManagerService.java
index 77addd6..fa62e497 100644
--- a/services/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -1588,7 +1588,7 @@
}
private Handler.Callback mHandlerCallback = new Handler.Callback() {
- /** {@inheritDoc} */
+ @Override
public boolean handleMessage(Message msg) {
switch (msg.what) {
case MSG_RULES_CHANGED: {
diff --git a/services/java/com/android/server/net/NetworkStatsCollection.java b/services/java/com/android/server/net/NetworkStatsCollection.java
index 70038d9..2892a74 100644
--- a/services/java/com/android/server/net/NetworkStatsCollection.java
+++ b/services/java/com/android/server/net/NetworkStatsCollection.java
@@ -57,8 +57,6 @@
* {@link NetworkIdentitySet}, UID, set, and tag. Knows how to persist itself.
*/
public class NetworkStatsCollection implements FileRotator.Reader {
- private static final String TAG = "NetworkStatsCollection";
-
/** File header magic number: "ANET" */
private static final int FILE_MAGIC = 0x414E4554;
@@ -173,7 +171,7 @@
}
/**
- * Record given {@link NetworkStats.Entry} into this collection.
+ * Record given {@link android.net.NetworkStats.Entry} into this collection.
*/
public void recordData(NetworkIdentitySet ident, int uid, int set, int tag, long start,
long end, NetworkStats.Entry entry) {
@@ -227,7 +225,7 @@
}
}
- /** {@inheritDoc} */
+ @Override
public void read(InputStream in) throws IOException {
read(new DataInputStream(in));
}
@@ -502,7 +500,7 @@
return false;
}
- /** {@inheritDoc} */
+ @Override
public int compareTo(Key another) {
return Integer.compare(uid, another.uid);
}
diff --git a/services/java/com/android/server/net/NetworkStatsRecorder.java b/services/java/com/android/server/net/NetworkStatsRecorder.java
index 540f606..57ad158 100644
--- a/services/java/com/android/server/net/NetworkStatsRecorder.java
+++ b/services/java/com/android/server/net/NetworkStatsRecorder.java
@@ -240,22 +240,22 @@
mCollection = checkNotNull(collection, "missing NetworkStatsCollection");
}
- /** {@inheritDoc} */
+ @Override
public void reset() {
// ignored
}
- /** {@inheritDoc} */
+ @Override
public void read(InputStream in) throws IOException {
mCollection.read(in);
}
- /** {@inheritDoc} */
+ @Override
public boolean shouldWrite() {
return true;
}
- /** {@inheritDoc} */
+ @Override
public void write(OutputStream out) throws IOException {
mCollection.write(new DataOutputStream(out));
mCollection.reset();
@@ -275,24 +275,24 @@
mUid = uid;
}
- /** {@inheritDoc} */
+ @Override
public void reset() {
mTemp.reset();
}
- /** {@inheritDoc} */
+ @Override
public void read(InputStream in) throws IOException {
mTemp.read(in);
mTemp.clearDirty();
mTemp.removeUid(mUid);
}
- /** {@inheritDoc} */
+ @Override
public boolean shouldWrite() {
return mTemp.isDirty();
}
- /** {@inheritDoc} */
+ @Override
public void write(OutputStream out) throws IOException {
mTemp.write(new DataOutputStream(out));
}
diff --git a/services/java/com/android/server/net/NetworkStatsService.java b/services/java/com/android/server/net/NetworkStatsService.java
index 519d58e..4382a03 100644
--- a/services/java/com/android/server/net/NetworkStatsService.java
+++ b/services/java/com/android/server/net/NetworkStatsService.java
@@ -999,7 +999,7 @@
}
private Handler.Callback mHandlerCallback = new Handler.Callback() {
- /** {@inheritDoc} */
+ @Override
public boolean handleMessage(Message msg) {
switch (msg.what) {
case MSG_PERFORM_POLL: {
@@ -1038,7 +1038,7 @@
}
private class DropBoxNonMonotonicObserver implements NonMonotonicObserver<String> {
- /** {@inheritDoc} */
+ @Override
public void foundNonMonotonic(NetworkStats left, int leftIndex, NetworkStats right,
int rightIndex, String cookie) {
Log.w(TAG, "found non-monotonic values; saving to dropbox");
@@ -1057,7 +1057,8 @@
}
/**
- * Default external settings that read from {@link Settings.Secure}.
+ * Default external settings that read from
+ * {@link android.provider.Settings.Secure}.
*/
private static class DefaultNetworkStatsSettings implements NetworkStatsSettings {
private final ContentResolver mResolver;
@@ -1075,19 +1076,24 @@
return Settings.Secure.getInt(mResolver, name, defInt) != 0;
}
+ @Override
public long getPollInterval() {
return getSecureLong(NETSTATS_POLL_INTERVAL, 30 * MINUTE_IN_MILLIS);
}
+ @Override
public long getTimeCacheMaxAge() {
return getSecureLong(NETSTATS_TIME_CACHE_MAX_AGE, DAY_IN_MILLIS);
}
+ @Override
public long getGlobalAlertBytes() {
return getSecureLong(NETSTATS_GLOBAL_ALERT_BYTES, 2 * MB_IN_BYTES);
}
+ @Override
public boolean getSampleEnabled() {
return getSecureBoolean(NETSTATS_SAMPLE_ENABLED, true);
}
+ @Override
public Config getDevConfig() {
return new Config(getSecureLong(NETSTATS_DEV_BUCKET_DURATION, HOUR_IN_MILLIS),
getSecureLong(NETSTATS_DEV_PERSIST_BYTES, 2 * MB_IN_BYTES),
@@ -1095,6 +1101,7 @@
getSecureLong(NETSTATS_DEV_DELETE_AGE, 90 * DAY_IN_MILLIS));
}
+ @Override
public Config getUidConfig() {
return new Config(getSecureLong(NETSTATS_UID_BUCKET_DURATION, 2 * HOUR_IN_MILLIS),
getSecureLong(NETSTATS_UID_PERSIST_BYTES, 2 * MB_IN_BYTES),
@@ -1102,6 +1109,7 @@
getSecureLong(NETSTATS_UID_DELETE_AGE, 90 * DAY_IN_MILLIS));
}
+ @Override
public Config getUidTagConfig() {
return new Config(getSecureLong(NETSTATS_UID_BUCKET_DURATION, 2 * HOUR_IN_MILLIS),
getSecureLong(NETSTATS_UID_PERSIST_BYTES, 2 * MB_IN_BYTES),
diff --git a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
index 2033db6..ba3fd3c 100644
--- a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
@@ -981,7 +981,7 @@
}
}
- /** {@inheritDoc} */
+ @Override
public boolean queueIdle() {
set(null);
return false;