Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d541f3af authored by Amith Yamasani's avatar Amith Yamasani Committed by The Android Automerger
Browse files

Don't check for valid fragment when switching to another fragment

Bug: 10184429
Change-Id: I09b39682d907a1cd7ce140e0be0faaddfaba6bd1
parent f3b52238
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1282,7 +1282,7 @@ public abstract class PreferenceActivity extends ListActivity implements
    }

    /**
     * Start a new fragment containing a preference panel.  If the prefences
     * Start a new fragment containing a preference panel.  If the preferences
     * are being displayed in multi-pane mode, the given fragment class will
     * be instantiated and placed in the appropriate pane.  If running in
     * single-pane mode, a new activity will be launched in which to show the
@@ -1305,10 +1305,6 @@ public abstract class PreferenceActivity extends ListActivity implements
        if (mSinglePane) {
            startWithFragment(fragmentClass, args, resultTo, resultRequestCode, titleRes, 0);
        } else {
            if (!isValidFragment(fragmentClass)) {
                throw new IllegalArgumentException("Invalid fragment for this activity: "
                        + fragmentClass);
            }
            Fragment f = Fragment.instantiate(this, fragmentClass, args);
            if (resultTo != null) {
                f.setTargetFragment(resultTo, resultRequestCode);