Closed Bug 973771 Opened 6 years ago Closed 6 years ago

B2G RIL: Preferred Network types for LTE

Categories

(Firefox OS Graveyard :: RIL, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
1.4 S2 (28feb)

People

(Reporter: edgar, Assigned: edgar)

References

Details

Attachments

(2 files, 3 obsolete files)

MozMobileConnection.{set|get}PreferredNetworkType() now only supports CDMA/GSM [1], we should extend it to support LTE (ril.h has defined the preferred network types for LTE [2]).

[1]https://github.com/EdgarChen/mozilla-central/blob/119f4a0bdbdf3e4a8145b04d28d5aec578052a5e/dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl#L140-L172
[2]https://github.com/mozilla-b2g/platform_hardware_ril/blob/master/include/telephony/ril.h#L108-L123
Add LTE preferred network types.
1). Refactor test_mobile_preferred_network.js [1].
2). Add test cases for LTE preferred network types.

[1] Please see bug 964680.
Hi Edgar,
 Could you please also consider the GECKO_PREFERRED_NETWORK_TYPE_DEFAULT too (or file another bug to track)?

For LTE capable device, the default type should be GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM (or some other proper value.), or, user has to change the mode manually to let device get LTE RAT.

+this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM = "lte/wcdma/gsm";
+this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO = "lte/wcdma/gsm/cdma/evdo";
+this.GECKO_PREFERRED_NETWORK_TYPE_LTE_ONLY = "lte";
 this.GECKO_PREFERRED_NETWORK_TYPE_DEFAULT = GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM;


Per Google design, AOSP will read a property - "ro.telephony.default_network" to determine the default type of network [1] during first boot. Is it possible for us to reference that design?

Thanks!!
Shawn

