Use java.util.Objects instead on internal API

Not needed since java.util.Objects implements all the needed
functionality.

Change-Id: Icd31d49a9801d1705427f028e9ac927d58e7d34c
This commit is contained in:
Kenny Root
2013-12-13 12:00:26 -08:00
parent fb4d3e7a4a
commit 9254db342a
4 changed files with 17 additions and 16 deletions

View File

@@ -34,7 +34,6 @@ import android.util.AtomicFile;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.FileRotator;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.Objects;
import com.google.android.collect.Lists;
import com.google.android.collect.Maps;
@@ -50,6 +49,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import libcore.io.IoUtils;
@@ -508,7 +508,7 @@ public class NetworkStatsCollection implements FileRotator.Reader {
this.uid = uid;
this.set = set;
this.tag = tag;
hashCode = Objects.hashCode(ident, uid, set, tag);
hashCode = Objects.hash(ident, uid, set, tag);
}
@Override
@@ -521,7 +521,7 @@ public class NetworkStatsCollection implements FileRotator.Reader {
if (obj instanceof Key) {
final Key key = (Key) obj;
return uid == key.uid && set == key.set && tag == key.tag
&& Objects.equal(ident, key.ident);
&& Objects.equals(ident, key.ident);
}
return false;
}