Skip to content

Commit

Permalink
Fix the NARFCN label to include Band: "NARFCN/Band"
Browse files Browse the repository at this point in the history
Also set the minimum signal bar to 5% to make sure there is something there when the signal is low
  • Loading branch information
christianrowlands committed Apr 12, 2024
1 parent 2180377 commit 9f55acd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ private void updateServingCellProtocol(CellularProtocol protocol)
binding.tacLabel.setText(R.string.tac_label);
binding.enbIdGroup.setVisibility(View.GONE);
binding.sectorIdGroup.setVisibility(View.GONE);
binding.earfcnLabel.setText(R.string.narfcn_label);
binding.earfcnLabel.setText(R.string.narfcn_band_label);
binding.pciLabel.setText(R.string.pci_label);
binding.bandwidthGroup.setVisibility(View.GONE);
binding.taGroup.setVisibility(View.GONE);
Expand Down Expand Up @@ -999,8 +999,8 @@ private void setSignalStrengthBar(RoundedProgressBar signalStrengthBar, Integer

signalStrengthBar.setProgressDrawableColor(color);
signalStrengthBar.setBackgroundColor(ColorUtils.getFadedColor(color));
// We want there to be at least a small amount of the bar visible, so we set the minimum to 2%.
signalStrengthBar.setProgressPercentage(Math.max(2, scaledNormalizedValue), true);
// We want there to be at least a small amount of the bar visible, so we set the minimum to 5%.
signalStrengthBar.setProgressPercentage(Math.max(5, scaledNormalizedValue), true);
}

/**
Expand Down
1 change: 1 addition & 0 deletions networksurvey/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ but work independently, so you have full control over how you handle your data.<
<string name="db_value_label">%1$s dB</string>

<!-- NR labels -->
<string name="narfcn_band_label">NARFCN/Band</string>
<string name="narfcn_label">NARFCN</string>
<string name="ss_rsrp_label">SS_RSRP</string>
<string name="ss_rsrq_label">SS_RSRQ</string>
Expand Down

0 comments on commit 9f55acd

Please sign in to comment.