Implement isValidFragment for PreferenceActivity. Ref #333.