OSDN Git Service

Fix signal strength display in 'Choose network' list
authorAntony Sargent <asargent@google.com>
Tue, 21 May 2019 00:20:31 +0000 (17:20 -0700)
committerAntony Sargent <asargent@google.com>
Tue, 21 May 2019 00:20:31 +0000 (17:20 -0700)
For GSM networks, the "Choose network" page allows you to manually pick
from among different cell networks, and shows signal strength and
network type (LTE, 3g, etc.) for available ones. The signal strength
wedges were transparent and not visible to the user - this CL fixes
that.

Bug: 132895135
Test: visual (Insert SIM with GSM service, then go to Settings ->
Network & internet -> Mobile network -> Advanced -> Automatically select
network)

Change-Id: Ibbbc60b590b09e4b4f5e31b49fe578769dcdbc4d

src/com/android/settings/network/telephony/NetworkOperatorPreference.java

index a334aeb..2359399 100644 (file)
@@ -30,6 +30,7 @@ import android.view.Gravity;
 import androidx.preference.Preference;
 
 import com.android.settings.R;
+import com.android.settings.Utils;
 import com.android.settingslib.graph.SignalDrawable;
 
 import java.util.List;
@@ -144,6 +145,7 @@ public class NetworkOperatorPreference extends Preference {
         // Set the signal strength icon at the bottom right
         icons.setLayerGravity(1 /* index of SignalDrawable */, Gravity.BOTTOM | Gravity.RIGHT);
         icons.setLayerSize(1 /* index of SignalDrawable */, iconSize, iconSize);
+        icons.setTintList(Utils.getColorAttr(context, android.R.attr.colorControlNormal));
         setIcon(icons);
     }
 }