use of android.hardware.radio.V1_0.NvWriteItem in project android_frameworks_opt_telephony by LineageOS.
the class RIL method nvWriteItem.
@Override
public void nvWriteItem(int itemId, String itemValue, Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_NV_WRITE_ITEM, result, mRILDefaultWorkSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " itemId = " + itemId + " itemValue = " + itemValue);
}
NvWriteItem item = new NvWriteItem();
item.itemId = itemId;
item.value = convertNullToEmptyString(itemValue);
try {
radioProxy.nvWriteItem(rr.mSerial, item);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "nvWriteItem", e);
}
}
}
use of android.hardware.radio.V1_0.NvWriteItem in project android_frameworks_opt_telephony by LineageOS.
the class RILTest method testNvWriteItem.
@FlakyTest
@Test
public void testNvWriteItem() throws Exception {
int itemId = 1;
String itemValue = "value";
mRILUnderTest.nvWriteItem(itemId, itemValue, obtainMessage(), new WorkSource());
NvWriteItem item = new NvWriteItem();
item.itemId = itemId;
item.value = itemValue;
verify(mRadioProxy).nvWriteItem(mSerialNumberCaptor.capture(), eq(item));
verifyRILResponse(mRILUnderTest, mSerialNumberCaptor.getValue(), RIL_REQUEST_NV_WRITE_ITEM);
}
use of android.hardware.radio.V1_0.NvWriteItem in project android_frameworks_opt_telephony by LineageOS.
the class RIL method nvWriteItem.
@Override
public void nvWriteItem(int itemId, String itemValue, Message result, WorkSource workSource) {
workSource = getDeafultWorkSourceIfInvalid(workSource);
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_NV_WRITE_ITEM, result, workSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " itemId = " + itemId + " itemValue = " + itemValue);
}
NvWriteItem item = new NvWriteItem();
item.itemId = itemId;
item.value = convertNullToEmptyString(itemValue);
try {
radioProxy.nvWriteItem(rr.mSerial, item);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "nvWriteItem", e);
}
}
}
Aggregations