Search in sources :

Example 41 with UnsupportedAppUsage

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

the class GsmCdmaPhone method exitEmergencyCallbackMode.

@UnsupportedAppUsage
@Override
public void exitEmergencyCallbackMode() {
    if (DBG) {
        Rlog.d(LOG_TAG, "exitEmergencyCallbackMode: mImsPhone=" + mImsPhone + " isPhoneTypeGsm=" + isPhoneTypeGsm());
    }
    if (mImsPhone != null && mImsPhone.isInImsEcm()) {
        mImsPhone.exitEmergencyCallbackMode();
    } else {
        if (mWakeLock.isHeld()) {
            mWakeLock.release();
        }
        Message msg = null;
        if (mIsTestingEmergencyCallbackMode) {
            // prevent duplicate exit messages from happening due to this message being handled
            // as well as an UNSOL when the modem exits ECbM. Instead, only register for this
            // message callback when this is a test and we will not be receiving the UNSOL from
            // the modem.
            msg = obtainMessage(EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE);
        }
        mCi.exitEmergencyCallbackMode(msg);
    }
}
Also used : Message(android.os.Message) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 42 with UnsupportedAppUsage

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

the class GsmCdmaPhone method syncClirSetting.

/**
 * Make sure the network knows our preferred setting.
 */
@UnsupportedAppUsage
private void syncClirSetting() {
    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
    migrateClirSettingIfNeeded(sp);
    int clirSetting = sp.getInt(CLIR_KEY + getSubId(), -1);
    Rlog.i(LOG_TAG, "syncClirSetting: " + CLIR_KEY + getSubId() + "=" + clirSetting);
    if (clirSetting >= 0) {
        mCi.setCLIR(clirSetting, null);
    }
}
Also used : SharedPreferences(android.content.SharedPreferences) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 43 with UnsupportedAppUsage

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

the class GsmCdmaPhone method getLine1Number.

@UnsupportedAppUsage
@Override
public String getLine1Number() {
    if (isPhoneTypeGsm()) {
        IccRecords r = mIccRecords.get();
        return (r != null) ? r.getMsisdnNumber() : null;
    } else {
        CarrierConfigManager configManager = (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
        boolean use_usim = configManager.getConfigForSubId(getSubId()).getBoolean(CarrierConfigManager.KEY_USE_USIM_BOOL);
        if (use_usim) {
            return (mSimRecords != null) ? mSimRecords.getMsisdnNumber() : null;
        }
        return mSST.getMdnNumber();
    }
}
Also used : CarrierConfigManager(android.telephony.CarrierConfigManager) IccRecords(com.android.internal.telephony.uicc.IccRecords) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 44 with UnsupportedAppUsage

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

the class CallManager method getFirstActiveRingingCall.

@UnsupportedAppUsage
public Call getFirstActiveRingingCall(int subId) {
    Phone phone = getPhone(subId);
    Call call = getFirstNonIdleCall(mRingingCalls, subId);
    if (call == null) {
        call = (phone == null) ? null : phone.getRingingCall();
    }
    return call;
}
Also used : SipPhone(com.android.internal.telephony.sip.SipPhone) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 45 with UnsupportedAppUsage

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

the class CallManager method canConference.

/**
 * Whether or not the phone can conference in the current phone
 * state--that is, one call holding and one call active.
 * This method consider the phone object which is specific
 * to the provided subId.
 * @return true if the phone can conference; false otherwise.
 */
@UnsupportedAppUsage
public boolean canConference(Call heldCall, int subId) {
    Phone activePhone = null;
    Phone heldPhone = null;
    if (hasActiveFgCall(subId)) {
        activePhone = getActiveFgCall(subId).getPhone();
    }
    if (heldCall != null) {
        heldPhone = heldCall.getPhone();
    }
    return heldPhone.getClass().equals(activePhone.getClass());
}
Also used : SipPhone(com.android.internal.telephony.sip.SipPhone) 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