Switch to 181 platform
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INTENTION_NOT_AVAILABLE
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INTENTION_NOT_AVAILABLE
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation class SomeAnnotationWithClass(val cls: KClass<*>)
|
||||
|
||||
@SomeAnnotationWithClass(<caret>VectorDrawable::class)
|
||||
class VectorDrawableProvider {
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INTENTION_NOT_AVAILABLE
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INTENTION_NOT_AVAILABLE
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
fun withDefaultParameter(vector: VectorDrawable = <caret>VectorDrawable()) {
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
data class ValueProvider(var p1: VectorDrawable, val p2: Int)
|
||||
|
||||
val activity = Activity()
|
||||
fun foo() {
|
||||
val (v1, v2) = ValueProvider(<caret>VectorDrawable(), 0)
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
data class ValueProvider(var p1: VectorDrawable, val p2: Int)
|
||||
|
||||
val activity = Activity()
|
||||
fun foo() {
|
||||
val (v1, v2) = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
ValueProvider(VectorDrawable(), 0)
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < LOLLIPOP")
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable = <caret>VectorDrawable()
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
VectorDrawable()
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < LOLLIPOP")
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
with(this) {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
with(this) {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
VectorDrawable()
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < LOLLIPOP")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
val v: VectorDrawable
|
||||
get() = <caret>VectorDrawable()
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
val v: VectorDrawable
|
||||
get() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
VectorDrawable()
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < LOLLIPOP")
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
if (flag)
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
if (flag)
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
VectorDrawable()
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < LOLLIPOP")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
if (flag) {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
if (flag) {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
VectorDrawable()
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < LOLLIPOP")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintInlinedApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintInlinedApiInspection
|
||||
|
||||
class Test {
|
||||
fun foo(): Int {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import android.os.Build
|
||||
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintInlinedApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintInlinedApiInspection
|
||||
|
||||
class Test {
|
||||
fun foo(): Int {
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
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 {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
android.R.attr.windowTranslucentStatus
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < KITKAT")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
VectorDrawable()
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < LOLLIPOP")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return when (flag) {
|
||||
true -> <caret>VectorDrawable()
|
||||
else -> VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return when (flag) {
|
||||
true -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
VectorDrawable()
|
||||
} else {
|
||||
TODO("VERSION.SDK_INT < LOLLIPOP")
|
||||
}
|
||||
else -> VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user