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);
}
}
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);
}
}
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();
}
}
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;
}
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());
}
Aggregations