Added in API level 31

BarringInfoListener


interface BarringInfoListener
android.telephony.TelephonyCallback.BarringInfoListener

Interface for barring information listener.

Summary

Public methods
abstract Unit

Report updated barring information for the current camped/registered cell.

Public methods

onBarringInfoChanged

Added in API level 31
abstract fun onBarringInfoChanged(barringInfo: BarringInfo): Unit

Report updated barring information for the current camped/registered cell.

Barring info is provided for all services applicable to the current camped/registered cell, for the registered PLMN and current access class/access category. The calling app should have carrier privileges (see TelephonyManager.hasCarrierPrivileges) if it does not have the android.Manifest.permission#READ_PRECISE_PHONE_STATE and android.Manifest.permission#ACCESS_FINE_LOCATION. If the calling app doesn't have android.Manifest.permission#ACCESS_FINE_LOCATION, it will receive BarringInfo including CellIdentity without location-sensitive information included.
Requires android.Manifest.permission#READ_PRECISE_PHONE_STATE and android.Manifest.permission#ACCESS_FINE_LOCATION

Parameters
barringInfo BarringInfo: for all services on the current cell. This value cannot be null.