Refactor SimStatusDialogRepository

- 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: Ia0c32882f0b35ec9154b3da58ac6a7b98c879efc
This commit is contained in:
Chaohui Wang
2024-05-27 18:24:52 +08:00
parent 659e512b1c
commit 3b925a0cfe
5 changed files with 113 additions and 64 deletions

View File

@@ -91,6 +91,13 @@ public class SimStatusDialogFragment extends InstrumentedDialogFragment {
super.onDestroy();
}
public void setSettingVisibility(int viewId, boolean isVisible) {
final View view = mRootView.findViewById(viewId);
if (view != null) {
view.setVisibility(isVisible ? View.VISIBLE : View.GONE);
}
}
public void removeSettingFromScreen(int viewId) {
final View view = mRootView.findViewById(viewId);
if (view != null) {