Created
August 17, 2017 20:13
-
-
Save tadfisher/206443b9584518d370e892f92726e03f to your computer and use it in GitHub Desktop.
AutofillKiller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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