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