Search in sources :

Example 86 with Registrant

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

the class BaseCommands method registerForCallStateChanged.

public void registerForCallStateChanged(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    mCallStateRegistrants.add(r);
}
Also used : Registrant(android.os.Registrant)

Example 87 with Registrant

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

the class BaseCommands method registerForCdmaPrlChanged.

@Override
public void registerForCdmaPrlChanged(Handler h, int what, Object obj) {
    Registrant r = new Registrant(h, what, obj);
    mCdmaPrlChangedRegistrants.add(r);
}
Also used : Registrant(android.os.Registrant)

Example 88 with Registrant

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

the class IccCardProxy method registerForLocked.

/**
 * Notifies handler of any transition into State.isPinLocked()
 */
@Override
public void registerForLocked(Handler h, int what, Object obj) {
    synchronized (mLock) {
        Registrant r = new Registrant(h, what, obj);
        mPinLockedRegistrants.add(r);
        if (getState().isPinLocked()) {
            r.notifyRegistrant();
        }
    }
}
Also used : Registrant(android.os.Registrant)

Example 89 with Registrant

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

the class UiccController method registerForIccChanged.

// Notifies when card status changes
public void registerForIccChanged(Handler h, int what, Object obj) {
    synchronized (mLock) {
        Registrant r = new Registrant(h, what, obj);
        mIccChangedRegistrants.add(r);
        // Notify registrant right after registering, so that it will get the latest ICC status,
        // otherwise which may not happen until there is an actual change in ICC status.
        r.notifyRegistrant();
    }
}
Also used : Registrant(android.os.Registrant)

Example 90 with Registrant

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

the class SubscriptionMonitorMock method registerForSubscriptionChanged.

@Override
public void registerForSubscriptionChanged(int phoneId, Handler h, int what, Object o) {
    validatePhoneId(phoneId);
    Registrant r = new Registrant(h, what, o);
    mSubscriptionsChangedRegistrants[phoneId].add(r);
    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