Register Android api quickfixes for inlined api inspection

#KT-14857 Fixed
This commit is contained in:
Vyacheslav Gerasimov
2017-04-07 18:30:42 +03:00
parent 70d24d0108
commit 1d134ffc72
8 changed files with 90 additions and 0 deletions
@@ -0,0 +1,8 @@
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) { ... }
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintInlinedApiInspection
class Test {
fun foo(): Int {
return android.R.attr.<caret>windowTranslucentStatus
}
}
@@ -0,0 +1,12 @@
import android.os.Build
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) { ... }
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintInlinedApiInspection
class Test {
fun foo(): Int {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return android.R.attr.windowTranslucentStatus
}
}
}