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
3 files changed
tree: 3a9d7b9a2397ac9059a378227e9277ef1692c7ec
  1. core/
  2. services/
  3. tests/