Find PreferenceManager.getDefaultSharedPreferences(...) calls

Proprietary

android.preference.* (framework) was deprecated in API 29. AndroidX androidx.preference.* is the supported path, and even there the modern shape for KV state is Jetpack DataStore (Preferences DataStore for key/value, Proto DataStore for typed records) — which works in suspend contexts and survives process death without main-thread blocking.

org.openrewrite.kotlin.android.FindPreferenceManagerGetDefaultSharedPreferences$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.android.FindPreferenceManagerGetDefaultSharedPreferences$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.