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

Commit 73d26ac6 authored by Jacky Wang's avatar Jacky Wang Committed by Android (Google) Code Review
Browse files

Merge "Catalyst framework integration" into main

parents 78e81248 fee2fdfd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ android_library {
        "SettingsLibIllustrationPreference",
        "SettingsLibLayoutPreference",
        "SettingsLibMainSwitchPreference",
        "SettingsLibMetadata",
        "SettingsLibPreference",
        "SettingsLibProfileSelector",
        "SettingsLibProgressBar",
        "SettingsLibRestrictedLockUtils",
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ android_library {
        "SettingsLibMetadata",
        "androidx.annotation_annotation",
        "androidx.preference_preference",
        "guava",
    ],
    kotlincflags: ["-Xjvm-default=all"],
}
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ open class PreferenceFragment :
     * This is for flagging purpose. If false (e.g. flag is disabled), xml resource is used to build
     * preference screen.
     */
    protected open fun usePreferenceScreenMetadata(): Boolean = true
    protected open fun usePreferenceScreenMetadata(): Boolean = false

    /** Returns the xml resource to create preference screen. */
    @XmlRes protected open fun getPreferenceScreenResId(context: Context): Int = 0
+4 −3
Original line number Diff line number Diff line
@@ -31,13 +31,14 @@ import android.view.MenuInflater;
import android.view.MenuItem;

import androidx.lifecycle.LifecycleOwner;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceScreen;

import com.android.settingslib.preference.PreferenceFragment;

/**
 * {@link PreferenceFragmentCompat} that has hooks to observe fragment lifecycle events.
 * Preference fragment that has hooks to observe fragment lifecycle events.
 */
public abstract class ObservablePreferenceFragment extends PreferenceFragmentCompat
public abstract class ObservablePreferenceFragment extends PreferenceFragment
        implements LifecycleOwner {

    private final Lifecycle mLifecycle = new Lifecycle(this);