Package 

Class SubDuplicitiesPostprocessor

  • All Implemented Interfaces:
    cz.mroczis.netmonster.core.feature.postprocess.ICellPostprocessor

    
    public final class SubDuplicitiesPostprocessor
     implements ICellPostprocessor
                        

    Solves the case for Dual SIM phones when android.telephony.TelephonyManager.getAllCellInfo returns list with same data totally ignoring the subscription id that is bound to the instance.

    Since Android 10 TelephonyManager allows to request update and that delivers subscription-bound data. On older versions we usually get 2 equal lists and we need to decide which cell belongs to which subscription. Fortunately data are in 90 % cases sorted meaning that cells bound to 1st subscription are first in the list, then serving cell for 2nd subscription ar listed etc.

    Using this predicate we can filter duplicities effectively - in this postprocessors we get list of (PLMN, subscription id) and filter out cells that belong to different subscription

    Complexity: O(s * c), where 's' is size to subscriptions list and 'c' size of all cells list