Implement quickfixes for Android Lint api issues
#KT-16624 Fixed #KT-16625 Fixed #KT-14947 Fixed
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Suppress: Add @SuppressLint("SdCardPath") annotation
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintSdCardPathInspection
|
||||
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user