title: Disabling Android O auto-fill service for an application
body: <p>Android O has the feature to support <a href="https://developer.android.com/preview/features/autofill.html" rel="noreferrer">Auto-filling</a> for fields. Is there any way I can disable it for a specific application. That is I want to force my application not to use the auto-fill service.</p>
  
  <p>Is it possible ?</p>
  
  <p>To block autofill for an entire activity, use this in onCreate() of the activity:</p>
  
  <pre><code>getWindow()
    .getDecorView()
    .setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS);
  </code></pre>
  
  <p>Is there any better method than this ?</p>