Search in sources :

Example 11 with UnsupportedAppUsage

use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.

the class RilMessageDecoder method sendCmdForExecution.

@UnsupportedAppUsage
private void sendCmdForExecution(RilMessage rilMsg) {
    Message msg = mCaller.obtainMessage(CatService.MSG_ID_RIL_MSG_DECODED, new RilMessage(rilMsg));
    msg.sendToTarget();
}
Also used : Message(android.os.Message) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 12 with UnsupportedAppUsage

use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.

the class RilMessageDecoder method sendStartDecodingMessageParams.

/**
 * Start decoding the message parameters,
 * when complete MSG_ID_RIL_MSG_DECODED will be returned to caller.
 *
 * @param rilMsg
 */
@UnsupportedAppUsage
public void sendStartDecodingMessageParams(RilMessage rilMsg) {
    Message msg = obtainMessage(CMD_START);
    msg.obj = rilMsg;
    sendMessage(msg);
}
Also used : Message(android.os.Message) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 13 with UnsupportedAppUsage

use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.

the class IccFileHandler method loadEFLinearFixed.

// ***** Public Methods
/**
 * Load a record from a SIM Linear Fixed EF
 *
 * @param fileid EF id
 * @param path Path of the EF on the card
 * @param recordNum 1-based (not 0-based) record number
 * @param onLoaded
 *
 * ((AsyncResult)(onLoaded.obj)).result is the byte[]
 */
@UnsupportedAppUsage
public void loadEFLinearFixed(int fileid, String path, int recordNum, Message onLoaded) {
    String efPath = (path == null) ? getEFPath(fileid) : path;
    Message response = obtainMessage(EVENT_GET_RECORD_SIZE_DONE, new LoadLinearFixedContext(fileid, recordNum, efPath, onLoaded));
    mCi.iccIOForApp(COMMAND_GET_RESPONSE, fileid, efPath, 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, mAid, response);
}
Also used : Message(android.os.Message) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 14 with UnsupportedAppUsage

use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.

the class UiccCardApplication method update.

@UnsupportedAppUsage
public void update(IccCardApplicationStatus as, Context c, CommandsInterface ci) {
    synchronized (mLock) {
        if (mDestroyed) {
            loge("Application updated after destroyed! Fix me!");
            return;
        }
        if (DBG)
            log(mAppType + " update. New " + as);
        mContext = c;
        mCi = ci;
        AppType oldAppType = mAppType;
        AppState oldAppState = mAppState;
        PersoSubState oldPersoSubState = mPersoSubState;
        PinState oldPin1State = mPin1State;
        mAppType = as.app_type;
        mAuthContext = getAuthContext(mAppType);
        mAppState = as.app_state;
        mPersoSubState = as.perso_substate;
        mAid = as.aid;
        mAppLabel = as.app_label;
        mPin1Replaced = (as.pin1_replaced != 0);
        mPin1State = as.pin1;
        mPin2State = as.pin2;
        if (mAppType != oldAppType) {
            if (mIccFh != null) {
                mIccFh.dispose();
            }
            if (mIccRecords != null) {
                mIccRecords.dispose();
            }
            mIccFh = createIccFileHandler(as.app_type);
            mIccRecords = createIccRecords(as.app_type, c, ci);
        }
        if (mPersoSubState != oldPersoSubState && PersoSubState.isPersoLocked(mPersoSubState)) {
            notifyNetworkLockedRegistrantsIfNeeded(null);
        }
        if (mAppState != oldAppState) {
            if (DBG)
                log(oldAppType + " changed state: " + oldAppState + " -> " + mAppState);
            // as it might have failed in earlier attempt.
            if (mAppState == AppState.APPSTATE_READY) {
                queryFdn();
                queryPin1State();
            }
            notifyPinLockedRegistrantsIfNeeded(null);
            notifyReadyRegistrantsIfNeeded(null);
            notifyDetectedRegistrantsIfNeeded(null);
        } else {
            if (mPin1State != oldPin1State)
                queryPin1State();
        }
    }
}
Also used : PinState(com.android.internal.telephony.uicc.IccCardStatus.PinState) AppState(com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState) AppType(com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType) PersoSubState(com.android.internal.telephony.uicc.IccCardApplicationStatus.PersoSubState) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 15 with UnsupportedAppUsage

use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.

the class SMSDispatcher method getCarrierAppPackageName.

@UnsupportedAppUsage
protected String getCarrierAppPackageName() {
    UiccCard card = UiccController.getInstance().getUiccCard(mPhone.getPhoneId());
    if (card == null) {
        return null;
    }
    List<String> carrierPackages = card.getCarrierPackageNamesForIntent(mContext.getPackageManager(), new Intent(CarrierMessagingService.SERVICE_INTERFACE));
    if (carrierPackages != null && carrierPackages.size() == 1) {
        return carrierPackages.get(0);
    }
    // for a carrierImsPackage that implements CarrierMessagingService.
    return CarrierSmsUtils.getCarrierImsPackageForIntent(mContext, mPhone, new Intent(CarrierMessagingService.SERVICE_INTERFACE));
}
Also used : UiccCard(com.android.internal.telephony.uicc.UiccCard) PendingIntent(android.app.PendingIntent) Intent(android.content.Intent) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Aggregations

UnsupportedAppUsage (android.compat.annotation.UnsupportedAppUsage)71 Message (android.os.Message)18 SmsMessage (android.telephony.SmsMessage)9 Intent (android.content.Intent)6 SipPhone (com.android.internal.telephony.sip.SipPhone)6 SmsCbMessage (android.telephony.SmsCbMessage)5 Cursor (android.database.Cursor)4 PendingIntent (android.app.PendingIntent)3 PackageManager (android.content.pm.PackageManager)3 AsyncResult (android.os.AsyncResult)3 PersistableBundle (android.os.PersistableBundle)3 CarrierConfigManager (android.telephony.CarrierConfigManager)3 SubscriptionInfo (android.telephony.SubscriptionInfo)3 SQLException (android.database.SQLException)2 SQLiteException (android.database.sqlite.SQLiteException)2 PowerManager (android.os.PowerManager)2 RadioAccessFamily (android.telephony.RadioAccessFamily)2 ImsException (com.android.ims.ImsException)2 ImsUtInterface (com.android.ims.ImsUtInterface)2 AppState (com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState)2