Only use VcnManager&VcnNetworkPolicyListener API when SDK match

Only create the listener when it's on S devices.
For unit test, create the mock inside the test class with SDK check to avoid setup failure due to VcnManager/VcnNetworkPolicyListener not existing on Android R.
Use AnswerWithArguments to replace lambda to avoid Junit initializationError.

Bug: 181379244
Test: atest FrameworksWifiTests

Change-Id: If9f7c3098294a27cf7b1cb3f3a0fd229aae2848b
2 files changed