Fix signal strength display in 'Choose network' list

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
This commit is contained in:
Antony Sargent
2019-05-20 17:20:31 -07:00
parent 76cf0dbddd
commit 8c6098e5cf

View 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);
}
}