Skip to content

Commit

Permalink
Merge branch 'fix/ONT-3688_-_Timing_advance_is_reported_for_neighbour…
Browse files Browse the repository at this point in the history
…_cells' into 'develop'

Resolve ONT-3688 "Fix/   timing advance is reported for neighbour cells"

Closes ONT-3688

See merge request android/nettest!329
  • Loading branch information
Michal Cádrik committed Oct 28, 2021
2 parents 250dce7 + 9f37703 commit c9fa48d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
31 changes: 31 additions & 0 deletions app/src/main/java/at/rtr/rmbt/android/ui/adapter/ICellAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ class ICellAdapter : RecyclerView.Adapter<ICellAdapter.Holder>() {
binding.band2g = item.band?.name ?: ""
binding.arfcn2g = item.band?.channelNumber?.toString()

binding.cid2g = null
binding.networkType2g = null
binding.rxl2g = null
binding.bsic2g = null
binding.lac2g = null
binding.ta2g = null

if (item is CellCdma) {
val rawCellInfo = item as CellCdma
binding.cid2g = rawCellInfo.bid?.toString()
Expand Down Expand Up @@ -108,6 +115,15 @@ class ICellAdapter : RecyclerView.Adapter<ICellAdapter.Holder>() {
binding.uarfcn3g = item.band?.channelNumber?.toString()
binding.subscriptionId3g = item.subscriptionId.toString()

binding.networkType3g = null
binding.ci3g = null
binding.cid3g = null
binding.lac3g = null
binding.psc3g = null
binding.rscp3g = null
binding.rssi3g = null
binding.rnc3g = null

if (item is CellWcdma) {
binding.networkType3g = "3G (W-CDMA)"
val rawCellInfo = item as CellWcdma
Expand Down Expand Up @@ -153,6 +169,18 @@ class ICellAdapter : RecyclerView.Adapter<ICellAdapter.Holder>() {
binding.earfcnLTE = item.band?.channelNumber?.toString()
binding.networkTypeLTE = "4G (LTE)"

binding.bwLTE = null
binding.ciLTE = null
binding.cidLTE = null
binding.enbLTE = null
binding.pciLTE = null
binding.rsrpLTE = null
binding.rsrqLTE = null
binding.rssiLTE = null
binding.snrLTE = null
binding.taLTE = null
binding.tacLTE = null

if (item is CellLte) {
val rawCellInfo = item as CellLte
binding.bwLTE = rawCellInfo.bandwidth?.toString()
Expand Down Expand Up @@ -202,6 +230,9 @@ class ICellAdapter : RecyclerView.Adapter<ICellAdapter.Holder>() {
binding.subscriptionId5g = item.subscriptionId.toString() + " (${item.network?.toPlmn("-")})"
binding.networkTypeNR = "5G (NR)"

binding.signalSsrsrpNr = null
binding.signalSsrsrqNr = null

if (item is CellNr) {
val rawCellInfo = item as CellNr
rawCellInfo.signal.ssRsrp?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class NetworkInfoDialog : FullscreenDialog() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

binding.iconClose.setOnClickListener {
this.dismiss()
}

signalStrengthLiveData.listen(this) { signal ->

val networkInfo = signal?.networkInfo
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/layout/dialog_network_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,13 @@
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_cell_info_lte" />

<ImageView
android:id="@+id/icon_close"
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="end|top"
android:padding="@dimen/margin_large"
android:src="@drawable/ic_close" />

</FrameLayout>
</layout>

0 comments on commit c9fa48d

Please sign in to comment.