-
- All Implemented Interfaces:
-
cz.mroczis.netmonster.core.feature.postprocess.ICellPostprocessor
public final class MocnNetworkPostprocessor implements ICellPostprocessor
The problem - when current network is MOCN (Multi-Operator Core Network) some Android phones pick first entry from offered PLMN list ignoring the flag for currently active one.
This issue is only present in entries returned from android.telephony.TelephonyManager.getAllCellInfo but correct PLMNs is stored in android.telephony.ServiceState or android.telephony.SubscriptionInfo. This class aims to fix the issues by modifying PLMN assigned to cells.
Postprocessor does not work if phone is in "Emergency calls only" state since those two sources do not return valid data -> incorrect PLMN will stay incorrect.
This should be LTE exclusive cause cause the bug is present only in LTE networks. However it is also used to fix PLMN when it's completely invalid.
References: AOSP bug tracker
-
-
Constructor Summary
Constructors Constructor Description MocnNetworkPostprocessor(ISubscriptionManagerCompat subscription, Function1<Integer, Network> networkOperatorGetter, Function1<Integer, ServiceState> serviceStateGetter)
-
Method Summary
Modifier and Type Method Description List<ICell>postprocess(List<ICell> list)Postprocessing method that allows data modification within the list -
-
Constructor Detail
-
MocnNetworkPostprocessor
MocnNetworkPostprocessor(ISubscriptionManagerCompat subscription, Function1<Integer, Network> networkOperatorGetter, Function1<Integer, ServiceState> serviceStateGetter)
-
-
Method Detail
-
postprocess
@RequiresPermission(allOf = {android.permission.READ_PHONE_STATE, android.permission.ACCESS_COARSE_LOCATION}) List<ICell> postprocess(List<ICell> list)
Postprocessing method that allows data modification within the list
-
-
-
-