Closed Bug 917163 Opened 11 years ago Closed 11 years ago

[MMS] MMS Data call is not released immediately

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: leo.bugzilla.gaia, Assigned: ctai)

Details

Attachments

(1 file, 2 obsolete files)

In MMS service, when the mms data connection is no longer required, we are not immediately releasing the connection.
We have a 30s delay for actually release the data call.

const TIME_TO_RELEASE_MMS_CONNECTION = 30000;

Because of this, the PDP connection is not released and power consumption higher than normal.
Attached patch bug-917163.patch v1.0 (obsolete) — Splinter Review
Assignee: nobody → ctai
Attached patch bug-917163.patch v1.1 (obsolete) — Splinter Review
Attachment #805903 - Attachment is obsolete: true
Attachment #805904 - Flags: feedback?(vyang)
Comment on attachment 805904 [details] [diff] [review]
bug-917163.patch v1.1

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

::: dom/mobilemessage/src/gonk/MmsService.js
@@ +59,5 @@
>  const CONFIG_SEND_REPORT_DEFAULT_YES = 2;
>  const CONFIG_SEND_REPORT_ALWAYS      = 3;
>  
> +const PREF_TIME_TO_BUFFER_MMS_REQUESTS =
> +  Services.prefs.getIntPref("dom.networkManager.timeToBufferMMSRequest");

At the time we talked about this, I was thinking we'll move connection management to NetworkManager.  But should we move MMS requests management to NetworkManager as well?  Probably not.  MmsService should still hold all MMS requests.  The timeout for MMS requests here is fine.  Let's keep the way it is now.

@@ +61,5 @@
>  
> +const PREF_TIME_TO_BUFFER_MMS_REQUESTS =
> +  Services.prefs.getIntPref("dom.networkManager.timeToBufferMMSRequest");
> +const PREF_TIME_TO_RELEASE_MMS_CONNECTION =
> +  Services.prefs.getIntPref("dom.networkManager.timeToReleaseMMSConnection");

Please use "network.gonk.ms-release-mms-connection" instead.  NetworkManager is not a DOM element and we have already a pref "network.gonk.manage-offline-status".

@@ +274,5 @@
>  
> +        if (PREF_TIME_TO_BUFFER_MMS_REQUESTS < 1000) {
> +          this.flushPendingCallbacks(_HTTP_STATUS_ACQUIRE_TIMEOUT);
> +          return true;
> +        }

So we don't need this.

@@ +298,5 @@
>      release: function release() {
>        this.refCount--;
>        if (this.refCount <= 0) {
>          this.refCount = 0;
> +        // The waiting is too small, just skip the timer creation.

Please insert an empty line before the comment line.

::: modules/libpref/src/init/all.js
@@ +4380,5 @@
>  pref("mms.debugging.enabled", false);
>  
> +// The waiting time in network manager.
> +pref("dom.networkManager.timeToBufferMMSRequest", 30000);
> +pref("dom.networkManager.timeToReleaseMMSConnection", 30000);

Please only define "network.gonk.ms-release-mms-connection" and define it in b2g/app/b2g.js.
Attachment #805904 - Flags: feedback?(vyang)
Attachment #805904 - Attachment is obsolete: true
Comment on attachment 806404 [details] [diff] [review]
bug-917163.patch v1.2

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

Thanks for your comments.
Attachment #806404 - Flags: review?(vyang)
Attachment #806404 - Flags: review?(vyang) → review+
Leo,
Please overwrite "network.gonk.ms-release-mms-connection" to 0 in user.js if you want to release the data call immdeitaely.
https://hg.mozilla.org/mozilla-central/rev/51237fb5f6e3
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: