Merge "SystemUI: Hide the mobile settings icon in guest mode" into main
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java
index 89b9eee..70221a3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java
@@ -565,8 +565,10 @@
                 }
                 mSecondaryMobileNetworkLayout = mDialogView.findViewById(
                         R.id.secondary_mobile_network_layout);
-                mSecondaryMobileNetworkLayout.setOnClickListener(
-                        this::onClickConnectedSecondarySub);
+                if (mCanConfigMobileData) {
+                    mSecondaryMobileNetworkLayout.setOnClickListener(
+                            this::onClickConnectedSecondarySub);
+                }
                 mSecondaryMobileNetworkLayout.setBackground(mBackgroundOn);
 
                 TextView mSecondaryMobileTitleText = mDialogView.requireViewById(
@@ -599,7 +601,8 @@
                         mDialogView.requireViewById(R.id.secondary_settings_icon);
                 mSecondaryMobileSettingsIcon.setColorFilter(
                         dialog.getContext().getColor(R.color.connected_network_primary_color));
-
+                mSecondaryMobileSettingsIcon.setVisibility(mCanConfigMobileData ?
+                        View.VISIBLE : View.INVISIBLE);
                 // set secondary visual for default data sub
                 mMobileNetworkLayout.setBackground(mBackgroundOff);
                 mMobileTitleText.setTextAppearance(R.style.TextAppearance_InternetDialog);