I also got this error, working with a DialogFragment, even though I wasn't calling requestFeature() at all.
I was calling getDecorView() from the DialogFragment's onActivitiyCreate() as part of some tracing code I had written to help me understand how and when Windows are created. That worked fine, but a bit later in the fragment's life cycle its onStart() method was called. That called Dialog's show() which eventually called AlertDialog's onCreate() which eventually called PhoneWindow's requestFeature() method to request Window.FEATURE_NO_TITLE.
Since calling getDecorView() "for the first time 'locks in' various window characteristics as described in setContentView(View, android.view.ViewGroup.LayoutParams).", this violated the requirement that "requestFeature() gets called before adding content in Fragment" -- the subtlety being that the content was getting added indirectly by my call to getDecorView().
The fix was to call peekDecorView() instead of getDecorView().