Skip to content

Instantly share code, notes, and snippets.

@tadfisher
Created August 17, 2017 20:13
Show Gist options
  • Save tadfisher/206443b9584518d370e892f92726e03f to your computer and use it in GitHub Desktop.
Save tadfisher/206443b9584518d370e892f92726e03f to your computer and use it in GitHub Desktop.
AutofillKiller
import android.os.Build
import android.view.View
import io.github.inflationx.viewpump.InflateResult
import io.github.inflationx.viewpump.Interceptor
import javax.inject.Inject
class AutofillKillerInterceptor : Interceptor {
override fun intercept(chain: Interceptor.Chain): InflateResult {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
return chain.proceed(chain.request())
}
val result = chain.proceed(chain.request())
result.view()?.importantForAutofill = View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS
return result
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment