Just some minor comments.
170 + /* Minimum length of SIM_IO_v6 is 12:
Here the struct parsed is actually RIL_SIM_IO_Response instead of SIM_IO_v6.
269 + if (aid_str && strlen(aid_str)) {
Why the extra check with strlen here? Parcel will return null in case it's invalid.
770 + if (app.app_id && strlen(app.app_id)) 771 + sd->app_id = app.app_id;
Same here.
+ } else if (fileid == 0x2FE2 || fileid == 0x2FE0) {
Shouldn't 0x2FE2 be SIM_EF_ICCID_FILEID? It'd also be good to have a const for 0x2FE0.
474 + guchar file_status = 0x01;
If initialized with EF_STATUS_VALID (would be nice to replace it with the defined const), you don't need to set it to valid later (line 517).
Rest of the code looks good, we just need to improve the parcel handling and the power-on conditions (for emergency call, as you added as TODO).
Tested with mako an maguro using latest raring-based build. Old functionality still working as expected.
« Back to merge proposal
Just some minor comments.
170 + /* Minimum length of SIM_IO_v6 is 12:
Here the struct parsed is actually RIL_SIM_IO_Response instead of SIM_IO_v6.
269 + if (aid_str && strlen(aid_str)) {
Why the extra check with strlen here? Parcel will return null in case it's invalid.
770 + if (app.app_id && strlen(app.app_id))
771 + sd->app_id = app.app_id;
Same here.
+ } else if (fileid == 0x2FE2 || fileid == 0x2FE0) {
Shouldn't 0x2FE2 be SIM_EF_ ICCID_FILEID? It'd also be good to have a const for 0x2FE0.
474 + guchar file_status = 0x01;
If initialized with EF_STATUS_VALID (would be nice to replace it with the defined const), you don't need to set it to valid later (line 517).
Rest of the code looks good, we just need to improve the parcel handling and the power-on conditions (for emergency call, as you added as TODO).
Tested with mako an maguro using latest raring-based build. Old functionality still working as expected.