Search in sources :

Example 61 with Registrant

use of android.os.Registrant in project android_frameworks_opt_telephony by LineageOS.

the class Phone method migrate.

protected void migrate(RegistrantList to, RegistrantList from) {
    if (from == null) {
        // May be null in some cases, such as testing.
        return;
    }
    from.removeCleared();
    for (int i = 0, n = from.size(); i < n; i++) {
        Registrant r = (Registrant) from.get(i);
        Message msg = r.messageForRegistrant();
        // coming from the CallManager.
        if (msg != null) {
            if (msg.obj == CallManager.getInstance().getRegistrantIdentifier()) {
                continue;
            } else {
                to.add((Registrant) from.get(i));
            }
        } else {
            Rlog.d(LOG_TAG, "msg is null");
        }
    }
}
Also used : Message(android.os.Message) Registrant(android.os.Registrant)

Example 62 with Registrant

use of android.os.Registrant in project android_frameworks_opt_telephony by LineageOS.

the class VendorSubscriptionController method registerForAddSubscriptionRecord.

public void registerForAddSubscriptionRecord(Handler handler, int what, Object obj) {
    Registrant r = new Registrant(handler, what, obj);
    synchronized (mAddSubscriptionRecordRegistrants) {
        mAddSubscriptionRecordRegistrants.add(r);
        List<SubscriptionInfo> subInfoList = getActiveSubscriptionInfoList(mContext.getOpPackageName());
        if (subInfoList != null) {
            r.notifyRegistrant();
        }
    }
}
Also used : Registrant(android.os.Registrant) SubscriptionInfo(android.telephony.SubscriptionInfo)

Example 63 with Registrant

use of android.os.Registrant in project XobotOS by xamarin.

the class GsmCallTracker method registerForVoiceCallStarted.

//***** Instance Methods
//***** Public Methods
public void registerForVoiceCallStarted(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    voiceCallStartedRegistrants.add(r);
}
Also used : Registrant(android.os.Registrant)

Example 64 with Registrant

use of android.os.Registrant in project XobotOS by xamarin.

the class ServiceStateTracker method registerForDataConnectionAttached.

/**
     * Registration point for transition into DataConnection attached.
     * @param h handler to notify
     * @param what what code of message when delivered
     * @param obj placed in Message.obj
     */
public void registerForDataConnectionAttached(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    mAttachedRegistrants.add(r);
    if (getCurrentDataConnectionState() == ServiceState.STATE_IN_SERVICE) {
        r.notifyRegistrant();
    }
}
Also used : Registrant(android.os.Registrant)

Example 65 with Registrant

use of android.os.Registrant in project XobotOS by xamarin.

the class ServiceStateTracker method registerForRoamingOn.

/**
     * Registration point for combined roaming on
     * 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
     */
public void registerForRoamingOn(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    mRoamingOnRegistrants.add(r);
    if (ss.getRoaming()) {
        r.notifyRegistrant();
    }
}
Also used : Registrant(android.os.Registrant)

Aggregations

Registrant (android.os.Registrant)139 AsyncResult (android.os.AsyncResult)19 Message (android.os.Message)5 RegistrantList (android.os.RegistrantList)4 NetworkRegistrationInfo (android.telephony.NetworkRegistrationInfo)2 IllegalArgumentException (java.lang.IllegalArgumentException)2 UnsupportedAppUsage (android.compat.annotation.UnsupportedAppUsage)1 PhysicalChannelConfig (android.telephony.PhysicalChannelConfig)1 SubscriptionInfo (android.telephony.SubscriptionInfo)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1