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

Commit 9d08b103 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[Provier Model] Remove the redundant code in the Internet Dialog" into...

Merge "[Provier Model] Remove the redundant code in the Internet Dialog" into sc-v2-dev am: a4fa424d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16128305

Change-Id: Iccdacd7c4b32c1e728c12e65ec1034f94f6b257f
parents 95e54713 a4fa424d
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -80,7 +80,6 @@ public class InternetDialog extends SystemUIDialog implements

    private final Handler mHandler;
    private final Executor mBackgroundExecutor;
    private final LinearLayoutManager mLayoutManager;

    @VisibleForTesting
    protected InternetAdapter mAdapter;
@@ -161,12 +160,6 @@ public class InternetDialog extends SystemUIDialog implements
        mCanConfigMobileData = canConfigMobileData;
        mCanConfigWifi = canConfigWifi;

        mLayoutManager = new LinearLayoutManager(mContext) {
            @Override
            public boolean canScrollVertically() {
                return false;
            }
        };
        mUiEventLogger = uiEventLogger;
        mAdapter = new InternetAdapter(mInternetDialogController);
        if (!aboveStatusBar) {
@@ -218,7 +211,7 @@ public class InternetDialog extends SystemUIDialog implements

        setOnClickListener();
        mTurnWifiOnLayout.setBackground(null);
        mWifiRecyclerView.setLayoutManager(mLayoutManager);
        mWifiRecyclerView.setLayoutManager(new LinearLayoutManager(mContext));
        mWifiRecyclerView.setAdapter(mAdapter);
    }

@@ -469,10 +462,6 @@ public class InternetDialog extends SystemUIDialog implements
    }

    private void setProgressBarVisible(boolean visible) {
        if (mWifiManager.isWifiEnabled() && mAdapter.mHolderView != null
                && mAdapter.mHolderView.isAttachedToWindow()) {
            mIsProgressBarVisible = true;
        }
        mIsProgressBarVisible = visible;
        mProgressBar.setVisibility(mIsProgressBarVisible ? View.VISIBLE : View.GONE);
        mDivider.setVisibility(mIsProgressBarVisible ? View.GONE : View.VISIBLE);