Migrate to @Override to remove warnings.
Bug: 6303344
Change-Id: I0d33b2ed448467379d576ccd71fb5ae20c878852
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),