Fix a crash when bring up settings
It is now required that any activity that extends PreferenceActivity implement isValidFragment. Change-Id: I3ef79430b7f176186493bd09af693b48f8c040a1
This commit is contained in:
parent
00219e9fb9
commit
15b06c2080
@ -32,6 +32,7 @@ import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.text.TextUtils;
|
||||
import android.text.SpannableString;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.util.Linkify;
|
||||
@ -339,6 +340,13 @@ public class AccountSettings extends PreferenceActivity implements FeedbackEnabl
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isValidFragment(String fragmentName) {
|
||||
// We need to make sure that a fragment about to be attached is valid. This corrects
|
||||
// a security vulnerability.
|
||||
return (TextUtils.equals(AccountSettingsFragment.class.getName(), fragmentName) ||
|
||||
super.isValidFragment(fragmentName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent onBuildStartFragmentIntent(String fragmentName, Bundle args,
|
||||
int titleRes, int shortTitleRes) {
|
||||
|
Loading…
Reference in New Issue
Block a user