Switch test code away from libcore internals

The test code here was using libcore platform internals which
can be replaced by test support code instead.

Bug: 113148576
Test: Run CTS
Change-Id: I51041f400e93bfe0dda0cd822915f1d29e8248c7
3 files changed