@@ -5,37 +5,24 @@ import android.content.Context
55import android.content.pm.PackageManager
66import android.net.ConnectivityManager
77import android.net.Network
8- import android.net.NetworkCapabilities
98import android.os.Build
10- import android.provider.SimPhonebookContract.ElementaryFiles.SUBSCRIPTION_ID
11- import android.telephony.SubscriptionInfo
129import android.util.Log
1310import androidx.annotation.RequiresApi
1411import androidx.core.app.ActivityCompat
15- import androidx.core.content.ContextCompat.getSystemService
1612import androidx.lifecycle.LiveData
1713import androidx.lifecycle.MutableLiveData
1814import androidx.lifecycle.ViewModel
19- import cz.mroczis.netmonster.core.db.model.NetworkType
2015import cz.mroczis.netmonster.core.factory.NetMonsterFactory
21- import cz.mroczis.netmonster.core.feature.detect.DetectorHspaDc
22- import cz.mroczis.netmonster.core.feature.detect.DetectorLteAdvancedNrDisplayInfo
23- import cz.mroczis.netmonster.core.feature.detect.DetectorLteAdvancedNrServiceState
24- import cz.mroczis.netmonster.core.feature.detect.DetectorLteAdvancedPhysicalChannel
2516import cz.mroczis.netmonster.core.model.cell.CellLte
2617import cz.mroczis.netmonster.core.model.cell.CellNr
2718import cz.mroczis.netmonster.core.model.cell.ICell
2819import cz.mroczis.netmonster.core.model.connection.NoneConnection
29- import cz.mroczis.netmonster.core.model.nr.NrNsaState
30- import eu.bschmidt.devicepublisher.MainActivity
3120import eu.bschmidt.devicepublisher.MainApplication
3221import eu.bschmidt.devicepublisher.model.DataViewModelInterface
33- import eu.bschmidt.devicepublisher.service.APIService
3422import eu.bschmidt.devicepublisher.util.DevPubUtils
3523import kotlinx.coroutines.runBlocking
3624import kotlinx.serialization.Serializable
3725import java.util.Collections
38- import kotlin.random.Random
3926
4027@Serializable
4128enum class CellType (val type : String ) {
@@ -46,7 +33,9 @@ enum class CellType(val type: String) {
4633
4734@Serializable
4835data class CellData (
49- val id : Int? = 0 ,
36+ val nodeB : Int? = 0 ,
37+ val cid : Long? = 0 ,
38+ val pci : Int? = 0 ,
5039 val type : CellType = CellType .None ,
5140 val arfcn : Int = 0 ,
5241 val frequency : Int? = 0 ,
@@ -163,7 +152,10 @@ class CellDataViewModel : ViewModel(), DataViewModelInterface {
163152 when (cell) {
164153 is CellLte -> {
165154 val lteCell: CellLte = cell
166- cellData = CellData (id = lteCell.cid,
155+ cellData = CellData (
156+ cid = lteCell.cid?.toLong(),
157+ nodeB = lteCell.enb,
158+ pci = lteCell.pci,
167159 type = CellType .LTE ,
168160 arfcn = lteCell.band!! .downlinkEarfcn,
169161 band = lteCell.band!! .name!! ,
@@ -176,7 +168,10 @@ class CellDataViewModel : ViewModel(), DataViewModelInterface {
176168 }
177169 is CellNr -> {
178170 val nrCell: CellNr = cell
179- cellData = CellData (id = nrCell.pci,
171+ cellData = CellData (
172+ cid = nrCell.nci,
173+ nodeB = null ,
174+ pci = nrCell.pci,
180175 type = CellType .NR ,
181176 arfcn = nrCell.band!! .downlinkArfcn,
182177 band = nrCell.band!! .name!! ,
0 commit comments