Merge "[Settings] Do not set text if the fragment is not attached" into udc-dev am: ce77de4240
am: 4a3d0d7f8e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22142522 Change-Id: I7b697c270a8157015b0933760fdbbd7e025400c5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import android.app.Dialog;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
@@ -106,6 +107,10 @@ public class SimStatusDialogFragment extends InstrumentedDialogFragment {
|
||||
.sorted().toArray();
|
||||
|
||||
public void setText(int viewId, CharSequence text) {
|
||||
if (!isAdded()) {
|
||||
Log.d(TAG, "Fragment not attached yet.");
|
||||
return;
|
||||
}
|
||||
setText(viewId, text, true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user