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

Commit 72e6bece authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Launch nested preferences with the same theme as parent activity.

Bug: 5351628
Change-Id: Id67b81558bc6e010d6f024cdb8117424aa6b62f0
parent 94097b44
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.os.Parcelable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.Window;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.ListAdapter;
@@ -156,13 +157,13 @@ public final class PreferenceScreen extends PreferenceGroup implements AdapterVi

        // Set the title bar if title is available, else no title bar
        final CharSequence title = getTitle();
        Dialog dialog = mDialog = new Dialog(context, TextUtils.isEmpty(title)
                ? com.android.internal.R.style.Theme_NoTitleBar
                : com.android.internal.R.style.Theme);
        dialog.setContentView(mListView);
        if (!TextUtils.isEmpty(title)) {
        Dialog dialog = mDialog = new Dialog(context, context.getThemeResId());
        if (TextUtils.isEmpty(title)) {
            dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        } else {
            dialog.setTitle(title);
        }
        dialog.setContentView(mListView);
        dialog.setOnDismissListener(this);
        if (state != null) {
            dialog.onRestoreInstanceState(state);