Remove as31 bunch files
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSupportAnnotationUsageInspection
|
||||
// DEPENDENCY: IntRange.java -> android/support/annotation/IntRange.java
|
||||
// DEPENDENCY: RequiresPermission.java -> android/support/annotation/RequiresPermission.java
|
||||
|
||||
|
||||
import android.support.annotation.IntRange
|
||||
import android.support.annotation.RequiresPermission
|
||||
import android.Manifest
|
||||
import android.view.View
|
||||
|
||||
const val constantVal = 0L
|
||||
|
||||
<error descr="Invalid range: the `from` attribute must be less than the `to` attribute">@IntRange(from = 10, to = 0)</error>
|
||||
fun invalidRange1a(): Int = 5
|
||||
|
||||
@IntRange(from = constantVal, to = 10) // ok
|
||||
fun invalidRange0b(): Int = 5
|
||||
|
||||
<error descr="Invalid range: the `from` attribute must be less than the `to` attribute">@IntRange(from = 10, to = constantVal)</error>
|
||||
fun invalidRange1b(): Int = 5
|
||||
|
||||
|
||||
// should be ok, KT-16600
|
||||
@RequiresPermission(anyOf = arrayOf(Manifest.permission.ACCESS_CHECKIN_PROPERTIES,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION))
|
||||
fun needsPermissions1() { }
|
||||
|
||||
// should be ok, KT-16600
|
||||
@RequiresPermission(Manifest.permission.ACCESS_CHECKIN_PROPERTIES)
|
||||
fun needsPermissions2() { }
|
||||
|
||||
// error
|
||||
<error descr="Only specify one of `value`, `anyOf` or `allOf`">@RequiresPermission(
|
||||
value = Manifest.permission.ACCESS_CHECKIN_PROPERTIES,
|
||||
anyOf = arrayOf(Manifest.permission.ACCESS_CHECKIN_PROPERTIES, Manifest.permission.ACCESS_FINE_LOCATION))</error>
|
||||
fun needsPermissions3() { }
|
||||
@@ -1,14 +0,0 @@
|
||||
// INTENTION_TEXT: Add Parcelable Implementation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintParcelCreatorInspection
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
|
||||
class <caret>MissingCreator : Parcelable {
|
||||
override fun writeToParcel(dest: Parcel?, flags: Int) {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
override fun describeContents(): Int {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
// INTENTION_TEXT: Add Parcelable Implementation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintParcelCreatorInspection
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
|
||||
class MissingCreator() : Parcelable {
|
||||
constructor(parcel: Parcel) : this() {
|
||||
}
|
||||
|
||||
override fun writeToParcel(dest: Parcel?, flags: Int) {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
override fun describeContents(): Int {
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
companion object CREATOR : Parcelable.Creator<MissingCreator> {
|
||||
override fun createFromParcel(parcel: Parcel): MissingCreator {
|
||||
return MissingCreator(parcel)
|
||||
}
|
||||
|
||||
override fun newArray(size: Int): Array<MissingCreator?> {
|
||||
return arrayOfNulls(size)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// INTENTION_TEXT: Add Parcelable Implementation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintParcelCreatorInspection
|
||||
import android.os.Parcelable
|
||||
|
||||
class <caret>NoImplementation : Parcelable
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
// INTENTION_TEXT: Add Parcelable Implementation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintParcelCreatorInspection
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
|
||||
class NoImplementation() : Parcelable {
|
||||
constructor(parcel: Parcel) : this() {
|
||||
}
|
||||
|
||||
override fun writeToParcel(parcel: Parcel, flags: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun describeContents(): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
companion object CREATOR : Parcelable.Creator<NoImplementation> {
|
||||
override fun createFromParcel(parcel: Parcel): NoImplementation {
|
||||
return NoImplementation(parcel)
|
||||
}
|
||||
|
||||
override fun newArray(size: Int): Array<NoImplementation?> {
|
||||
return arrayOfNulls(size)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
companion object {
|
||||
val VECTOR_DRAWABLE = <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
class VectorDrawableProvider {
|
||||
companion object {
|
||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
val VECTOR_DRAWABLE = VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
fun withDefaultParameter(vector: VectorDrawable = <caret>VectorDrawable()) {
|
||||
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun withDefaultParameter(vector: VectorDrawable = VectorDrawable()) {
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class MyVectorDrawable : <caret>VectorDrawable() {
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
class MyVectorDrawable : VectorDrawable() {
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
with(this) {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
class VectorDrawableProvider {
|
||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
with(this) {
|
||||
return VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(KITKAT) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintInlinedApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
class Test {
|
||||
fun foo(): Int {
|
||||
return android.R.attr.<caret>windowTranslucentStatus
|
||||
}
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
// INTENTION_TEXT: Add @RequiresApi(KITKAT) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintInlinedApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
class Test {
|
||||
@RequiresApi(Build.VERSION_CODES.KITKAT)
|
||||
fun foo(): Int {
|
||||
return android.R.attr.windowTranslucentStatus
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
class VectorDrawableProvider {
|
||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val VECTOR_DRAWABLE = <caret>VectorDrawable()
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
class VectorDrawableProvider {
|
||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
val VECTOR_DRAWABLE = VectorDrawable()
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(M) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
import android.app.Activity
|
||||
|
||||
val top: Int
|
||||
get() = Activity().<caret>checkSelfPermission(READ_CONTACTS)
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(M) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
import android.app.Activity
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
val top: Int
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
get() = Activity().checkSelfPermission(READ_CONTACTS)
|
||||
@@ -1,15 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return when (flag) {
|
||||
true -> <caret>VectorDrawable()
|
||||
else -> VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
import android.support.annotation.RequiresApi
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return when (flag) {
|
||||
true -> VectorDrawable()
|
||||
else -> VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Environment
|
||||
|
||||
|
||||
class MainActivity : Activity() {
|
||||
fun getSdCard(fromEnvironment: Boolean) = if (fromEnvironment) Environment.getExternalStorageDirectory().path else "<caret>/sdcard"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.os.Environment
|
||||
|
||||
|
||||
class MainActivity : Activity() {
|
||||
@SuppressLint("SdCardPath")
|
||||
fun getSdCard(fromEnvironment: Boolean) = if (fromEnvironment) Environment.getExternalStorageDirectory().path else "/sdcard"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.os.Environment
|
||||
|
||||
|
||||
class MainActivity : Activity() {
|
||||
@SuppressLint("Something")
|
||||
fun getSdCard(fromEnvironment: Boolean) = if (fromEnvironment) Environment.getExternalStorageDirectory().path else "<caret>/sdcard"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.os.Environment
|
||||
|
||||
|
||||
class MainActivity : Activity() {
|
||||
@SuppressLint("Something", "SdCardPath")
|
||||
fun getSdCard(fromEnvironment: Boolean) = if (fromEnvironment) Environment.getExternalStorageDirectory().path else "/sdcard"
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
class SdCard(val path: String = "<caret>/sdcard")
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
class SdCard(@SuppressLint("SdCardPath") val path: String = "/sdcard")
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
fun foo() {
|
||||
val (a: String, b: String) = "<caret>/sdcard"
|
||||
}
|
||||
|
||||
operator fun CharSequence.component1(): String = "component1"
|
||||
operator fun CharSequence.component2(): String = "component2"
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
@SuppressLint("SdCardPath")
|
||||
fun foo() {
|
||||
val (a: String, b: String) = "/sdcard"
|
||||
}
|
||||
|
||||
operator fun CharSequence.component1(): String = "component1"
|
||||
operator fun CharSequence.component2(): String = "component2"
|
||||
@@ -1,10 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
fun foo(l: Any) = l
|
||||
|
||||
fun bar() {
|
||||
foo() {
|
||||
"<caret>/sdcard"
|
||||
}
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
fun foo(l: Any) = l
|
||||
|
||||
@SuppressLint("SdCardPath")
|
||||
fun bar() {
|
||||
foo() {
|
||||
"<caret>/sdcard"
|
||||
}
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
fun foo(l: Any) = l
|
||||
|
||||
val bar = foo() { "<caret>/sdcard" }
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
fun foo(l: Any) = l
|
||||
|
||||
@SuppressLint("SdCardPath")
|
||||
val bar = foo() { "/sdcard" }
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
fun foo(path: String = "<caret>/sdcard") = path
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
fun foo(@SuppressLint("SdCardPath") path: String = "/sdcard") = path
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
val getPath = { "<caret>/sdcard" }
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
@SuppressLint("SdCardPath")
|
||||
val getPath = { "/sdcard" }
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
val path = "<caret>/sdcard"
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintSdCardPathInspection
|
||||
|
||||
@SuppressLint("SdCardPath")
|
||||
val path = "/sdcard"
|
||||
@@ -1,10 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
companion object {
|
||||
val VECTOR_DRAWABLE = <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
companion object {
|
||||
val VECTOR_DRAWABLE = VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
fun withDefaultParameter(vector: VectorDrawable = <caret>VectorDrawable()) {
|
||||
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun withDefaultParameter(vector: VectorDrawable = VectorDrawable()) {
|
||||
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class MyVectorDrawable : <caret>VectorDrawable() {
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
class MyVectorDrawable : VectorDrawable() {
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
with(this) {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
with(this) {
|
||||
return VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(KITKAT) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintInlinedApiInspection
|
||||
|
||||
class Test {
|
||||
fun foo(): Int {
|
||||
return android.R.attr.<caret>windowTranslucentStatus
|
||||
}
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
import android.annotation.TargetApi
|
||||
import android.os.Build
|
||||
|
||||
// INTENTION_TEXT: Add @TargetApi(KITKAT) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintInlinedApiInspection
|
||||
|
||||
class Test {
|
||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
||||
fun foo(): Int {
|
||||
return android.R.attr.windowTranslucentStatus
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val VECTOR_DRAWABLE = <caret>VectorDrawable()
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
class VectorDrawableProvider {
|
||||
val VECTOR_DRAWABLE = VectorDrawable()
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(M) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
import android.app.Activity
|
||||
|
||||
val top: Int
|
||||
get() = Activity().<caret>checkSelfPermission(READ_CONTACTS)
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(M) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
import android.annotation.TargetApi
|
||||
import android.app.Activity
|
||||
import android.os.Build
|
||||
|
||||
val top: Int
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
get() = Activity().checkSelfPermission(READ_CONTACTS)
|
||||
@@ -1,14 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return when (flag) {
|
||||
true -> <caret>VectorDrawable()
|
||||
else -> VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import android.os.Build
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return when (flag) {
|
||||
true -> VectorDrawable()
|
||||
else -> VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INTENTION_NOT_AVAILABLE
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation class SomeAnnotationWithClass(val cls: KClass<*>)
|
||||
|
||||
@SomeAnnotationWithClass(<caret>VectorDrawable::class)
|
||||
class VectorDrawableProvider {
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INTENTION_NOT_AVAILABLE
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
fun withDefaultParameter(vector: VectorDrawable = <caret>VectorDrawable()) {
|
||||
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
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)
|
||||
}
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
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,8 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable = <caret>VectorDrawable()
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
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")
|
||||
}
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
with(this) {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
val v: VectorDrawable
|
||||
get() = <caret>VectorDrawable()
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
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,12 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
if (flag)
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
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,13 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
if (flag) {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection
|
||||
|
||||
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,8 +0,0 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) { ... }
|
||||
// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintInlinedApiInspection
|
||||
|
||||
class Test {
|
||||
fun foo(): Int {
|
||||
return android.R.attr.<caret>windowTranslucentStatus
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user