Fixed bugs in Kotlin Android Lint CleanupDetector
#KT-14780 Fixed #KT-14677 Fixed (cherry picked from commit f591b4958e4a836d37d70c2ad8ff15e626c6342a)
This commit is contained in:
+5
@@ -66,4 +66,9 @@ class SharedPrefsText(context: Context) : Activity() {
|
||||
val editor = preferences.<warning descr="`SharedPreferences.edit()` without a corresponding `commit()` or `apply()` call"><warning descr="`SharedPreferences.edit()` without a corresponding `commit()` or `apply()` call">edit()</warning></warning>
|
||||
editor.putString("foo", "bar")
|
||||
}
|
||||
|
||||
fun testResultOfCommit() {
|
||||
val r1 = PreferenceManager.getDefaultSharedPreferences(this).edit().putString("wat", "wat").commit()
|
||||
val r2 = PreferenceManager.getDefaultSharedPreferences(this).edit().putString("wat", "wat").commit().toString()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user