[1] https://android.googlesource.com/platform/frameworks/base/+/625239a05401bbf18b04d9874cea3f82da7c29a1/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
(In reply to shawn ku [:sku] from comment #3)
> Hi Edgar,
>  Could you please also consider the GECKO_PREFERRED_NETWORK_TYPE_DEFAULT too
> (or file another bug to track)?
> 
> For LTE capable device, the default type should be
> GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM (or some other proper value.),
> or, user has to change the mode manually to let device get LTE RAT.
> 
> +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM = "lte/wcdma/gsm";
> +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO =
> "lte/wcdma/gsm/cdma/evdo";
> +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_ONLY = "lte";
>  this.GECKO_PREFERRED_NETWORK_TYPE_DEFAULT =
> GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM;

As I know, gecko doesn't set default preferred network type now.
It seems GECKO_PREFERRED_NETWORK_TYPE_DEFAULT is redundant, I will check this again.

> 
> 
> Per Google design, AOSP will read a property -
> "ro.telephony.default_network" to determine the default type of network [1]
> during first boot. Is it possible for us to reference that design?

Do we really need to handle default value for first boot case, could we just use the default value of modem directly?

> 
> Thanks!!
> Shawn
> 
> [1]
> https://android.googlesource.com/platform/frameworks/base/+/
> 625239a05401bbf18b04d9874cea3f82da7c29a1/packages/SettingsProvider/src/com/
> android/providers/settings/DatabaseHelper.java
(In reply to Edgar Chen [:edgar][:echen] from comment #5)
> (In reply to shawn ku [:sku] from comment #3)
> > Hi Edgar,
> >  Could you please also consider the GECKO_PREFERRED_NETWORK_TYPE_DEFAULT too
> > (or file another bug to track)?
> > 
> > For LTE capable device, the default type should be
> > GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM (or some other proper value.),
> > or, user has to change the mode manually to let device get LTE RAT.
> > 
> > +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM = "lte/wcdma/gsm";
> > +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO =
> > "lte/wcdma/gsm/cdma/evdo";
> > +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_ONLY = "lte";
> >  this.GECKO_PREFERRED_NETWORK_TYPE_DEFAULT =
> > GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM;
> 
> As I know, gecko doesn't set default preferred network type now.
> It seems GECKO_PREFERRED_NETWORK_TYPE_DEFAULT is redundant, I will check
> this again.
> 
> > 
> > 
> > Per Google design, AOSP will read a property -
> > "ro.telephony.default_network" to determine the default type of network [1]
> > during first boot. Is it possible for us to reference that design?
> 
> Do we really need to handle default value for first boot case, could we just
> use the default value of modem directly?

Please correct me if anything is wrong. :)

It should be necessary, that default type could be used for both (GSM|CDMA & [LTE]) cases.
However, it was handled at DatabaseHelper.java for AOSP.
(The rule is to setup preference if first boot (DB is empty case).)

Per our current design, will we set gsm/wcdma as default type for CDMA project?
That's why I am asking if we can refer to AOSP design or not.


> 
> > 
> > Thanks!!
> > Shawn
> > 
> > [1]
> > https://android.googlesource.com/platform/frameworks/base/+/
> > 625239a05401bbf18b04d9874cea3f82da7c29a1/packages/SettingsProvider/src/com/
> > android/providers/settings/DatabaseHelper.java
(In reply to shawn ku [:sku] from comment #6)
> 
> Please correct me if anything is wrong. :)
> 
> It should be necessary, that default type could be used for both (GSM|CDMA &
> [LTE]) cases.
> However, it was handled at DatabaseHelper.java for AOSP.
> (The rule is to setup preference if first boot (DB is empty case).)
> 
> Per our current design, will we set gsm/wcdma as default type for CDMA
> project?
No, we won't.
For the case that DB is empty, Gecko and Gaia won't set a default type to modem.
(That's why I say GECKO_PREFERRED_NETWORK_TYPE_DEFAULT seems redundant)
Thank you.

> That's why I am asking if we can refer to AOSP design or not.
(In reply to Edgar Chen [:edgar][:echen] from comment #7)
> (In reply to shawn ku [:sku] from comment #6)
> > 
> > Please correct me if anything is wrong. :)
> > 
> > It should be necessary, that default type could be used for both (GSM|CDMA &
> > [LTE]) cases.
> > However, it was handled at DatabaseHelper.java for AOSP.
> > (The rule is to setup preference if first boot (DB is empty case).)
> > 
> > Per our current design, will we set gsm/wcdma as default type for CDMA
> > project?
> No, we won't.
> For the case that DB is empty, Gecko and Gaia won't set a default type to
> modem.
> (That's why I say GECKO_PREFERRED_NETWORK_TYPE_DEFAULT seems redundant)
> Thank you.

1). For removing GECKO_PREFERRED_NETWORK_TYPE_DEFAULT, I will do it in bug 946589.
2). And for the case that DB is empty, let discuss it in another bug.

Let's focus on the supporting of LTE in this bug. Thank you, Shawn.

> 
> > That's why I am asking if we can refer to AOSP design or not.
Target Milestone: --- → 1.4 S3 (14mar)
Add LTE preferred network types.
Attachment #8377442 - Attachment is obsolete: true
Attachment #8378830 - Flags: review?(htsai)
Fix some coding styles.
Attachment #8378831 - Attachment is obsolete: true
Comment on attachment 8378835 [details] [diff] [review]
Part 2: Marionette tests for LTE preferred network types, v3

Hi Hsinyi,

Could you help to review this patch?
1). Refactor test_mobile_preferred_network.js [1].
2). Add test cases for LTE preferred network types.

Thank you.

[1] Please see bug 964680.
Attachment #8378835 - Flags: review?(htsai)
It blocks a partner bug. Change the target milestone to 2/28.
Target Milestone: 1.4 S3 (14mar) → 1.4 S2 (28feb)
Comment on attachment 8378830 [details] [diff] [review]
Part 1: RIL implementation for LTE preferred network types, v2

Review of attachment 8378830 [details] [diff] [review]:
-----------------------------------------------------------------

Simple and nice!
Attachment #8378830 - Flags: review?(htsai) → review+
Comment on attachment 8378835 [details] [diff] [review]
Part 2: Marionette tests for LTE preferred network types, v3

Review of attachment 8378835 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you :)
Attachment #8378835 - Flags: review?(htsai) → review+
You need to log in before you can comment on or make changes to this bug.