OSDN Git Service

Refactor CompareResult<> class and its call sites
authorRubin Xu <rubinxu@google.com>
Tue, 22 Aug 2017 15:35:52 +0000 (16:35 +0100)
committerRubin Xu <rubinxu@google.com>
Fri, 8 Sep 2017 12:27:58 +0000 (13:27 +0100)
commit2fc72f72e5125287b006f6c5e69d64fbc2c245af
treef9a5cba0ddcd2c122a315b5db5d5f47a4f4031d0
parent8c3e12a904e9f27ea2335accd031a20f20602635
Refactor CompareResult<> class and its call sites

Move all corner case logic from call sites to CompareResult's implementation,
add a constructor to directly do the comparison.

Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Change-Id: I95bba82ec38d295b18c49c025dffab5f17271cbd
core/java/android/net/LinkProperties.java
core/tests/coretests/src/android/net/LinkPropertiesTest.java
services/core/java/com/android/server/ConnectivityService.java