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

Commit 651b4249 authored by Alan Viverette's avatar Alan Viverette
Browse files

Apply implicit parent dependency when adding to PreferenceGroup

BUG: 10493706
Change-Id: Iba741d8dd4e72bc5aef5c033e42a9ba4fb0c523b
parent 171c63db
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -210,10 +210,7 @@ public abstract class PreferenceGroup extends Preference implements GenericInfla
     * @return Whether to allow adding the preference (true), or not (false).
     */
    protected boolean onPrepareAddPreference(Preference preference) {
        if (!super.isEnabled()) {
            preference.setEnabled(false);
        }
        
        preference.onParentChanged(this, shouldDisableDependents());
        return true;
    }