fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
@Override
    public void startActivityForResult(Intent intent, int requestCode) {
        // If this was started from a Fragment we've already checked the upper 16 bits were not in
        // use, and then repurposed them for the Fragment's index.
        if (!mStartedActivityFromFragment) {
            if (requestCode != -1) {
                checkForValidRequestCode(requestCode);
            }
        }
        super.startActivityForResult(intent, requestCode);
    }
/**
     * Modifies the standard behavior to allow results to be delivered to fragments.
     * This imposes a restriction that requestCode be <= 0xffff.
     */
Modifies the standard behavior to allow results to be delivered to fragments.
This imposes a restriction that requestCode be <= 0xffff.
Modifies the standard behavior to allow results to be delivered to fragments . This imposes a restriction that requestCode be < = 0xffff .
@Override
    public void startActivityForResult(Intent intent, int requestCode) {
        if (!mStartedActivityFromFragment) {
            if (requestCode != -1) {
                checkForValidRequestCode(requestCode);
            }
        }
        super.startActivityForResult(intent, requestCode);
    }
@ Override public void startActivityForResult ( Intent intent , int requestCode ) { if ( ! mStartedActivityFromFragment ) { if ( requestCode != - 1 ) { checkForValidRequestCode ( requestCode ) ; } } super . startActivityForResult ( intent , requestCode ) ; }
Modifies the standard behavior to allow results to be delivered to fragments.
Modifies the standard behavior to allow results to be delivered to fragments .
// If this was started from a Fragment we've already checked the upper 16 bits were not in // use, and then repurposed them for the Fragment's index.