Fixed
Status Update
Comments
vi...@google.com <vi...@google.com> #2
Thank you for your feedback. Team may reach out for more feedback in reproducing or triaging this issue.
tn...@google.com <tn...@google.com> #4
This is now fixed by Change-Id: I0ba284f52e62015af95aff8c5e83539b5a888e81 ; the fix will go out in 4.0 Canary 8. Thanks for the report!
Description
- Create Android app, with minSdkVersion of 19
- Inside the main activity class, add the following code (see also attached screenshot):
val cm = applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
fun works1() = cm.activeNetwork
private fun works2() = cm.activeNetwork
suspend fun works3() = cm.activeNetwork
private suspend fun fails() = cm.activeNetwork
Expected result: Accessing activeNetwork of ConnectivityManager is flagged as error in all cases, since it requires API level 23.
Actual result: Inside a private suspend function, the access is not flagged as error.
Build: AI-191.8026.42.35.5791312, 201908090002, AI-191.8026.42.35.5791312, JRE 1.8.0_202-release-1483-b49-5587405x64 JetBrains s.r.o, OS Linux(amd64) v4.15.0-62-generic, screens 1920x1200AS: 3.5; Android Gradle Plugin: 3.5.0; Gradle: 5.6.2; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found) IMPORTANT: Please read