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

Commit ce77de42 authored by Zoey Chen's avatar Zoey Chen Committed by Android (Google) Code Review
Browse files

Merge "[Settings] Do not set text if the fragment is not attached" into udc-dev

parents fced4027 76bb350c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.Dialog;
import android.app.settings.SettingsEnums;
import android.app.settings.SettingsEnums;
import android.os.Bundle;
import android.os.Bundle;
import android.text.TextUtils;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View;
import android.view.WindowManager;
import android.view.WindowManager;
@@ -106,6 +107,10 @@ public class SimStatusDialogFragment extends InstrumentedDialogFragment {
            .sorted().toArray();
            .sorted().toArray();


    public void setText(int viewId, CharSequence text) {
    public void setText(int viewId, CharSequence text) {
        if (!isAdded()) {
            Log.d(TAG, "Fragment not attached yet.");
            return;
        }
        setText(viewId, text, true);
        setText(viewId, text, true);
    }
    }