title: when android's isValidFragment() from PreferenceActivity gets called?
body: <p>For some application on which I was working, for devices with API level 19 I'm getting exception</p>
  
  <pre><code>Caused by: java.lang.RuntimeException: Subclasses of PreferenceActivity must override isValidFragment(String) to verify that the Fragment class is valid! com... has not checked if fragment com...$. is valid.
  </code></pre>
  
  <p>Then, I found out that for those applications android frameworks <code>protected boolean isValidFragment(String fragmentName)</code> is getting called, which has code</p>
  
  <pre><code>if (getApplicationInfo().targetSdkVersion  &gt;= android.os.Build.VERSION_CODES.KITKAT) {
          throw new RuntimeException(
                  "Subclasses of PreferenceActivity must override isValidFragment(String)"
                  + " to verify that the Fragment class is valid! " + this.getClass().getName()
                  + " has not checked if fragment " + fragmentName + " is valid.");
      } else {
          return true;
  }
  </code></pre>
  
  <p>Then I tried to replicate the error</p>
  
  <p>I took my sample app's code from <a href="http://viralpatel.net/blogs/android-preferences-activity-example/">Preferences Activity Example</a>
  and added line <code>&lt;uses-sdk android:targetSdkVersion="19" /&gt;</code> in manifest.</p>
  
  <p>But strangely, I'm not getting the error(isValidFragment() not getting called in that case).</p>
  
  <p>So please tell me how to replicate that error in my sample app.</p>