Merge lp:~rsalveti/indicator-network/change-signal-strength-thresholds-android into lp:indicator-network/14.10

Proposed by Ricardo Salveti
Status: Merged
Merged at revision: 348
Proposed branch: lp:~rsalveti/indicator-network/change-signal-strength-thresholds-android
Merge into: lp:indicator-network/14.10
Diff against target: 22 lines (+5/-4)
1 file modified
network/root-state.cpp (+5/-4)
To merge this branch: bzr merge lp:~rsalveti/indicator-network/change-signal-strength-thresholds-android
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+223344@code.launchpad.net

Commit message

Changing signal strength thresholds to follow values use by Android (LP: #1329945)

Description of the change

Changing signal strength thresholds to follow values use by Android

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

This should really be handled on ofono side as it's specific to a single modem tech.

Ofono reports the signal strength through org.ofono.NetworkRegistration Strength property:

Service org.ofono
Interface org.ofono.NetworkRegistration
Object path [variable prefix]/{modem0,modem1,...}

Properties byte Strength [readonly, optional]

                        Contains the current signal strength as a percentage
                        between 0-100 percent.

Also the latter part of this patch is modifying the wifi icons.

review: Disapprove
347. By Ricardo Salveti

Not changing the wifi signal strength

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

This shouldn't be handled by ofono, and the tech specifics should also be handled by the client side, not ofono.

Percentage is not ideal, and not linear, but it was what was used by ofono initially (see https://lists.ofono.org/pipermail/ofono/2011-January/007827.html).

We could just change it to report asu values (what we get from the modem), but then the same logic applied bellow would need be used, just with different values.

The only think ofono does is converting ASU (as defined by TS 27.007 8.5) to percentage (x-100/31)

348. By Ricardo Salveti

Removing comment added previously in the wifi code block

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

Let's have comment from awe before proceeding.

review: Needs Information
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

OK, let's have this in the indicator then.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'network/root-state.cpp'
2--- network/root-state.cpp 2014-05-21 17:56:25 +0000
3+++ network/root-state.cpp 2014-06-17 12:27:22 +0000
4@@ -174,13 +174,14 @@
5 }
6
7 auto strength = modem->strength().get();
8- if (strength >= 80)
9+ /* Using same values as used by Android, not linear (LP: #1329945)*/
10+ if (strength >= 39)
11 m_cellularIcons[modem] = "gsm-3g-full";
12- else if (strength >= 60)
13+ else if (strength >= 26)
14 m_cellularIcons[modem] = "gsm-3g-high";
15- else if (strength >= 40)
16+ else if (strength >= 16)
17 m_cellularIcons[modem] = "gsm-3g-medium";
18- else if (strength >= 20)
19+ else if (strength >= 6)
20 m_cellularIcons[modem] = "gsm-3g-low";
21 else
22 m_cellularIcons[modem] = "gsm-3g-none";

Subscribers

People subscribed via source and target branches