Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
I've found this code fragment in the newest API 23 SDK's source code
WifiServiceImpl.java Line964
if (!canReadPeerMacAddresses && !isActiveNetworkScorer && !isLocationEnabled()) {
return new ArrayList<ScanResult>();
}
It could explain this issue.The method "isLocationEnabled" read Location settings then returns false at this condition, and getScanResults returns null.
WifiServiceImpl.java Line964
if (!canReadPeerMacAddresses && !isActiveNetworkScorer && !isLocationEnabled()) {
return new ArrayList<ScanResult>();
}
It could explain this issue.The method "isLocationEnabled" read Location settings then returns false at this condition, and getScanResults returns null.
[Deleted User] <[Deleted User]> #3
Thank you for your comment.
getScanResults() returns current results on Lollipop and older even if GPS is disabled.
Scan results should have no relation to GPS.
getScanResults() returns current results on Lollipop and older even if GPS is disabled.
Scan results should have no relation to GPS.
nk...@google.com <nk...@google.com>
sl...@google.com <sl...@google.com> #4
I had confirmed the same with Nexus 5 Preview 3 (build num.: MPA44G).
Description
Version used:0.5
What steps will reproduce the problem?
1. Have a test wtih @RequiresDevice in the suite
2. Create an emulator with x86_64 ABI
3. Run suite from step #1 on emulator from #2
How are you running your tests (via Android Studio, Gradle, adb, etc.)?
Android Studio, but I don't think it matters
Expected output: @RequiresDevice test is not executed
Actual output: @RequiresDevice test IS executed
TestRequestBuilder$RequiresDeviceFilter checks for "goldfish" value on Build.HARDWARE which is correct for ABI x86, but not for ABI x86_64 - value is "ranchu" there.