use of android.os.Registrant in project android_frameworks_opt_telephony by LineageOS.
the class ServiceStateTracker method registerForDataRoamingOff.
/**
* Registration point for roaming off of mobile data
* combined roaming is true when roaming is true and ONS differs SPN
*
* @param h handler to notify
* @param what what code of message when delivered
* @param obj placed in Message.obj
* @param notifyNow notify upon registration if data roaming is off
*/
public void registerForDataRoamingOff(Handler h, int what, Object obj, boolean notifyNow) {
Registrant r = new Registrant(h, what, obj);
mDataRoamingOffRegistrants.add(r);
if (notifyNow && !mSS.getDataRoaming()) {
r.notifyRegistrant();
}
}
use of android.os.Registrant in project android_frameworks_opt_telephony by LineageOS.
the class ServiceStateTracker method registerForNetworkDetached.
/**
* Registration point for transition into network detached.
* @param h handler to notify
* @param what what code of message when delivered
* @param obj in Message.obj
*/
public void registerForNetworkDetached(Handler h, int what, Object obj) {
Registrant r = new Registrant(h, what, obj);
mNetworkDetachedRegistrants.add(r);
if (mSS.getState() != ServiceState.STATE_IN_SERVICE) {
r.notifyRegistrant();
}
}
use of android.os.Registrant in project android_frameworks_opt_telephony by LineageOS.
the class ServiceStateTracker method registerForNrStateChanged.
/**
* Registers for 5G NR state changed.
* @param h handler to notify
* @param what what code of message when delivered
* @param obj placed in Message.obj
*/
public void registerForNrStateChanged(Handler h, int what, Object obj) {
Registrant r = new Registrant(h, what, obj);
mNrStateChangedRegistrants.add(r);
}
use of android.os.Registrant in project android_frameworks_opt_telephony by LineageOS.
the class ServiceStateTracker method registerForDataConnectionDetached.
/**
* Registration point for transition into DataConnection detached.
* @param transport Transport type
* @param h handler to notify
* @param what what code of message when delivered
* @param obj placed in Message.obj
*/
public void registerForDataConnectionDetached(@TransportType int transport, Handler h, int what, Object obj) {
Registrant r = new Registrant(h, what, obj);
if (mDetachedRegistrants.get(transport) == null) {
mDetachedRegistrants.put(transport, new RegistrantList());
}
mDetachedRegistrants.get(transport).add(r);
if (mSS != null) {
NetworkRegistrationInfo netRegState = mSS.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS, transport);
if (netRegState != null && !netRegState.isInService()) {
r.notifyRegistrant();
}
}
}
use of android.os.Registrant in project android_frameworks_opt_telephony by LineageOS.
the class ServiceStateTracker method registerForPsRestrictedEnabled.
/**
* Registration point for transition into packet service restricted zone.
* @param h handler to notify
* @param what what code of message when delivered
* @param obj placed in Message.obj
*/
public void registerForPsRestrictedEnabled(Handler h, int what, Object obj) {
Registrant r = new Registrant(h, what, obj);
mPsRestrictEnabledRegistrants.add(r);
if (mRestrictedState.isPsRestricted()) {
r.notifyRegistrant();
}
}
Aggregations