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

Commit 0d34d228 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed progress bar display issue in Internet Dialog" into main

parents a619e616 cb267885
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -400,6 +400,9 @@ public class InternetDialogDelegateLegacy implements

        mInternetDialogTitle.setText(internetContent.mInternetDialogTitleString);
        mInternetDialogSubTitle.setText(internetContent.mInternetDialogSubTitle);
        if (!internetContent.mIsWifiEnabled) {
            setProgressBarVisible(false);
        }
        mAirplaneModeButton.setVisibility(
                internetContent.mIsAirplaneModeEnabled ? View.VISIBLE : View.GONE);

+14 −0
Original line number Diff line number Diff line
@@ -878,4 +878,18 @@ public class InternetDialogDelegateLegacyTest extends SysuiTestCase {
        mMobileDataLayout.setVisibility(mobileDataVisible ? View.VISIBLE : View.GONE);
        mConnectedWifi.setVisibility(connectedWifiVisible ? View.VISIBLE : View.GONE);
    }

    @Test
    public void updateDialog_wifiIsDisabled_turnOffProgressBar() {
        when(mInternetDetailsContentController.isWifiEnabled()).thenReturn(false);
        mInternetDialogDelegateLegacy.mIsProgressBarVisible = true;

        mInternetDialogDelegateLegacy.updateDialog(false);

        mBgExecutor.runAllReady();
        mInternetDialogDelegateLegacy.mDataInternetContent.observe(
                mInternetDialogDelegateLegacy.mLifecycleOwner, i -> {
                    assertThat(mInternetDialogDelegateLegacy.mIsProgressBarVisible).isFalse();
                });
    }
}