Refactor signal strength in SIM status

- Move data logic into repository for better testing
- Check carrier config first, if not shows some items, we don't need to
  load data
- Tests in SimStatusDialogControllerTest will be fixed in later cls

Bug: 337417520
Test: manual - on SIM status
Test: unit test
Change-Id: Iccd209fd455d66d4f6438652ee7481d2a0e72a99
This commit is contained in:
Chaohui Wang
2024-05-27 20:30:17 +08:00
parent 3b925a0cfe
commit 33d73862bf
7 changed files with 290 additions and 246 deletions

View File

@@ -26,6 +26,7 @@ import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
@@ -113,7 +114,7 @@ public class SimStatusDialogFragment extends InstrumentedDialogFragment {
SimStatusDialogController.PHONE_NUMBER_VALUE_ID)
.sorted().toArray();
public void setText(int viewId, CharSequence text) {
public void setText(int viewId, @Nullable CharSequence text) {
if (!isAdded()) {
Log.d(TAG, "Fragment not attached yet.");
return;