While your point about using "need" and "should" in a bug report is valid for most instances, this bug was originally created based upon a consensus in one of our network/telephony meetings as the only viable way to solve the underlying non-deterministic selection problem. Perhaps it should've have been created as wishlist bug to better align with the bug summary.
The bug was closed because Alfonso and I made an incorrect assumption in comment #10 that the first SIM would be selected. I'm not quite sure how we came to that conclusion as it doesn't match the original bug description, but clearly there wasn't enough testing to back this up...
As for your straw-man proposal, I think while some of your logic makes sense, the overall proposal is too complicated, especially given the time period we have in which to address the bug before the final image is released for krillin.
Some additional points:
1. As we don't prompt for SIM PINs during the wizard, one or both SIMs could be locked. This could leave us with no SIM selected, unless we run the algorithm everytime a SIM is unlocked as you suggest.
2. I honestly don't think roaming should be involved. It's pretty rare for someone to buy a phone somewhere that results in the phone roaming and if they do, the possibility that they have one SIM that roams and one that doesn't is also pretty low. I see this as an edge case ( which certainly could be useful to advanced users ), and thus fine for requiring manual settings changes.
3. The device in question doesn't support 4G. This is essentially the same as you're fourth point though, choose the one with the best possible network capability. This is essentially what Olga proposed when she said "can't we always just pick SIM1"?
4. Choosing based on signal quality isn't a good idea in my mind, as you still may get better data throughput with a 3G connection with a lower signal quality than with a 2G connection with a higher signal quality. Also, if I buy a 3g capable phone, I want to use 3g. I would be disappointed if it selected 2g as a default for any reason other than lack of a SIM in the 3g slot.
5. I also disagree with re-running the algorithm blindly in all the conditions you list.
- "power on/reboot": when the phone boots, I expect the settings to stay static, not magically change.
- "lock/unlock SIM": I think the case where a user ignores auto-prompting for a SIM PIN will be rare ( unless it's not the owner ), so I don't really see much value in covering this case.
- "auto-switch when roaming": this is a great idea, please file a wishlist bug for system-settings, and add an ofono task.
- changing data technology for a SIM: indeed this is a valid case, but as you're on the settings page when this change is made, I would argue that the user can just change it then and there. On krillin/Android, if the user changes which SIM is capable of 3g, they're auto-prompted to see if they'd like to use this SIM for data. We should consider such an enhancement for a future update.
- "turn on mobile data" - again the user does this from the cellular settings page. If they want to change which SIM is used for mobile data, they can do so on this page.
- "exit flight-mode" - I would argue that you'd only want to possibly switch if the user ends up in a different country and the second SIM has a matching country code to the new country ( ie. one of the two SIMs isn't roaming ). As you point out, this might be best handled as an interactive decision, and maybe we ask about switching 3g capability at the same time?
Finally, as a user if I've decided I don't like the default setting calculated by the phone's algorithm during the wizard run, I'm going to manually override via the settings. If the blindly re-runs it's algorithm in all of these cases, it may revert my choice, which will piss me off.
So... while there are many good ideas presented here, the bottom line is that this bug is for deciding how the initial decision is made after first boot. I think it should be as simple as:
1. If a single SIM is installed, it's selected for mobile data.
2. If two SIMs are installed, the first SIM ( ie. the one with the best network capability ) is chosen for mobile data.
While your point about using "need" and "should" in a bug report is valid for most instances, this bug was originally created based upon a consensus in one of our network/telephony meetings as the only viable way to solve the underlying non-deterministic selection problem. Perhaps it should've have been created as wishlist bug to better align with the bug summary.
The bug was closed because Alfonso and I made an incorrect assumption in comment #10 that the first SIM would be selected. I'm not quite sure how we came to that conclusion as it doesn't match the original bug description, but clearly there wasn't enough testing to back this up...
As for your straw-man proposal, I think while some of your logic makes sense, the overall proposal is too complicated, especially given the time period we have in which to address the bug before the final image is released for krillin.
Some additional points:
1. As we don't prompt for SIM PINs during the wizard, one or both SIMs could be locked. This could leave us with no SIM selected, unless we run the algorithm everytime a SIM is unlocked as you suggest.
2. I honestly don't think roaming should be involved. It's pretty rare for someone to buy a phone somewhere that results in the phone roaming and if they do, the possibility that they have one SIM that roams and one that doesn't is also pretty low. I see this as an edge case ( which certainly could be useful to advanced users ), and thus fine for requiring manual settings changes.
3. The device in question doesn't support 4G. This is essentially the same as you're fourth point though, choose the one with the best possible network capability. This is essentially what Olga proposed when she said "can't we always just pick SIM1"?
4. Choosing based on signal quality isn't a good idea in my mind, as you still may get better data throughput with a 3G connection with a lower signal quality than with a 2G connection with a higher signal quality. Also, if I buy a 3g capable phone, I want to use 3g. I would be disappointed if it selected 2g as a default for any reason other than lack of a SIM in the 3g slot.
5. I also disagree with re-running the algorithm blindly in all the conditions you list.
- "power on/reboot": when the phone boots, I expect the settings to stay static, not magically change.
- "lock/unlock SIM": I think the case where a user ignores auto-prompting for a SIM PIN will be rare ( unless it's not the owner ), so I don't really see much value in covering this case.
- "auto-switch when roaming": this is a great idea, please file a wishlist bug for system-settings, and add an ofono task.
- changing data technology for a SIM: indeed this is a valid case, but as you're on the settings page when this change is made, I would argue that the user can just change it then and there. On krillin/Android, if the user changes which SIM is capable of 3g, they're auto-prompted to see if they'd like to use this SIM for data. We should consider such an enhancement for a future update.
- "turn on mobile data" - again the user does this from the cellular settings page. If they want to change which SIM is used for mobile data, they can do so on this page.
- "exit flight-mode" - I would argue that you'd only want to possibly switch if the user ends up in a different country and the second SIM has a matching country code to the new country ( ie. one of the two SIMs isn't roaming ). As you point out, this might be best handled as an interactive decision, and maybe we ask about switching 3g capability at the same time?
Finally, as a user if I've decided I don't like the default setting calculated by the phone's algorithm during the wizard run, I'm going to manually override via the settings. If the blindly re-runs it's algorithm in all of these cases, it may revert my choice, which will piss me off.
So... while there are many good ideas presented here, the bottom line is that this bug is for deciding how the initial decision is made after first boot. I think it should be as simple as:
1. If a single SIM is installed, it's selected for mobile data.
2. If two SIMs are installed, the first SIM ( ie. the one with the best network capability ) is chosen for mobile data.