Search in sources :

Example 21 with CommandException

use of com.android.internal.telephony.CommandException in project XobotOS by xamarin.

the class CDMAPhone method getNeighboringCids.

public void getNeighboringCids(Message response) {
    /*
         * This is currently not implemented.  At least as of June
         * 2009, there is no neighbor cell information available for
         * CDMA because some party is resisting making this
         * information readily available.  Consequently, calling this
         * function can have no useful effect.  This situation may
         * (and hopefully will) change in the future.
         */
    if (response != null) {
        CommandException ce = new CommandException(CommandException.Error.REQUEST_NOT_SUPPORTED);
        AsyncResult.forMessage(response).exception = ce;
        response.sendToTarget();
    }
}
Also used : CommandException(com.android.internal.telephony.CommandException)

Example 22 with CommandException

use of com.android.internal.telephony.CommandException in project android_frameworks_opt_telephony by LineageOS.

the class SimulatedCommands method changeIccPin.

@Override
public void changeIccPin(String oldPin, String newPin, Message result) {
    if (oldPin != null && oldPin.equals(mPinCode)) {
        mPinCode = newPin;
        resultSuccess(result, null);
        return;
    }
    Rlog.i(LOG_TAG, "[SimCmd] changeIccPin: pin failed!");
    CommandException ex = new CommandException(CommandException.Error.PASSWORD_INCORRECT);
    resultFail(result, null, ex);
}
Also used : CommandException(com.android.internal.telephony.CommandException)

Example 23 with CommandException

use of com.android.internal.telephony.CommandException in project android_frameworks_opt_telephony by LineageOS.

the class SimulatedCommands method setFacilityLockForApp.

@Override
public void setFacilityLockForApp(String facility, boolean lockEnabled, String pin, int serviceClass, String appId, Message result) {
    if (facility != null && facility.equals(CommandsInterface.CB_FACILITY_BA_SIM)) {
        if (pin != null && pin.equals(mPinCode)) {
            Rlog.i(LOG_TAG, "[SimCmd] setFacilityLock: pin is valid");
            mSimLockEnabled = lockEnabled;
            resultSuccess(result, null);
            return;
        }
        Rlog.i(LOG_TAG, "[SimCmd] setFacilityLock: pin failed!");
        CommandException ex = new CommandException(CommandException.Error.GENERIC_FAILURE);
        resultFail(result, null, ex);
        return;
    } else if (facility != null && facility.equals(CommandsInterface.CB_FACILITY_BA_FD)) {
        if (pin != null && pin.equals(mPin2Code)) {
            Rlog.i(LOG_TAG, "[SimCmd] setFacilityLock: pin2 is valid");
            mSimFdnEnabled = lockEnabled;
            resultSuccess(result, null);
            return;
        }
        Rlog.i(LOG_TAG, "[SimCmd] setFacilityLock: pin2 failed!");
        CommandException ex = new CommandException(CommandException.Error.GENERIC_FAILURE);
        resultFail(result, null, ex);
        return;
    }
    unimplemented(result);
}
Also used : CommandException(com.android.internal.telephony.CommandException)

Aggregations

CommandException (com.android.internal.telephony.CommandException)23 AsyncResult (android.os.AsyncResult)2 SpannableStringBuilder (android.text.SpannableStringBuilder)2 ImsException (com.android.ims.ImsException)2 UiccAccessRule (android.telephony.UiccAccessRule)1