Comment 7 for bug 1447114

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@John,

The system does not distinguish between slots: when a new SIM is detected, cellular data is automatically enabled regardless of the SIM slot. As we can have data enabled only for one slot in krillin, there is a race condition in case the previously inserted SIM had data enabled, and any of the two can end up with data enabled. Note, however, that settings are stored at that moment so provided that you do not change any of the SIMs the situation is stable.

There are technical issues with handling the situation differently depending on whether you have detected a SIM for the first time or not. The main one is when PIN is enabled. We store our settings per IMSI, which uniquely identifies a SIM. We cannot know the IMSI until the user enters the PIN, therefore we cannot know if the SIM has been inserted for the first time until that happens. Let's say that we had SIM1 in the phone, with cellular data enabled, and with PIN enabled. We insert SIM2, which does not have PIN enabled, and reboot. Should we enable data for SIM2 or not? We have no idea on whether SIM1 was there before or has been introduced at the same time, and we cannot wait for the user to enter the PIN to take a decision, as that might not even happen.

But it is not only the technical side. If we already decided that enabling SIM1 data was what the user wanted, why are we supposing things are different with SIM2? Maybe the user prefers SIM2 for SIM1 for data, for myriad of reasons. Why are we more wrong if we enable data for a new SIM when we have 2 in the phone than if we enable data for one SIM in case there is only one present?

We simply do not know what the user wants.

That's the reason for which I think we should not enable data by default and we must let the user choose. I do not see this different to when the user chooses a WiFi AP in the start wizard: we do not select a random open access point at that moment. We should do the same when there are 2 SIMs in the system, on first boot or when a new one appears. And it is also in the line of what Noemí has suggested in comment #6.