Improve error message to figure out which fragment class is problematic.
Bug: 8057867 Change-Id: I6ad0bc8c8a6ed9bc8a1cca5debffe15c6de3a1b5
This commit is contained in:
@@ -233,7 +233,10 @@ public class SettingsPreferenceFragment extends PreferenceFragment implements Di
|
|||||||
mParentFragment = getFragmentManager().findFragmentById(mParentFragmentId);
|
mParentFragment = getFragmentManager().findFragmentById(mParentFragmentId);
|
||||||
if (!(mParentFragment instanceof DialogCreatable)) {
|
if (!(mParentFragment instanceof DialogCreatable)) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
KEY_PARENT_FRAGMENT_ID + " must implement "
|
(mParentFragment != null
|
||||||
|
? mParentFragment.getClass().getName()
|
||||||
|
: mParentFragmentId)
|
||||||
|
+ " must implement "
|
||||||
+ DialogCreatable.class.getName());
|
+ DialogCreatable.class.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user