use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.
the class CallManager method unregisterPhone.
/**
* unregister phone from CallManager
* @param phone to be unregistered
*/
@UnsupportedAppUsage
public void unregisterPhone(Phone phone) {
if (phone != null && mPhones.contains(phone)) {
if (DBG) {
Rlog.d(LOG_TAG, "unregisterPhone(" + phone.getPhoneName() + " " + phone + ")");
}
Phone imsPhone = phone.getImsPhone();
if (imsPhone != null) {
unregisterPhone(imsPhone);
}
mPhones.remove(phone);
mRingingCalls.remove(phone.getRingingCall());
mBackgroundCalls.remove(phone.getBackgroundCall());
mForegroundCalls.remove(phone.getForegroundCall());
unregisterForPhoneStates(phone);
if (phone == mDefaultPhone) {
if (mPhones.isEmpty()) {
mDefaultPhone = null;
} else {
mDefaultPhone = mPhones.get(0);
}
}
}
}
use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.
the class CallManager method conference.
/**
* Conferences holding and active. Conference occurs asynchronously
* and may fail. Final notification occurs via
* {@link #registerForPreciseCallStateChanged(android.os.Handler, int,
* java.lang.Object) registerForPreciseCallStateChanged()}.
*
* @exception CallStateException if canConference() would return false.
* In these cases, this operation may not be performed.
*/
@UnsupportedAppUsage
public void conference(Call heldCall) throws CallStateException {
int subId = heldCall.getPhone().getSubId();
if (VDBG) {
Rlog.d(LOG_TAG, "conference(" + heldCall + ")");
Rlog.d(LOG_TAG, toString());
}
Phone fgPhone = getFgPhone(subId);
if (fgPhone != null) {
if (fgPhone instanceof SipPhone) {
((SipPhone) fgPhone).conference(heldCall);
} else if (canConference(heldCall)) {
fgPhone.conference();
} else {
throw (new CallStateException("Can't conference foreground and selected background call"));
}
} else {
Rlog.d(LOG_TAG, "conference: fgPhone=null");
}
if (VDBG) {
Rlog.d(LOG_TAG, "End conference(" + heldCall + ")");
Rlog.d(LOG_TAG, toString());
}
}
use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.
the class GsmCdmaConnection method fetchDtmfToneDelay.
@UnsupportedAppUsage
private void fetchDtmfToneDelay(GsmCdmaPhone phone) {
CarrierConfigManager configMgr = (CarrierConfigManager) phone.getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
PersistableBundle b = configMgr.getConfigForSubId(phone.getSubId());
if (b != null) {
mDtmfToneDelay = b.getInt(phone.getDtmfToneDelayKey());
}
}
use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.
the class Phone method getIccFileHandler.
/**
* Retrieves the IccFileHandler of the Phone instance
*/
@UnsupportedAppUsage
public IccFileHandler getIccFileHandler() {
UiccCardApplication uiccApplication = mUiccApplication.get();
IccFileHandler fh;
if (uiccApplication == null) {
Rlog.d(LOG_TAG, "getIccFileHandler: uiccApplication == null, return null");
fh = null;
} else {
fh = uiccApplication.getIccFileHandler();
}
Rlog.d(LOG_TAG, "getIccFileHandler: fh=" + fh);
return fh;
}
use of android.compat.annotation.UnsupportedAppUsage in project android_frameworks_opt_telephony by LineageOS.
the class Phone method selectNetworkManually.
/**
* Manually selects a network. <code>response</code> is
* dispatched when this is complete. <code>response.obj</code> will be
* an AsyncResult, and <code>response.obj.exception</code> will be non-null
* on failure.
*
* @see #setNetworkSelectionModeAutomatic(Message)
*/
@UnsupportedAppUsage
public void selectNetworkManually(OperatorInfo network, boolean persistSelection, Message response) {
// wrap the response message in our own message along with
// the operator's id.
NetworkSelectMessage nsm = new NetworkSelectMessage();
nsm.message = response;
nsm.operatorNumeric = network.getOperatorNumeric();
nsm.operatorAlphaLong = network.getOperatorAlphaLong();
nsm.operatorAlphaShort = network.getOperatorAlphaShort();
Message msg = obtainMessage(EVENT_SET_NETWORK_MANUAL_COMPLETE, nsm);
mCi.setNetworkSelectionModeManual(network.getOperatorNumeric(), network.getRan(), msg);
if (persistSelection) {
updateSavedNetworkOperator(nsm);
} else {
clearSavedNetworkSelection();
updateManualNetworkSelection(nsm);
}
}
Aggregations