Fixed
Status Update
Comments
ja...@google.com <ja...@google.com>
tn...@google.com <tn...@google.com> #2
It's highlighted in the IDE (import list) as well, so this isn't a CLI vs IDE discrepancy issue.
But I should really just not flag these references in imports at all.
But I should really just not flag these references in imports at all.
tn...@google.com <tn...@google.com> #3
Fix pending in ag/3687366
tn...@google.com <tn...@google.com> #4
Fixed by Change-Id: I068a073e80a7247a9a54ff48f7aa14d0f5a3b3e2. Thanks for the report!
tn...@google.com <tn...@google.com> #5
(Fix will be in 3.2 canary 7)
Description
Given the following code:
if (Build.VERSION.SDK_INT == 26) {
// This attribute can only be set in code on API 26. It's in our theme XML on 27+.
window.decorView.systemUiVisibility = SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
}
Lint correctly displays no error as the usage is correctly guarded by SDK_INT.
When I run the 'lint' task from the command-line, however, it reports a problem with the property import:
MainActivity.kt:6: Warning: Field requires API level 26 (current min is 24): android.view.View#SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR [InlinedApi]
import android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~