Skip to content

Commit bfdd680

Browse files
committed
Migrate to @OverRide to remove warnings.
Bug: 6303344 Change-Id: I0d33b2ed448467379d576ccd71fb5ae20c878852
1 parent 081cc9a commit bfdd680

File tree

9 files changed

+40
-26
lines changed

9 files changed

+40
-26
lines changed

core/java/android/net/NetworkQuotaInfo.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,25 @@ public long getHardLimitBytes() {
5757
return mHardLimitBytes;
5858
}
5959

60-
/** {@inheritDoc} */
60+
@Override
6161
public int describeContents() {
6262
return 0;
6363
}
6464

65-
/** {@inheritDoc} */
65+
@Override
6666
public void writeToParcel(Parcel out, int flags) {
6767
out.writeLong(mEstimatedBytes);
6868
out.writeLong(mSoftLimitBytes);
6969
out.writeLong(mHardLimitBytes);
7070
}
7171

7272
public static final Creator<NetworkQuotaInfo> CREATOR = new Creator<NetworkQuotaInfo>() {
73+
@Override
7374
public NetworkQuotaInfo createFromParcel(Parcel in) {
7475
return new NetworkQuotaInfo(in);
7576
}
7677

78+
@Override
7779
public NetworkQuotaInfo[] newArray(int size) {
7880
return new NetworkQuotaInfo[size];
7981
}

core/java/android/net/NetworkState.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public NetworkState(Parcel in) {
5252
subscriberId = in.readString();
5353
}
5454

55-
/** {@inheritDoc} */
55+
@Override
5656
public int describeContents() {
5757
return 0;
5858
}
5959

60-
/** {@inheritDoc} */
60+
@Override
6161
public void writeToParcel(Parcel out, int flags) {
6262
out.writeParcelable(networkInfo, flags);
6363
out.writeParcelable(linkProperties, flags);
@@ -66,10 +66,12 @@ public void writeToParcel(Parcel out, int flags) {
6666
}
6767

6868
public static final Creator<NetworkState> CREATOR = new Creator<NetworkState>() {
69+
@Override
6970
public NetworkState createFromParcel(Parcel in) {
7071
return new NetworkState(in);
7172
}
7273

74+
@Override
7375
public NetworkState[] newArray(int size) {
7476
return new NetworkState[size];
7577
}

core/java/android/net/NetworkStats.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public NetworkStats(Parcel parcel) {
155155
operations = parcel.createLongArray();
156156
}
157157

158-
/** {@inheritDoc} */
158+
@Override
159159
public void writeToParcel(Parcel dest, int flags) {
160160
dest.writeLong(elapsedRealtime);
161161
dest.writeInt(size);
@@ -662,16 +662,18 @@ public String toString() {
662662
return writer.toString();
663663
}
664664

665-
/** {@inheritDoc} */
665+
@Override
666666
public int describeContents() {
667667
return 0;
668668
}
669669

670670
public static final Creator<NetworkStats> CREATOR = new Creator<NetworkStats>() {
671+
@Override
671672
public NetworkStats createFromParcel(Parcel in) {
672673
return new NetworkStats(in);
673674
}
674675

676+
@Override
675677
public NetworkStats[] newArray(int size) {
676678
return new NetworkStats[size];
677679
}

core/java/android/net/NetworkStatsHistory.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public NetworkStatsHistory(Parcel in) {
130130
totalBytes = in.readLong();
131131
}
132132

133-
/** {@inheritDoc} */
133+
@Override
134134
public void writeToParcel(Parcel out, int flags) {
135135
out.writeLong(bucketDuration);
136136
writeLongArray(out, bucketStart, bucketCount);
@@ -191,7 +191,7 @@ public void writeToStream(DataOutputStream out) throws IOException {
191191
writeVarLongArray(out, operations, bucketCount);
192192
}
193193

194-
/** {@inheritDoc} */
194+
@Override
195195
public int describeContents() {
196196
return 0;
197197
}
@@ -586,10 +586,12 @@ public String toString() {
586586
}
587587

588588
public static final Creator<NetworkStatsHistory> CREATOR = new Creator<NetworkStatsHistory>() {
589+
@Override
589590
public NetworkStatsHistory createFromParcel(Parcel in) {
590591
return new NetworkStatsHistory(in);
591592
}
592593

594+
@Override
593595
public NetworkStatsHistory[] newArray(int size) {
594596
return new NetworkStatsHistory[size];
595597
}

services/java/com/android/server/net/NetworkPolicyManagerService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ private void updateRulesForUidLocked(int uid) {
15881588
}
15891589

15901590
private Handler.Callback mHandlerCallback = new Handler.Callback() {
1591-
/** {@inheritDoc} */
1591+
@Override
15921592
public boolean handleMessage(Message msg) {
15931593
switch (msg.what) {
15941594
case MSG_RULES_CHANGED: {

services/java/com/android/server/net/NetworkStatsCollection.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
* {@link NetworkIdentitySet}, UID, set, and tag. Knows how to persist itself.
5858
*/
5959
public class NetworkStatsCollection implements FileRotator.Reader {
60-
private static final String TAG = "NetworkStatsCollection";
61-
6260
/** File header magic number: "ANET" */
6361
private static final int FILE_MAGIC = 0x414E4554;
6462

@@ -173,7 +171,7 @@ public NetworkStats getSummary(NetworkTemplate template, long start, long end) {
173171
}
174172

175173
/**
176-
* Record given {@link NetworkStats.Entry} into this collection.
174+
* Record given {@link android.net.NetworkStats.Entry} into this collection.
177175
*/
178176
public void recordData(NetworkIdentitySet ident, int uid, int set, int tag, long start,
179177
long end, NetworkStats.Entry entry) {
@@ -227,7 +225,7 @@ private NetworkStatsHistory findOrCreateHistory(
227225
}
228226
}
229227

230-
/** {@inheritDoc} */
228+
@Override
231229
public void read(InputStream in) throws IOException {
232230
read(new DataInputStream(in));
233231
}
@@ -502,7 +500,7 @@ public boolean equals(Object obj) {
502500
return false;
503501
}
504502

505-
/** {@inheritDoc} */
503+
@Override
506504
public int compareTo(Key another) {
507505
return Integer.compare(uid, another.uid);
508506
}

services/java/com/android/server/net/NetworkStatsRecorder.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,22 +240,22 @@ public CombiningRewriter(NetworkStatsCollection collection) {
240240
mCollection = checkNotNull(collection, "missing NetworkStatsCollection");
241241
}
242242

243-
/** {@inheritDoc} */
243+
@Override
244244
public void reset() {
245245
// ignored
246246
}
247247

248-
/** {@inheritDoc} */
248+
@Override
249249
public void read(InputStream in) throws IOException {
250250
mCollection.read(in);
251251
}
252252

253-
/** {@inheritDoc} */
253+
@Override
254254
public boolean shouldWrite() {
255255
return true;
256256
}
257257

258-
/** {@inheritDoc} */
258+
@Override
259259
public void write(OutputStream out) throws IOException {
260260
mCollection.write(new DataOutputStream(out));
261261
mCollection.reset();
@@ -275,24 +275,24 @@ public RemoveUidRewriter(long bucketDuration, int uid) {
275275
mUid = uid;
276276
}
277277

278-
/** {@inheritDoc} */
278+
@Override
279279
public void reset() {
280280
mTemp.reset();
281281
}
282282

283-
/** {@inheritDoc} */
283+
@Override
284284
public void read(InputStream in) throws IOException {
285285
mTemp.read(in);
286286
mTemp.clearDirty();
287287
mTemp.removeUid(mUid);
288288
}
289289

290-
/** {@inheritDoc} */
290+
@Override
291291
public boolean shouldWrite() {
292292
return mTemp.isDirty();
293293
}
294294

295-
/** {@inheritDoc} */
295+
@Override
296296
public void write(OutputStream out) throws IOException {
297297
mTemp.write(new DataOutputStream(out));
298298
}

services/java/com/android/server/net/NetworkStatsService.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ private NetworkStats getNetworkStatsTethering() throws RemoteException {
999999
}
10001000

10011001
private Handler.Callback mHandlerCallback = new Handler.Callback() {
1002-
/** {@inheritDoc} */
1002+
@Override
10031003
public boolean handleMessage(Message msg) {
10041004
switch (msg.what) {
10051005
case MSG_PERFORM_POLL: {
@@ -1038,7 +1038,7 @@ private boolean isBandwidthControlEnabled() {
10381038
}
10391039

10401040
private class DropBoxNonMonotonicObserver implements NonMonotonicObserver<String> {
1041-
/** {@inheritDoc} */
1041+
@Override
10421042
public void foundNonMonotonic(NetworkStats left, int leftIndex, NetworkStats right,
10431043
int rightIndex, String cookie) {
10441044
Log.w(TAG, "found non-monotonic values; saving to dropbox");
@@ -1057,7 +1057,8 @@ public void foundNonMonotonic(NetworkStats left, int leftIndex, NetworkStats rig
10571057
}
10581058

10591059
/**
1060-
* Default external settings that read from {@link Settings.Secure}.
1060+
* Default external settings that read from
1061+
* {@link android.provider.Settings.Secure}.
10611062
*/
10621063
private static class DefaultNetworkStatsSettings implements NetworkStatsSettings {
10631064
private final ContentResolver mResolver;
@@ -1075,33 +1076,40 @@ private boolean getSecureBoolean(String name, boolean def) {
10751076
return Settings.Secure.getInt(mResolver, name, defInt) != 0;
10761077
}
10771078

1079+
@Override
10781080
public long getPollInterval() {
10791081
return getSecureLong(NETSTATS_POLL_INTERVAL, 30 * MINUTE_IN_MILLIS);
10801082
}
1083+
@Override
10811084
public long getTimeCacheMaxAge() {
10821085
return getSecureLong(NETSTATS_TIME_CACHE_MAX_AGE, DAY_IN_MILLIS);
10831086
}
1087+
@Override
10841088
public long getGlobalAlertBytes() {
10851089
return getSecureLong(NETSTATS_GLOBAL_ALERT_BYTES, 2 * MB_IN_BYTES);
10861090
}
1091+
@Override
10871092
public boolean getSampleEnabled() {
10881093
return getSecureBoolean(NETSTATS_SAMPLE_ENABLED, true);
10891094
}
10901095

1096+
@Override
10911097
public Config getDevConfig() {
10921098
return new Config(getSecureLong(NETSTATS_DEV_BUCKET_DURATION, HOUR_IN_MILLIS),
10931099
getSecureLong(NETSTATS_DEV_PERSIST_BYTES, 2 * MB_IN_BYTES),
10941100
getSecureLong(NETSTATS_DEV_ROTATE_AGE, 15 * DAY_IN_MILLIS),
10951101
getSecureLong(NETSTATS_DEV_DELETE_AGE, 90 * DAY_IN_MILLIS));
10961102
}
10971103

1104+
@Override
10981105
public Config getUidConfig() {
10991106
return new Config(getSecureLong(NETSTATS_UID_BUCKET_DURATION, 2 * HOUR_IN_MILLIS),
11001107
getSecureLong(NETSTATS_UID_PERSIST_BYTES, 2 * MB_IN_BYTES),
11011108
getSecureLong(NETSTATS_UID_ROTATE_AGE, 15 * DAY_IN_MILLIS),
11021109
getSecureLong(NETSTATS_UID_DELETE_AGE, 90 * DAY_IN_MILLIS));
11031110
}
11041111

1112+
@Override
11051113
public Config getUidTagConfig() {
11061114
return new Config(getSecureLong(NETSTATS_UID_BUCKET_DURATION, 2 * HOUR_IN_MILLIS),
11071115
getSecureLong(NETSTATS_UID_PERSIST_BYTES, 2 * MB_IN_BYTES),

services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ public Void get() throws InterruptedException, ExecutionException {
981981
}
982982
}
983983

984-
/** {@inheritDoc} */
984+
@Override
985985
public boolean queueIdle() {
986986
set(null);
987987
return false;

0 commit comments

Comments
 (0)