Merge lp:~unity-api-team/ubuntu-system-settings/apneditor into lp:ubuntu-system-settings

Proposed by Jussi Pakkanen
Status: Superseded
Proposed branch: lp:~unity-api-team/ubuntu-system-settings/apneditor
Merge into: lp:ubuntu-system-settings
Diff against target: 1664 lines (+1283/-100)
17 files modified
plugins/cellular/CMakeLists.txt (+4/-0)
plugins/cellular/Components/CMakeLists.txt (+6/-0)
plugins/cellular/Components/MultiSim.qml (+5/-4)
plugins/cellular/Components/SingleSim.qml (+4/-3)
plugins/cellular/CustomApnEditor.qml (+322/-0)
plugins/cellular/PageChooseApn.qml (+580/-0)
plugins/cellular/PageChooseCarrier.qml (+165/-80)
plugins/cellular/PageChooseCarriers.qml (+2/-3)
plugins/cellular/PageComponent.qml (+1/-1)
plugins/cellular/ofonoactivator.cpp (+119/-0)
plugins/cellular/ofonoactivator.h (+42/-0)
plugins/cellular/plugin.cpp (+2/-0)
plugins/cellular/sims.js (+4/-0)
plugins/phone/PageComponent.qml (+3/-2)
plugins/phone/sims.js (+4/-0)
tests/autopilot/ubuntu_system_settings/tests/__init__.py (+7/-7)
tests/autopilot/ubuntu_system_settings/tests/test_cellular.py (+13/-0)
To merge this branch: bzr merge lp:~unity-api-team/ubuntu-system-settings/apneditor
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Jonas G. Drange (community) Needs Fixing
Ken VanDine Needs Fixing
Iain Lane Needs Fixing
Review via email: mp+227534@code.launchpad.net

This proposal has been superseded by a proposal from 2014-10-03.

Commit message

Add an APN editor.
Fix object creation of OfonoNetworkOperators in ChooseCarrier.qml

Description of the change

Adding a custom MMS APN will not actually work because of:
https://bugs.launchpad.net/ubuntu/+source/ofono/+bug/1362068

As of our platform is not currently able to handle max. 1 MMS APN[0], here is the "logic" of the editor:

- it will always create a custom internet APN if none exists for the system
- ofono provisioning might add Internet APN's that are also used for MMS
  - these are identified by having a MessageCenter property set, although
    strictly speaking this is violating ofono API
- When user switches between Internet APNs, NetworkManager is told
  to activate the selected APN through ofonoActivator::activate()
- as the system is only able to handle one MMS APN, custom MMS APN is only
  created if user explicitly configures one
  - if there is a provisioned MMS APN it will get removed and one custom one
    created
  - as the QOfono API does not offer a way to directly access an APN created
    with ConnectionManager::addContext(), we have to detect a newly created
    MMS APN by magic (isEmptyCustom()) and lazily populate it when detected
    (pendingMmsData)
- Any configured MMS APN (both custom and provisioned) will be removed if
  user activates a dual Internet APN with MMS capability

[0] https://bugs.launchpad.net/bugs/1362795

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:798
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1028/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2226
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1853
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/220
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/220
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/220/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/220
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2437
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3408
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3408/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10130
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1557
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2072
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2072/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1028/rebuild

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

FAILED: Continuous integration, rev:799
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1029/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2248
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1865
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/221
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/221
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/221/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/221
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2453
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3432
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3432/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10148
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1567
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2084
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2084/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1029/rebuild

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

FAILED: Continuous integration, rev:800
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1035/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2327
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1914
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/227
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/227
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/227/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/227
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2509
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3538
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3538/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10230
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1605
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2144
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2144/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1035/rebuild

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

FAILED: Continuous integration, rev:801
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1040/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2369
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1940
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/232
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/232
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/232/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/232
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2546
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3589
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3589/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10280
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1625
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2185
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2185/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1040/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Iain Lane (laney) wrote :

Not reviewed, but please make sure to wrap all lines at 80 characters and fix the copyright years.

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

We don't have an 80 character line limit any more. It's 132 now. See for example:

https://bazaar.launchpad.net/~unity-team/unity-api/trunk/view/head:/astyle-config

Revision history for this message
Iain Lane (laney) wrote :

On Wed, Jul 23, 2014 at 02:08:11PM -0000, Jussi Pakkanen wrote:
> We don't have an 80 character line limit any more. It's 132 now. See for example:

Who decided this for ubuntu-system-settings.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Jussi, the document you pointed is not from the settings project, we use a 80 chars wrap count here

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:802
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1042/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2378
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1945
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/234
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/234
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/234/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/234
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2550
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3599
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3599/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10284
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1628
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2190
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2190/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1042/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Iain Lane (laney) wrote :

On Wed, Jul 23, 2014 at 03:15:53PM -0000, Sebastien Bacher wrote:
> @Jussi, the document you pointed is not from the settings project, we use a 80 chars wrap count here

However we are discussing it - GNOME recommends between 80 and 120 & we
might align on this.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:803
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1043/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2385
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1948
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/235
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/235
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/235/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/235
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2555
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3607
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3607/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10289
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1631
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2193
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2193/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1043/rebuild

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

FAILED: Continuous integration, rev:805
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1048/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2418
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1970
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/240
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/240
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/240/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/240
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2587
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3649
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3649/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10331
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1649
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2220
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2220/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1048/rebuild

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

FAILED: Continuous integration, rev:807
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1064/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2503
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2021
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/256
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/256
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/256/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/256
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2655
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3746
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3746/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10428
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1690
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2274
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2274/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1064/rebuild

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

FAILED: Continuous integration, rev:809
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1222/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3462
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2722
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/415
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/411
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/411/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/414
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3366
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4709
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4709/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11380
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2199
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2999
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2999/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1222/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Iain Lane (laney) wrote :

Please could you make sure the AP tests are passing. Also remove all stray warnings.

If this isn't ready - some comments suggest it isn't - set the branch to WIP please.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:810
http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/1223/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3473
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2730
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/416
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/412
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/412/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/415
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3374
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4720
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4720/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11394
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2206
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3007
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3007/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/1223/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

See inline comments. There's some Loader magic going on. Happy to explain, but for now, remove the data preference code in PageComponent as well as the code that re-creates a lot of ofono objects.

review: Needs Fixing
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Fixed one, need some help with the other. Thanks.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
950. By Mathieu Trudel-Lapierre

Fix PIN code or passcode requests by properly matching the tag for the original request. Fixes: 1355152
Approved by: Sebastien Bacher, PS Jenkins bot

951. By PS Jenkins bot

Releasing 0.3+14.10.20140827.1-0ubuntu1

Revision history for this message
Ken VanDine (ken-vandine) wrote :

There are a number of asserts in the code with comments that they should be removed, like:
// just asserting to verify the logic
// remove once proven functional

Those should probably removed.

There are a number of places with commented out code (like properties), other than the TODOs and place holders for future work. Please remove them if they aren't needed.

review: Needs Fixing
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :
Download full text (3.9 KiB)

I see the following output using those debs

2014-08-27 16:23:38,267 - WARNING - file:///usr/share/ubuntu/settings/system/qml-plugins/cellular/PageChooseCarrier.qml:67:17: Unable to assign [undefined] to QObject*
2014-08-27 16:23:38,308 - WARNING - QOfonoNetworkOperator::registerOperator() failed: QDBusError("org.ofono.Error.AccessDenied", "Operation not permitted")
2014-08-27 16:23:38,308 - WARNING - registerComplete failed with error: org.ofono.Error.AccessDenied Operation not permitted Falling back to default
2014-08-27 16:24:12,488 - WARNING - file:///usr/share/ubuntu/settings/system/qml-plugins/cellular/PageChooseApn.qml:268:5: QML Connections: Cannot assign to non-existent propert
y "onContextsChanged"
2014-08-27 16:24:12,493 - WARNING - file:///usr/share/ubuntu/settings/system/qml-plugins/cellular/PageChooseApn.qml:55: TypeError: Cannot read property 'contexts' of undefined
2014-08-27 16:24:12,494 - WARNING - file:///usr/share/ubuntu/settings/system/qml-plugins/cellular/PageChooseApn.qml:269:17: Unable to assign [undefined] to QObject*
pa

and this is syslog:

Aug 20 09:04:19 ubuntu-phablet URfkill[22242]: Modem found: '/ril_0'
Aug 20 09:04:19 ubuntu-phablet URfkill[22242]: killswitch state: KILLSWITCH_STATE_NO_ADAPTER new_state: KILLSWITCH_STATE_UNBLOCKED
Aug 20 09:04:19 ubuntu-phablet URfkill[22242]: Setting device 100 (WWAN) to unblocked
Aug 20 09:04:19 ubuntu-phablet URfkill[22242]: device_changed_cb: Fake Manufacturer Fake Modem Model
Aug 20 09:04:19 ubuntu-phablet URfkill[22242]: killswitch state: KILLSWITCH_STATE_UNBLOCKED new_state: KILLSWITCH_STATE_SOFT_BLOCKED
Aug 20 09:04:19 ubuntu-phablet URfkill[22242]: <warning> Could not set Online property in oFono: GDBus.Error:org.ofono.Error.Failed: Operation failed
Aug 20 09:04:19 ubuntu-phablet NetworkManager[1633]: <warn> OFONO modem set enabled failed: (19) Method "SetProperty" with signature "sv" on interface "org.ofono.ConnectionManag
er" doesn't exist
Aug 20 09:04:19 ubuntu-phablet /03mmsproxy: Adding route for MMS connection /310410528924256/context2 on /ril_0 (rmnet_usb0)
Aug 20 09:04:19 ubuntu-phablet /03mmsproxy: failed to add route: org.freedesktop.DBus.Error.UnknownObject: Method "GetProperties" with signature "" on interface "org.ofono.Conne
ctionContext" doesn't exist
Aug 20 09:04:19 ubuntu-phablet kernel: [34624.654748] mmc0: mmc_start_bkops: Starting bkops
Aug 20 09:04:20 ubuntu-phablet kernel: [34626.169291] mdm_power_down_common: MDM2AP_STATUS never went low. Doing a hard reset
Aug 20 09:04:21 ubuntu-phablet NetworkManager[1633]: <info> Auto-activating connection '/310410528924256/context2'.
Aug 20 09:04:21 ubuntu-phablet NetworkManager[1633]: <info> Activation (/ril_0) starting connection '/310410528924256/context2'
Aug 20 09:04:21 ubuntu-phablet NetworkManager[1633]: <info> (/ril_0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Aug 20 09:04:21 ubuntu-phablet NetworkManager[1633]: <info> Activation (/ril_0) Stage 1 of 5 (Device Prepare) scheduled...
Aug 20 09:04:21 ubuntu-phablet NetworkManager[1633]: <info> Activation (/ril_0) Stage 1 of 5 (Device Prepare) started...
Aug 20 09:04:21 ubuntu-phablet NetworkManager[1633]: <info> Activation (...

Read more...

952. By Jonas G. Drange

[main panel] add visual feedback on press
Approved by: Ken VanDine, PS Jenkins bot

953. By Sebastien Bacher

[language] workaround inconsistent languages casing Fixes: 1362123
Approved by: PS Jenkins bot

954. By Ken VanDine

SIM PIN lock implementation
Approved by: Jonas G. Drange

955. By Jonas G. Drange

[cellular] uses modemtechnologies property from ofono to populate technology preference options Fixes: 1346790
Approved by: Ken VanDine, PS Jenkins bot

956. By Sebastien Bacher

[background] Display the default background selected Fixes: 1349329
Approved by: Jonas G. Drange, PS Jenkins bot

957. By Sebastien Bacher

[storage] display translated names Fixes: 1360207
Approved by: Ken VanDine, PS Jenkins bot

958. By Sebastien Bacher

[updates] don't display animations when clicking on update rows Fixes: 1360364
Approved by: Ken VanDine, Alejandro J. Cura, PS Jenkins bot

959. By Sebastien Bacher

[background] don't use an icon in the headerbar Fixes: 1362122
Approved by: Jonas G. Drange

960. By PS Jenkins bot

Releasing 0.3+14.10.20140827.3-0ubuntu1

961. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

962. By Roberto Alsina

Don't crash the push helper in locales that have no .mo file Fixes: 1357506
Approved by: Sebastien Bacher, PS Jenkins bot

963. By Michael Terry

Update look and feel of wizard to more closely match the visual design.
Approved by: Sebastien Bacher, PS Jenkins bot

964. By Jussi Pakkanen

Minor cleanups.
Approved by: Ken VanDine, Sebastien Bacher, PS Jenkins bot

965. By PS Jenkins bot

Releasing 0.3+14.10.20140828.2-0ubuntu1

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
966. By Michael Terry

Implement the "When locked, allow:" portion of the Security & Privacy panel, so now the user can control whether the launcher and/or indicators are available while locked. (LP: #1358340) Fixes: 1358340
Approved by: Sebastien Bacher

967. By PS Jenkins bot

Releasing 0.3+14.10.20140828.3-0ubuntu1

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
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 :

OK, after extensive testing this should be good to go.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
968. By Sebastien Bacher

[security] tweak some pin locking details to match the design better
Approved by: Ken VanDine, PS Jenkins bot

969. By Michael Terry

When changing to swipe mode, it was possible that our policykit agent would not unregister itself, making the next attempt to change modes appear to work, but in truth fail. Also, no longer ask for a password to switch to swipe mode if policykit has a cached authentication for us.
 Fixes: 1350381, 1361137
Approved by: Ken VanDine, PS Jenkins bot

970. By PS Jenkins bot

Releasing 0.3+14.10.20140829.1-0ubuntu1

971. By PS Jenkins bot

Resync trunk

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

I get a large number (>50) of these when I enter the APN panel
2014-08-29 08:58:11,004 - WARNING - file:///usr/share/ubuntu/settings/system/qml-plugins/cellular/PageChooseCarrier.qml:28:1: QML PageChooseCarrier: Binding loop detected for property "height"

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

actually the above happens when you scroll the page

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

note to test these debs you need latest from
https://launchpad.net/ubuntu/utopic/armhf/accountsservice-ubuntu-schemas/0.0.3+14.10.20140827-0ubuntu1

Other than the binding loop seems good

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

WFM (krillin, telenor)

review: Approve
Revision history for this message
Ken VanDine (ken-vandine) wrote :

CI is failing because you changed the carrierSelector from an ItemSelector to an OptionSelector but didn't change the tests to match.

review: Needs Fixing
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Inline comment, typo in a visible string.

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

> I get a large number (>50) of these when I enter the APN panel
> 2014-08-29 08:58:11,004 - WARNING - file:///usr/share/ubuntu/settings/system
> /qml-plugins/cellular/PageChooseCarrier.qml:28:1: QML PageChooseCarrier:
> Binding loop detected for property "height"

This is a height property of the top level ItemPage which is not even being modified in PageChooseCarrier.qml at all. I would suspect it something to do with UITK or the OSK work that has gone in to the low levels.

If this does not affect the UX in any visible way, I would say it's totally minor and no reason to block the landing.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

You're anchoring the buttonRectangle to parent.bottom, which causes it to get pushed up above the input fields when the OSK is displayed. You should put it inside the flickable, so they stay below the inputs.

review: Needs Fixing
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Testing on krillin, I can't get a working context for my t-mobile US SIM. Looking at the output of list-contexts, it isn't setting the value I entered for MessageCenter.

Looking at the upstart logs, I see this output when trying to set the context:
2014-08-29 15:39:19,973 - CRITICAL - Context error on /ril_0/context3: Invalid arguments in method call

review: Needs Fixing
Revision history for this message
Ken VanDine (ken-vandine) wrote :

After re-reading the MP description, I see that the failure I get above is consistent with bug 1362068. So apparently this can't work until we get that bug fixed?

Revision history for this message
Ken VanDine (ken-vandine) wrote :

The implementation is considerably different from the [1]design, has someone from design looked at this?

[1] https://wiki.ubuntu.com/Networking

972. By Ken VanDine

Added setting for dialpad sounds to both the sound and phone panels.
Approved by: Jonas G. Drange, PS Jenkins bot

973. By Diego Sarmentero

- Fix out of sync image download
- Refresh scope after installation Fixes: 1324923, 1360369
Approved by: Jonas G. Drange, PS Jenkins bot

974. By Sebastien Bacher

[battery] refresh the graph on a minute basis
Approved by: Ken VanDine, PS Jenkins bot

975. By Sebastien Bacher

[notifications] use normal text style and ubuntushaped icons
Approved by: Ken VanDine, PS Jenkins bot

976. By PS Jenkins bot

Releasing 0.3+14.10.20140829.2-0ubuntu1

977. By PS Jenkins bot

Resync trunk

978. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

979. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

980. By Martin Pitt

POT update

981. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

982. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

983. By Loïc Minier

Manually merge lp:~mterry/ubuntu-system-settings/here-fixes and resync with
citrain PPA upload.

[ Michael Terry ]
* Make the HERE license optional, clearly mark it as a HERE license
  instead of an Ubuntu license, and connect it to the HERE backend.
[ CI bot ]
* Resync trunk
[ Martin Pitt ]
* POT update

984. By Sebastien Bacher

[security] don't mark "%1" string as translatable
Approved by: Ken VanDine, PS Jenkins bot

985. By Andrea Cimitan

Various fixes for wifi wizard page Fixes: 1362296, 1362553
Approved by: Michael Terry

986. By Jonas G. Drange

[about] print out phone numbers for dual sims as well
Approved by: PS Jenkins bot

987. By Michael Terry

Avoid another race condition when switching password types by completing all DBus operations synchronously as we exit the policykit agent. LP: 1361137
 Fixes: 1361137
Approved by: Ken VanDine, PS Jenkins bot

988. By Michael Terry

Fix the OSK not working on first boot.
When the wizard closes, shut down maliit-server and the indicators so that unity8 can start them itself. LP: 1362679

This was my fault, when I added logic to restart maliit-server and indicators after the language screen, I just moved those lines from the end of the wizard to the language screen. But we also need to restart after the wizard to capture the changed MIR_SOCKET value. Fixes: 1362679
Approved by: Ken VanDine, PS Jenkins bot

989. By Sebastien Bacher

[security] give a translation context to the 'None' string Fixes: 1362143
Approved by: Ken VanDine, PS Jenkins bot

990. By Sebastien Bacher

[licenses] display an error when the copyright can't be read Fixes: 1206150
Approved by: Ken VanDine, PS Jenkins bot

991. By Jonas G. Drange

[about/wifi] adding mac addresses for bt and wifi, and ip for wifi Fixes: 1356239
Approved by: Ken VanDine, Sebastien Bacher, PS Jenkins bot

992. By Jonas G. Drange

[language] explain to the user that a reboot is necessary for the change to take effect Fixes: 1240875
Approved by: PS Jenkins bot

993. By PS Jenkins bot

Releasing 0.3+14.10.20140904-0ubuntu1

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Here's the design review.

------

Thanks for helping me get the APN settings going on my handset. For
your convenience, I've attached a couple of screenshots of what I see.
Comparing the current implementation with
<https://wiki.ubuntu.com/Networking#apn-mobile>:

* "On the carrier screen, the “APN” item should be insensitive
    whenever the SIM is not associated with a carrier."

    When I'm in Flight Mode, (a) the carrier menu is empty, but (b) the
    "APN" item is still choosable. At least one of those is wrong
    (possibly both).

* On the APN screen, the radio lists are in Ubuntu shapes. If these
    are quick to remove, please remove them. Compare with the
    "Automatically"/"Manually" list on the Cellular screen, which
    looks much nicer.

* "The “Internet APN:” and “MMS APN:” radio lists should each consist
    of: * a “None” item, if no APN is currently activated for that
    connection type;..."

    On my handset, there are two items in the "Internet APN:" list, but
    neither of them are selected. If it's really true that no Internet
    APN is set on my phone, there should be a selected "None" item.

* Consequently, in the "MMS APN:" list, if I tap "Same APN as for
    Internet", I get a dialog: "Error: No Internet APN has been
    selected." Abolish this dialog, and instead just make that "Same
    APN" item insensitive whenever no Internet APN is selected.

* "Choosing “Custom Internet APN…” or “Custom MMS APN…” should open
    the relevant dialog..."

    These screens are currently stack pages instead of dialogs. This
    means that I can enter some settings, complete or not, then tap
    the Back button, and it isn't clear whether those settings will be
    saved or not, which is pretty confusing. Even worse, in the "Custom
    MMS APN" screen, the "Password" field is hidden partly under the
    "Cancel" and "Save" buttons, and partly under the OSK. And the
    field labels are weirdly close to the left edge of the screen.

* "“Internet APN”, “MMS APN”, “MMSC”, and “Proxy” should be URL
    fields (using the URL OSK and ignoring non-URL characters)..."

    Currently, "Internet APN", "MMS APN", "MMSC", and "Proxy" are all
    normal text fields, allowing impossible characters, and assuming
    that I want to capitalize and spell-check their contents when I do
    not.

* "...auto-inserting http:// on unfocus if no protocol was entered."

    This doesn't happen.

* When I tap "Activate", even after entering a non-existent APN name,
    the settings are apparently accepted without being tried.

Though I'm a perfectionist, I have a low bar for whether a feature is
better than nothing. But that last point is what makes me say no, this
isn't ready to land. If custom APNs aren't implemented at all yet, the
buttons and screens to specify them shouldn't be present, because
that's actively misleading. And if they are implemented, why is a
non-existent APN accepted?

994. By Mathieu Trudel-Lapierre

Downgrade qFatal failure to register bluetooth agent to a qCritical.
Approved by: Ken VanDine

995. By Guillermo Gonzalez

Basic unittest for the push-helper script
Approved by: Ken VanDine, PS Jenkins bot

996. By PS Jenkins bot

Releasing 0.3+14.10.20140904.1-0ubuntu1

997. By PS Jenkins bot

Resync trunk

998. By Ken VanDine

Tweak the depends for accountsservice-ubuntu-schemas to handle a "~" version

Approved by: Loïc Minier

999. By PS Jenkins bot

Releasing 0.3+14.10.20140904.2-0ubuntu1

1000. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1001. By David Barth

Enable location panel, display contols for authorized applications.
Approved by: Alexandre Abreu, PS Jenkins bot, Alberto Mardegan

1002. By PS Jenkins bot

Releasing 0.3+14.10.20140905.1-0ubuntu1

1003. By PS Jenkins bot

Resync trunk

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Antti has explained to me the current asynchronous and uncommunicative API that makes validating a custom APN impossible to implement for MMS, and impractically difficult for Internet, at least without a new API. So I withdraw the last point, and instead suggest that "Activate" should be merely "OK" (since it won't be doing any activation right then).

1004. By Michael Terry

Don't crash when destructing the Wizard.Utils.System plugin.
This fixes the crash on wizard exit and the crash when pressing back on the HERE license.

I hadn't realized that Qml destroys each plugin class on exit (probably should have been obvious). And since ours was statically allocated, things blew up. Solution is to let Qml handle the singleton status itself. Just give it an object pointer and let it be destroyed by Qml.
Approved by: Sebastien Bacher, PS Jenkins bot, Alberto Mardegan

1005. By Sebastien Bacher

[developer-mode] working scrolling and correct spacing
Approved by: Ken VanDine, PS Jenkins bot

1006. By Sebastien Bacher

Use standard items for the categories and don't display dividers Fixes: 1365563
Approved by: Ken VanDine

1007. By Jonas G. Drange

[about/versions] create reusable component of singlevalue items that have long values Fixes: 1363927
Approved by: Sebastien Bacher, PS Jenkins bot

1008. By Sebastien Bacher

[orientation-lock] don't display a frame around the icon Fixes: 1365450
Approved by: Ken VanDine, PS Jenkins bot

1009. By PS Jenkins bot

Releasing 0.3+14.10.20140908-0ubuntu1

1010. By Ricardo Salveti

sound: setting default audio role for ringtone and messages
Approved by: Jim Hodapp, Sebastien Bacher

1011. By PS Jenkins bot

Releasing 0.3+14.10.20140908.1-0ubuntu1

1012. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1013. By Mathieu Trudel-Lapierre

Also allow Speakers and Carkits as valid audio devices to pair.
Approved by: Sebastien Bacher

1014. By Ken VanDine

- Notify the user if the phone needs to be plug to power for update

Approved by: PS Jenkins bot

1015. By Sebastien Bacher

[system-update] don't draw a frame around ubuntu updates Fixes: 1367136
Approved by: Ken VanDine

1016. By Michael Terry

Allow switch from PIN code to passphrase and back using the same password. (LP: #1357043)

The reason this bug exists in the first place is that passwd doesn't let you switch to the same password. So while we could change the AccountsService password display hint just fine, we'd see an error from passwd and bail out. So IF the user gave us the correct password, we can ignore any errors from passwd if the new password is the same.

I also added some more verbose output in some error cases while I was there. It'll be helpful when debugging in the future (and I didn't want to separate it out into its own branch because conflicts). Fixes: 1357043
Approved by: Sebastien Bacher

1017. By Michael Terry

Fix false-negatives from AccountsService when switching from swipe to password (LP: #1363405)

When AccountsService switches from swipe to password (or back), it does several things (delete user password if moving to swipe, then adjust some group memberships like nopasswdlogin, then adjust some internal state).

But on Touch, the group membership change will fail since /etc/group is readonly. (But it doesn't matter, since AccountsService will note from its inotify monitor on /var/lib/extrausers/shadow that it needs to update its internal state.)

However! USS will see the failure and try to rollback to swipe instead of changing away from swipe. Except even then it will mess up. It won't make the same call again to AS to delete the password again, so we'll end up with the password changed but left in place. Producing the symptoms in bug 1363405. Fixes: 1363405
Approved by: Sebastien Bacher

1018. By PS Jenkins bot

Releasing 0.3+14.10.20140909-0ubuntu1

1019. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1020. By Ken VanDine

Don't call downloadUpdate for system updates that are already downloading (LP: #1365646)
 Fixes: 1311219, 1365646
Approved by: Sebastien Bacher

1021. By PS Jenkins bot

Releasing 0.3+14.10.20140911-0ubuntu1

1022. By Jonas G. Drange

[background] always keep custom images, and remove press-and-hold action. Fixes: 1365167
Approved by: Sebastien Bacher, PS Jenkins bot

1023. By Jonas G. Drange

[wifi] do not use predictive text for network name input Fixes: 1365992
Approved by: Sebastien Bacher

1024. By Jonas G. Drange

[language] workaround for transition bug in keyboard layout menu Fixes: 1350809
Approved by: Sebastien Bacher

1025. By Jonas G. Drange

[wifi] factory was setting the icon property, which was causing the icon to not render Fixes: 1364366
Approved by: Sebastien Bacher

1026. By Alejandro J. Cura

Fixing the refreshing of the apps scope Fixes: 1360369
Approved by: Sebastien Bacher, Rodney Dawes

1027. By Sebastien Bacher

[sound] use the correct backend to control the keyboard sound toggle Fixes: 1366208, 1367288

1028. By PS Jenkins bot

Releasing 0.3+14.10.20140911.1-0ubuntu1

1029. By Martin Pitt

update POT

1030. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1031. By Sebastien Bacher

[system-update] open the ubuntuone subpanel rather than the list Fixes: 1348580
Approved by: Ken VanDine

1032. By Ken VanDine

Fixed tests for the dialpad settings failing on mako

Approved by: Sebastien Bacher

1033. By Ken VanDine

Don't call downloadUpdate when we see a system update ready, the service does that for us (LP: #1368294) Fixes: 1368294
Approved by: Sebastien Bacher

1034. By Ken VanDine

Translate desktop file (LP: #1318008)
 Fixes: 1318008
Approved by: Sebastien Bacher

1035. By Sebastien Bacher

[security-privacy] use ngettext strings when needed Fixes: 1368159
Approved by: Ken VanDine

1036. By Sebastien Bacher

Increase vertical spacing in the settings grid Fixes: 1348579
Approved by: Ken VanDine

1037. By PS Jenkins bot

Releasing 0.3+14.10.20140911.3-0ubuntu1

1038. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1039. By Jussi Pakkanen

Hide entry to connect to hidden network when wifi is off. Fixes: 1365960
Approved by: Ken VanDine

1040. By Jonas G. Drange

[wifi] "Other Network" -> "Connect to hidden network" Fixes: 1365984
Approved by: Ken VanDine

1041. By Jonas G. Drange

[wifi] fix bad looking buttons in "Other Networks" panel Fixes: 1362127
Approved by: Ken VanDine

1042. By PS Jenkins bot

Releasing 0.3+14.10.20140912-0ubuntu1

1043. By Ken VanDine

Don't try to tweak the bottomMargin for the OSK, it was trying to calculate
it based on an undefined component so failing. It shouldn't be needed anyway.

Put the buttons in the Column.
Approved by: Jonas G. Drange

1044. By PS Jenkins bot

Releasing 0.3+14.10.20140913-0ubuntu1

1045. By PS Jenkins bot

Resync trunk

1046. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1047. By John Lenton

Take the system settings push helper closer to implementing the spec at https://wiki.ubuntu.com/SoftwareUpdates#Prompting Fixes: 1363972
Approved by: Sebastien Bacher, Roberto Alsina

1048. By PS Jenkins bot

Releasing 0.3+14.10.20140915-0ubuntu1

1049. By Lars Karlitski

Use Icon instead of StatusIcon

The latter is deprecated. Fixes: 1343553
Approved by: Sebastien Bacher, PS Jenkins bot

1050. By Ken VanDine

When activated by a url request for a specific panel, clear the pageStack
to maintain the natural navigation instead of pushing a new page on top of a
page from a the previous panel (LP: #1362025) Fixes: 1359953, 1362025
Approved by: Sebastien Bacher, PS Jenkins bot

1051. By PS Jenkins bot

Releasing 0.3+14.10.20140915.1-0ubuntu1

1052. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1053. By Mathieu Trudel-Lapierre

[bluetooth] don't try to enable Discoverable if the device isn't powered yet. Fixes: 1355904
Approved by: PS Jenkins bot

1054. By Ken VanDine

Include an icon instead of using the themed icon (LP: #1365408)
 Fixes: 1365408
Approved by: Mathieu Trudel-Lapierre, PS Jenkins bot

1055. By PS Jenkins bot

Releasing 0.3+14.10.20140917-0ubuntu1

1056. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1057. By Ken VanDine

Make UpdateManager a singleton and refresh the availableUpdates count when the model updates (LP: #1325629) Fixes: 1325629
Approved by: Diego Sarmentero

1058. By PS Jenkins bot

Releasing 0.3+14.10.20140917.1-0ubuntu1

1059. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1060. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1061. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1062. By Albert Astals Cid

make pot

1063. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1064. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1065. By Oliver Grawert

fix LP: #1365903, add a watch to Developer Mode page so the page gets refreshed when going back through the page stack, also fix the page id and bounds Fixes: 1365903
Approved by: Iain Lane

1066. By PS Jenkins bot

Releasing 0.3+14.10.20140924-0ubuntu1

1067. By Michael Terry

Prevent the buttons of the wizard's password page from overlapping its content when the OSK appears. (LP: #1368346)

I added a Flickable to the page, so the page content can clip to the to top of the buttons. I also fixed the background image visibly moving up along with the OSK. Fixes: 1368346
Approved by: PS Jenkins bot

1068. By Ken VanDine

Set the version information in the SystemUpdate constructor (LP: #1371810)
 Fixes: 1371810
Approved by: Sebastien Bacher

1069. By Ken VanDine

[reset] Don't bail out on an isValid() check on the SystemImage QDBusInterface,
the docs say isValid() may not be reliable for remote interfaces (LP: #1370815) Fixes: 1370815
Approved by: Jonas G. Drange, Sebastien Bacher

1070. By Ken VanDine

Fixed reference error for count on the various device models (LP: #1362517)
 Fixes: 1362517
Approved by: Sebastien Bacher, PS Jenkins bot

1071. By Iain Lane

Don't check if the timedated interface is valid before calling SetTime on it, it might have timed out and we should reactivate it in that case.
Approved by: Sebastien Bacher

1072. By Iain Lane

Misc packaging fixes
Approved by: Sebastien Bacher, PS Jenkins bot

1073. By Iain Lane

[about] Fix developerMode property to be QMLish - read & write instead of separate "read" and "toggle" properties.
Approved by: Sebastien Bacher, PS Jenkins bot

1074. By Iain Lane

[about] Don't display a frame for icons that can't be found, improving the visual appearance. Also return the correct path for click packages which use the icon theme.
Approved by: Sebastien Bacher

1075. By Ken VanDine

[background] Use the ContentPeerPicker to select sources for
backgrounds (LP: #1356542) Fixes: 1356542
Approved by: Sebastien Bacher

1076. By Sebastien Bacher

[storage] handle the scope click .ini and get the correct icons Fixes: 1368920
Approved by: Iain Lane

1077. By PS Jenkins bot

Releasing 0.3+14.10.20140924.1-0ubuntu1

1078. By Michael Terry

Add a translator comment for what HERE means. (LP: #1368838) Fixes: 1368838
Approved by: Iain Lane, PS Jenkins bot

1079. By Michael Terry

Prevent a crash in unity8 when the wizard also crashes or stops early. (LP: #1355892)

Move some of the socket cleanup from the 'cleanup' wizard job to the main job, while also avoiding the race that would create by stopping and starting unity8's job more carefully. Fixes: 1355892
Approved by: Ken VanDine, Sebastien Bacher

1080. By PS Jenkins bot

Releasing 0.3+14.10.20140925-0ubuntu1

1081. By PS Jenkins bot

Resync trunk

1082. By Albert Astals Cid

Add i18n.tr
Approved by: Sebastien Bacher, PS Jenkins bot

1083. By Jonas G. Drange

[wifi] connect to hidden network is now a dialog Fixes: 1366005, 1366006
Approved by: Ken VanDine, PS Jenkins bot

1084. By Ken VanDine

Provide more keywords to make search useful (LP: #1370219)
 Fixes: 1370219
Approved by: Sebastien Bacher, PS Jenkins bot

1085. By Mathieu Trudel-Lapierre

[bluetooth] Properly handle device types for connection and disconnection. Fixes: 1369964
Approved by: Sebastien Bacher, PS Jenkins bot

1086. By Sebastien Bacher

[storage] use libclick rather than calling the command line Fixes: 1368967
Approved by: PS Jenkins bot, Alberto Mardegan

1087. By Ken VanDine

[background] set sourceSize in the image preview to work around an issue
loading large images Fixes: 1373462
Approved by: Sebastien Bacher

1088. By Sebastien Bacher

[storage] tweaks to the disk informations, limit the free space to the
user available one (excluding the system partitions), don't list the
external mounts, that's described in the design and is going to require
work on the categories computation to give correct values Fixes: 1284247
Approved by: Ken VanDine, PS Jenkins bot

1089. By Sebastien Bacher

[about] display the free space value next to the storage label Fixes: 1335144
Approved by: Ken VanDine

1090. By PS Jenkins bot

Releasing 0.3+14.10.20140926-0ubuntu1

1091. By PS Jenkins bot

Resync trunk

1092. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1093. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1094. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1095. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1096. By Ken VanDine

* Fixed handling of the Downloading/Installing label based on actual state.
* Forward updateProgress signals for system updates
* Layout fixes Fixes: 1312587, 1316933, 1318593, 1371157
Approved by: Diego Sarmentero, PS Jenkins bot

1097. By Ken VanDine

Use new splash screen
 Fixes: 1376242
Approved by: Pat McGowan, Sebastien Bacher, PS Jenkins bot

1098. By Ken VanDine

Improved tracking download states
Approved by: Jonas G. Drange, Sebastien Bacher

1099. By Ken VanDine

Use new target_build_number from system-image-dbus to determine visibility of the update notification
 Fixes: 1355803
Approved by: Sebastien Bacher

1100. By PS Jenkins bot

Releasing 0.3+14.10.20141001-0ubuntu1

1101. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

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

> Here's the design review.
>
> ------
>
> Thanks for helping me get the APN settings going on my handset. For
> your convenience, I've attached a couple of screenshots of what I see.
> Comparing the current implementation with
> <https://wiki.ubuntu.com/Networking#apn-mobile>:
>
> * "On the carrier screen, the “APN” item should be insensitive
> whenever the SIM is not associated with a carrier."
>
> When I'm in Flight Mode, (a) the carrier menu is empty, but (b) the
> "APN" item is still choosable. At least one of those is wrong
> (possibly both).

Fixed both.

> * On the APN screen, the radio lists are in Ubuntu shapes. If these
> are quick to remove, please remove them. Compare with the
> "Automatically"/"Manually" list on the Cellular screen, which
> looks much nicer.

We could argue that the OptionSelector looks way better, but let's be consistently ugly ;)
Fixed.

> * "The “Internet APN:” and “MMS APN:” radio lists should each consist
> of: * a “None” item, if no APN is currently activated for that
> connection type;..."
>
> On my handset, there are two items in the "Internet APN:" list, but
> neither of them are selected. If it's really true that no Internet
> APN is set on my phone, there should be a selected "None" item.

Will land this separately when we get nuntium support for multiple MMS APN contexts.

> * Consequently, in the "MMS APN:" list, if I tap "Same APN as for
> Internet", I get a dialog: "Error: No Internet APN has been
> selected." Abolish this dialog, and instead just make that "Same
> APN" item insensitive whenever no Internet APN is selected.

Done. No more dialogs.

> * "Choosing “Custom Internet APN…” or “Custom MMS APN…” should open
> the relevant dialog..."
>
> These screens are currently stack pages instead of dialogs. This
> means that I can enter some settings, complete or not, then tap
> the Back button, and it isn't clear whether those settings will be
> saved or not, which is pretty confusing. Even worse, in the "Custom
> MMS APN" screen, the "Password" field is hidden partly under the
> "Cancel" and "Save" buttons, and partly under the OSK. And the
> field labels are weirdly close to the left edge of the screen.

jgdx takes care of this in a separate landing.

> * "“Internet APN”, “MMS APN”, “MMSC”, and “Proxy” should be URL
> fields (using the URL OSK and ignoring non-URL characters)..."
>
> Currently, "Internet APN", "MMS APN", "MMSC", and "Proxy" are all
> normal text fields, allowing impossible characters, and assuming
> that I want to capitalize and spell-check their contents when I do
> not.

I set the relevant hints, but seems the TextField is not validating based on them. We should at least now get a custom OSK for them.

> * "...auto-inserting http:// on unfocus if no protocol was entered."
>
> This doesn't happen.

Nope. Will either fix this on the next landing or file a medium bug.

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

> Antti has explained to me the current asynchronous and uncommunicative API
> that makes validating a custom APN impossible to implement for MMS, and
> impractically difficult for Internet, at least without a new API. So I
> withdraw the last point, and instead suggest that "Activate" should be merely
> "OK" (since it won't be doing any activation right then).

For Internet it's "Activate" as that we can actually try to activate but don't get any feedback if it succeeds or not. If the config is bad, NM starts to try the other available APNs until it either finds one that works or gives up. You see the selected APN changing in the list while NM does it's magic.

For MMS it's "Save" as that is what it does.

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

APN editor: Buttons stay pressed after first tap:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-system-settings/+bug/1376696

APN editor: Grey selection box when tapping just below/above the last/first entry.
https://bugs.launchpad.net/ubuntu/+source/ubuntu-system-settings/+bug/1376713

APN editor: Pressing enter key should shift focus to next field.
https://bugs.launchpad.net/ubuntu/+source/ubuntu-system-settings/+bug/1376714

APN editor: Selected APN states don't persist on exit and re-entry
https://bugs.launchpad.net/ubuntu/+source/ubuntu-system-settings/+bug/1376720

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Please put the button rectangle inside the flickable instead of anchoring the flickable to the top. We've run into this problem in a number of places in other plugins, putting them inside the flickable has worked out much better.

Please see inline comments

review: Needs Fixing
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

Could you quickly improve the throwing of exceptions? It might be a bit cryptic as it is?

Also, I added a comment about the tmp variable not being a copy (forgive me if that was intended) and a small inconsistency referring to the __suppress… flag.

See inline comments.

review: Needs Fixing
1102. By Jonas G. Drange

[cellular] react to application.state changes and update potential out-of-date default SIM settings Fixes: 1364103
Approved by: Ken VanDine, PS Jenkins bot

1103. By Sebastien Bacher

[location] use a flickable so the list can be scrolled Fixes: 1374017
Approved by: Ken VanDine, PS Jenkins bot

1104. By Jonas G. Drange

[wifi] let removed networks update the previous network model so that we can reuse the model (and not pop the pagestack twice, causing this ux issue) Fixes: 1370389
Approved by: Ken VanDine, PS Jenkins bot

1105. By Sebastien Bacher

[security] get localized application names from the trust-store
 Fixes: 1374018
Approved by: Ken VanDine, Alberto Mardegan

1106. By PS Jenkins bot

Releasing 0.3+14.10.20141002-0ubuntu1

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1107. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1108. By Iain Lane

[storage/about] Use a QSharedPointer to manage freeing of the counter which we use to display all of the collected sizes at once. If the measuring process was cancelled, we were freeing it multiple times - once for each outstanding size measurement. This led to a crash. Fixes: 1375988
Approved by: Sebastien Bacher, PS Jenkins bot

1109. By Iain Lane

[security-privacy] Link with gobject, uses symbols from this library. Prevents "[…]libUbuntuSecurityPrivacyPanel.so contains an unresolvable reference to symbol g_signal_handlers_disconnect_matched: it's probably a plugin" warnings.
Approved by: Sebastien Bacher

1110. By PS Jenkins bot

Releasing 0.3+14.10.20141003-0ubuntu1

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1111. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1112. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1113. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

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

Fixed by the review comments in r980. The only non-trivial comments are:

Ken VanDine (ken-vandine) wrote:
> I think you shouldn't be anchoring to the buttonRectangle,
> the buttonRectangle should be in the Flickable.

Yes. I know, but in this case the user usually just enters two of the top fields and having the buttons always visible has some value. I took great care on verifying that the buttons react properly on the viewport changes. If I get it to break on my last testing round, then I will put the buttons inside the flickable, OK?

Ken VanDine (ken-vandine) wrote:
> Does this really return an empty list?
> Perhaps it would be safer to set connections to a QStringList()

the connection list is an array of object paths. QDBusPendingReply quarantees that .value() returns a default constructed T, which in this case is an empty array of dbus-paths.

For the logic that follows it's really irrelevant if an empty list is received (that is also a valid reply).

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

Now resolving merge conflicts.
IMHO the dynamic SIM logic is a bit broken, but it's more or less a design question. Let's continue on that after this MP is in.

1114. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1115. By Jonas G. Drange

[wifi/phone] dynamically chooses what SIM to use when there's only one present. Fixes: 1375832
Approved by: Ken VanDine, PS Jenkins bot

1116. By PS Jenkins bot

Releasing 0.3+14.10.20141007-0ubuntu1

1117. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1118. By Launchpad Translations on behalf of system-settings-touch

Launchpad automatic translations update.

1119. By Ken VanDine

merged apneditor

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/cellular/CMakeLists.txt'
--- plugins/cellular/CMakeLists.txt 2014-08-17 14:50:51 +0000
+++ plugins/cellular/CMakeLists.txt 2014-10-03 20:40:51 +0000
@@ -4,6 +4,8 @@
4install(FILES settings-cellular.svg DESTINATION ${PLUGIN_MANIFEST_DIR}/icons)4install(FILES settings-cellular.svg DESTINATION ${PLUGIN_MANIFEST_DIR}/icons)
55
6set(QML_SOURCES6set(QML_SOURCES
7 CustomApnEditor.qml
8 PageChooseApn.qml
7 PageChooseCarrier.qml9 PageChooseCarrier.qml
8 PageChooseCarriers.qml10 PageChooseCarriers.qml
9 PageComponent.qml11 PageComponent.qml
@@ -18,6 +20,8 @@
18 plugin.h20 plugin.h
19 hotspotmanager.cpp21 hotspotmanager.cpp
20 hotspotmanager.h22 hotspotmanager.h
23 ofonoactivator.cpp
24 ofonoactivator.h
21 nm_manager_proxy.h25 nm_manager_proxy.h
22 nm_settings_proxy.h26 nm_settings_proxy.h
23 nm_settings_connection_proxy.h27 nm_settings_connection_proxy.h
2428
=== modified file 'plugins/cellular/Components/CMakeLists.txt'
--- plugins/cellular/Components/CMakeLists.txt 2014-08-21 20:25:08 +0000
+++ plugins/cellular/Components/CMakeLists.txt 2014-10-03 20:40:51 +0000
@@ -9,3 +9,9 @@
9 SimEditor.qml9 SimEditor.qml
10)10)
11install(FILES ${QML_SOURCES} DESTINATION ${PLUGIN_QML_DIR}/cellular/Components)11install(FILES ${QML_SOURCES} DESTINATION ${PLUGIN_QML_DIR}/cellular/Components)
12
13# add a phony target to get the files visible in Qt Creator.
14add_custom_target(
15 plugins_cellular_components_sources
16 SOURCES ${QML_SOURCES}
17)
1218
=== modified file 'plugins/cellular/Components/MultiSim.qml'
--- plugins/cellular/Components/MultiSim.qml 2014-08-19 23:24:04 +0000
+++ plugins/cellular/Components/MultiSim.qml 2014-10-03 20:40:51 +0000
@@ -33,7 +33,7 @@
33 property var settings: phoneSettings33 property var settings: phoneSettings
3434
35 CellularMultiSim {35 CellularMultiSim {
36 anchors { left: parent.left; right: parent.right }36 anchors { left: parent.left; right: parent.right }
37 }37 }
3838
39 ListItem.Divider {}39 ListItem.Divider {}
@@ -68,6 +68,7 @@
68 text: i18n.tr("Carriers")68 text: i18n.tr("Carriers")
69 id: chooseCarrier69 id: chooseCarrier
70 objectName: "chooseCarrier"70 objectName: "chooseCarrier"
71 enabled: sim.netReg.status !== ""
71 progression: enabled72 progression: enabled
72 onClicked: {73 onClicked: {
73 pageStack.push(Qt.resolvedUrl("../PageChooseCarriers.qml"), {74 pageStack.push(Qt.resolvedUrl("../PageChooseCarriers.qml"), {
@@ -79,13 +80,13 @@
79 ListItem.Divider {}80 ListItem.Divider {}
8081
81 SimEditor {82 SimEditor {
82 anchors { left: parent.left; right: parent.right }83 anchors { left: parent.left; right: parent.right }
83 }84 }
8485
85 ListItem.Divider {}86 ListItem.Divider {}
8687
87 DefaultSim {88 DefaultSim {
88 anchors { left: parent.left; right: parent.right }89 anchors { left: parent.left; right: parent.right }
89 }90 }
9091
91 GSettings {92 GSettings {
@@ -99,7 +100,7 @@
99 if (!simNames[m0]) {100 if (!simNames[m0]) {
100 simNames[m0] = "SIM 1";101 simNames[m0] = "SIM 1";
101 }102 }
102 if (!simNames[m1]) {103 if (!simNames[m1]) {
103 simNames[m1] = "SIM 2";104 simNames[m1] = "SIM 2";
104 }105 }
105 phoneSettings.simNames = simNames;106 phoneSettings.simNames = simNames;
106107
=== modified file 'plugins/cellular/Components/SingleSim.qml'
--- plugins/cellular/Components/SingleSim.qml 2014-08-22 10:53:16 +0000
+++ plugins/cellular/Components/SingleSim.qml 2014-10-03 20:40:51 +0000
@@ -28,10 +28,10 @@
28 property var sim28 property var sim
2929
30 CellularSingleSim {30 CellularSingleSim {
31 anchors { left: parent.left; right: parent.right }31 anchors { left: parent.left; right: parent.right }
32 }32 }
3333
34 ListItem.Divider {}34 ListItem.Divider {}
3535
36 ListItem.SingleValue {36 ListItem.SingleValue {
37 text : i18n.tr("Hotspot disabled because Wi-Fi is off.")37 text : i18n.tr("Hotspot disabled because Wi-Fi is off.")
@@ -60,9 +60,10 @@
60 objectName: "chooseCarrier"60 objectName: "chooseCarrier"
61 progression: enabled61 progression: enabled
62 value: sim.netReg.name || i18n.tr("N/A")62 value: sim.netReg.name || i18n.tr("N/A")
63 enabled: sim.netReg.status !== ""
63 onClicked: {64 onClicked: {
64 pageStack.push(Qt.resolvedUrl("../PageChooseCarrier.qml"), {65 pageStack.push(Qt.resolvedUrl("../PageChooseCarrier.qml"), {
65 netReg: sim.netReg,66 sim: sim,
66 title: i18n.tr("Carrier")67 title: i18n.tr("Carrier")
67 })68 })
68 }69 }
6970
=== added file 'plugins/cellular/CustomApnEditor.qml'
--- plugins/cellular/CustomApnEditor.qml 1970-01-01 00:00:00 +0000
+++ plugins/cellular/CustomApnEditor.qml 2014-10-03 20:40:51 +0000
@@ -0,0 +1,322 @@
1/*
2 * This file is part of system-settings
3 *
4 * Copyright (C) 2014 Canonical Ltd.
5 *
6 * Contact: Pat McGowan <pat.mcgowan@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import QtQuick 2.0
22import QtQuick.Layouts 1.1
23import SystemSettings 1.0
24import Ubuntu.Components 1.1
25import Ubuntu.Components.ListItems 1.0 as ListItem
26
27ItemPage {
28 objectName: "customapnPage"
29 id: root
30
31 // "internet" or "mms"
32 property var type
33
34 // dict of "type" : ctx
35 property var contexts;
36
37 /// work around LP(#1361919)
38 property var activateCb;
39
40 QtObject {
41 id: d
42 property var typeText : type === "internet" ? i18n.tr("Internet") : i18n.tr("MMS")
43 property bool isMms : type === "mms"
44
45 property bool isValid : false
46
47 function validateFields() {
48 if (apnName.text === "") {
49 isValid = false;
50 return
51 }
52 if (isMms) {
53 if (mmsc.text === "") {
54 isValid = false;
55 return;
56 }
57 /// @todo validate proxy
58 /// @todo force port to be integer and validate it's value
59 }
60
61 // @todo the rest
62 isValid = true;
63 }
64 }
65
66 //TRANSLATORS: %1 is either i18n.tr("Internet") or i18n.tr("MMS")
67 title: i18n.tr("Custom %1 APN").arg(d.typeText)
68
69 // workaround of getting the following error on startup:
70 // WARNING - ... : QML Page: Binding loop detected for property "flickable"
71 flickable: null
72 Component.onCompleted: {
73 flickable: scrollWidget
74
75 var ctx;
76 if (d.isMms) {
77 ctx = contexts["mms"];
78 if (ctx === undefined) {
79 // @bug LP(:#1362795)
80 return;
81 }
82 } else {
83 ctx = contexts["internet"]
84 }
85
86 apnName.text = ctx.accessPointName;
87 userName.text = ctx.username;
88 pword.text = ctx.password;
89 mmsc.text = ctx.messageCenter;
90 var proxyText = ctx.messageProxy.split(":");
91 proxy.text = proxyText[0] !== undefined ? proxyText[0] : "";
92 port.text = proxyText[1] !== undefined ? proxyText[1] : "";
93 /// @todo protocol values
94
95 if (d.isMms) {
96 /// @todo disabled for now
97 doBoth.checked = false;
98 return;
99 var internetApn = contexts["internet"]
100 if (ctx.accessPointName === internetApn.accessPointName &&
101 ctx.username == internetApn.username &&
102 ctx.password == internetApn.password
103 /* auth + procol */) {
104 doBoth.checked = true;
105 }
106 else
107 doBoth.checked = false;
108 }
109 }
110
111 Flickable {
112 id: scrollWidget
113 anchors {
114 top: parent.top
115 left: parent.left
116 right: parent.right
117 bottom: parent.bottom
118 }
119 contentWidth: parent.width
120 clip: true
121 contentHeight: theContents.height
122 boundsBehavior: (contentHeight > height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
123 flickableDirection: Flickable.VerticalFlick
124
125 Item {
126 id: theContents
127 height: sameSwitch.height + theGrid.height
128 width: parent.width
129
130 ListItem.Standard {
131 id: sameSwitch
132 anchors.top: parent.top
133 /// @todo disable for now
134 //visible: d.isMms
135 visible: false
136 text: i18n.tr("Same APN as for Internet")
137 control: Switch {
138 id: doBoth
139 checked: false
140 anchors.verticalCenter: parent.verticalCenter
141 onClicked: {
142 if (checked) {
143 var internetApn = contexts["internet"]
144 apnName.text = internetApn.accessPointName;
145 userName.text = internetApn.username;
146 pword.text = internetApn.password;
147 }
148 }
149 }
150 }
151
152 GridLayout {
153 id: theGrid
154 columns: 2
155 columnSpacing: units.gu(1)
156 rowSpacing: units.gu(1)
157 anchors{
158 top: d.isMms ? sameSwitch.bottom : parent.top
159 right: parent.right
160 left:parent.left
161 margins: units.gu(0.5)
162 }
163
164 Label {
165 //TRANSLATORS: %1 is either i18n.tr("Internet") or i18n.tr("MMS")
166 text: i18n.tr("%1 APN").arg(d.typeText)
167 }
168 TextField {
169 id: apnName
170 enabled: !doBoth.checked
171 onTextChanged: d.validateFields()
172 inputMethodHints: Qt.ImhUrlCharactersOnly | Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
173 }
174
175 Label {
176 text: i18n.tr("MMSC")
177 visible: d.isMms
178 }
179 TextField {
180 id: mmsc
181 visible: d.isMms
182 onTextChanged: d.validateFields()
183 inputMethodHints: Qt.ImhUrlCharactersOnly | Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
184 }
185 Label {
186 text: i18n.tr("Proxy")
187 visible: d.isMms
188 }
189 TextField {
190 id: proxy
191 visible: d.isMms
192 onTextChanged: d.validateFields()
193 inputMethodHints: Qt.ImhUrlCharactersOnly | Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
194 }
195 Label {
196 text: "Port"
197 visible: d.isMms
198 }
199 TextField {
200 id: port
201 visible: d.isMms
202 maximumLength: 4
203 onTextChanged: d.validateFields()
204 inputMethodHints: Qt.ImhDigitsOnly | Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
205 }
206
207 Label {
208 text: i18n.tr("Username")
209 }
210 TextField {
211 id: userName
212 enabled: !doBoth.checked
213 inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
214 }
215
216 Label {
217 text: i18n.tr("Password")
218 }
219 TextField {
220 id: pword
221 enabled: !doBoth.checked
222 inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
223 }
224 /// @todo support for ipv6 will be added after RTM
225 }
226 Item {
227 id: buttonRectangle
228
229 height: cancelButton.height + units.gu(2)
230
231 anchors {
232 left: parent.left
233 right: parent.right
234 top: theGrid.bottom
235 }
236
237 Button {
238 id: cancelButton
239
240 text: i18n.tr("Cancel")
241
242 anchors {
243 left: parent.left
244 right: parent.horizontalCenter
245 bottom: parent.bottom
246 topMargin: units.gu(1)
247 leftMargin: units.gu(2)
248 rightMargin: units.gu(1)
249 bottomMargin: units.gu(1)
250 }
251
252 onClicked: {
253 pageStack.pop()
254 }
255 }
256
257 Button {
258 id: confirmButton
259
260 text: d.isMms ? i18n.tr("Save") : i18n.tr("Activate")
261
262 anchors {
263 left: parent.horizontalCenter
264 right: parent.right
265 bottom: parent.bottom
266 topMargin: units.gu(1)
267 leftMargin: units.gu(1)
268 rightMargin: units.gu(2)
269 bottomMargin: units.gu(1)
270 }
271
272 enabled: d.isValid;
273
274 onClicked: {
275 var ctx;
276 if (d.isMms)
277 ctx = contexts["mms"];
278 else
279 ctx = contexts["internet"];
280
281 /// @bug LP(:#1362795)
282 if (d.isMms && ctx === undefined) {
283 var mmsData = ({})
284 mmsData["accessPointName"] = apnName.text;
285 mmsData["username"] = userName.text;
286 mmsData["password"] = pword.text;
287 mmsData["messageCenter"] = mmsc.text
288 var proxyValue = "";
289 if (proxy.text !== "") {
290 proxyValue = proxy.text;
291 if (port.text !== "")
292 proxyValue = proxyValue + ":" + port.text;
293 }
294 mmsData["messageProxy"] = proxyValue;
295 activateCb("mms", undefined, mmsData);
296 pageStack.pop();
297 return;
298 }
299
300 ctx.accessPointName = apnName.text;
301 ctx.username = userName.text;
302 ctx.password = pword.text;
303 if (d.isMms) {
304 ctx.messageCenter = mmsc.text;
305 var proxyValue = "";
306 if (proxy.text !== "") {
307 proxyValue = proxy.text;
308 if (port.text !== "")
309 proxyValue = proxyValue + ":" + port.text;
310 }
311 ctx.messageProxy = proxyValue
312 }
313 /// @todo map protocol values
314
315 activateCb(ctx.type, ctx.contextPath);
316 pageStack.pop();
317 }
318 }
319 } // item for buttons
320 } // the contents
321 } // the flickable
322}
0323
=== added file 'plugins/cellular/PageChooseApn.qml'
--- plugins/cellular/PageChooseApn.qml 1970-01-01 00:00:00 +0000
+++ plugins/cellular/PageChooseApn.qml 2014-10-03 20:40:51 +0000
@@ -0,0 +1,580 @@
1/*
2 * This file is part of system-settings
3 *
4 * Copyright (C) 2014 Canonical Ltd.
5 *
6 * Contact: Pat McGowan <pat.mcgowan@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import QtQuick 2.0
22import SystemSettings 1.0
23import Ubuntu.Components 1.1
24import Ubuntu.Components.Popups 0.1
25import Ubuntu.Components.ListItems 0.1 as ListItem
26import MeeGo.QOfono 0.2
27import Ubuntu.SystemSettings.Cellular 1.0
28
29ItemPage {
30 id: root
31 title: i18n.tr("APN")
32 objectName: "apnPage"
33
34 property var sim
35
36 QtObject {
37 id: d
38
39 // map of contextPath : connCtx
40 property var mContexts: ({})
41
42 readonly property string mCustomContextNameInternet: "___ubuntu_custom_apn_internet"
43 readonly property string mCustomContextNameMms: "___ubuntu_custom_apn_mms"
44 property var mCustomContextInternet : undefined
45 property var mCustomContextMms : undefined
46
47 // LP(:#1362795)
48 property var pendingCustomMmsData : ({})
49
50 // suppress any actions that we don't want to take
51 // when updating selectedIndexes, etc
52 property bool __suppressActivation : true;
53
54 function isEmptyCustom (type, ctx)
55 {
56 /* OK, this sucks _hard_,
57 * QOfono does not return the added context, so instead we have to "figure it out"
58 * by looking for "contextAdded" for totally empty context with default Name values.
59 * LP(#1361864)
60 */
61
62 var targetName = "";
63 var targetAccessPointName = "";
64 if (type === "internet") {
65 targetName = "Internet";
66 targetAccessPointName = "";
67 } else if (type == "mms") {
68 targetName = "MMS";
69 targetAccessPointName = "";
70 }
71
72 if (ctx.type === type &&
73 ctx.name === targetName &&
74 ctx.accessPointName === targetAccessPointName)
75 return true;
76 return false;
77 }
78
79 function updateContexts()
80 {
81 var tmp = sim.connMan.contexts.slice(0);
82 var added = tmp.filter(function(i) {
83 return mContexts[i] === undefined;
84 });
85 var removed = Object.keys(mContexts).filter(function(i) {
86 return tmp.indexOf(i) === -1;
87 })
88
89 removed.forEach(function(currentValue, index, array) {
90 // just asserting to verify the logic
91 // remove once proven functional
92 if (mContexts[currentValue] === undefined) {
93 throw "updateContexts: removed is broken";
94 }
95
96 if (mContexts[currentValue].name === mCustomContextNameInternet)
97 mCustomContextInternet = undefined
98 else if (mContexts[currentValue].name === mCustomContextNameMms)
99 mCustomContextMms = undefined
100
101 mContexts[currentValue].destroy();
102 delete mContexts[currentValue];
103 });
104
105 added.forEach(function(currentValue, index, array) {
106 // just asserting to verify the logic
107 // remove once proven functional
108 if (mContexts[currentValue] !== undefined) {
109 throw "updateContexts: added is broken";
110 }
111
112 var ctx = connCtx.createObject(parent,
113 {
114 "contextPath": currentValue
115 });
116 mContexts[currentValue] = ctx;
117
118 if (isEmptyCustom("internet", ctx))
119 {
120 ctx.name = mCustomContextNameInternet;
121 // name updates async, so return here and
122 // have the buildLists() called from Context::onNameChanged
123 return;
124 } else if (isEmptyCustom("mms", ctx))
125 {
126 ctx.name = mCustomContextNameMms;
127 ctx.accessPointName = pendingCustomMmsData["accessPointName"];
128 ctx.username = pendingCustomMmsData["username"];
129 ctx.password = pendingCustomMmsData["password"];
130 ctx.messageCenter = pendingCustomMmsData["messageCenter"];
131 ctx.messageProxy = pendingCustomMmsData["messageProxy"];
132 pendingCustomMmsData = ({});
133 // values update async, so return here and
134 // have the buildLists() called from Context::onNameChanged
135 return;
136 }
137 });
138
139 // just asserting to verify the logic
140 // remove once proven functional
141 if (Object.keys(mContexts).length !== tmp.length) {
142 throw "Object.keys(contexts).length !== tmp.length";
143 }
144 tmp.forEach(function(currentValue, index, array) {
145 if (mContexts[currentValue] === undefined)
146 throw "contexts[currentValue] === undefined";
147 });
148
149 buildLists();
150 }
151
152 // expects updateContexts() to have ran before executing.
153 function checkAndCreateCustomContexts()
154 {
155 var customInternet = Object.keys(mContexts).filter(function (i) {
156 var ctx = mContexts[i];
157 return ctx.name === mCustomContextNameInternet ||
158 isEmptyCustom("internet", ctx);
159 });
160 var customMms = Object.keys(mContexts).filter(function (i) {
161 var ctx = mContexts[i];
162 return ctx.name === mCustomContextNameMms ||
163 isEmptyCustom("mms", ctx);
164 });
165
166 // make sure there is only one context per type
167 if (customInternet.length > 1) {
168 customInternet.forEach(function(currentValue, index, array) {
169 if (index === 0)
170 return;
171 sim.connMan.removeContext(currentValue);
172 });
173 }
174 if (customMms.length > 1) {
175 customMms.forEach(function(currentValue, index, array) {
176 if (index === 0)
177 return;
178 sim.connMan.removeContext(currentValue);
179 });
180 }
181
182 if (customInternet.length === 0) {
183 sim.connMan.addContext("internet");
184 }
185
186 // @bug don't create the custom MMS context
187 // LP(:#1362795)
188 // if (customMms.length === 0) {
189 // sim.connMan.addContext("mms");
190 // }
191
192 buildLists();
193 }
194
195 property var mInternetApns : [];
196 property var mMmsApns : [];
197 function buildLists()
198 {
199 d.__suppressActivation = true;
200
201 var internet = [];
202 var mms = [];
203
204 internet = Object.keys(mContexts).filter(function(i) {
205 var ctx = mContexts[i];
206 if (ctx.type === "internet") {
207 if (ctx.name === mCustomContextNameInternet) {
208 mCustomContextInternet = ctx
209 // don't add yet
210 return false;
211 }
212 return true;
213 }
214 return false;
215 });
216 mms = Object.keys(mContexts).filter(function(i) {
217 var ctx = mContexts[i];
218 if ( ctx.type === "mms") {
219 if (ctx.name === mCustomContextNameMms) {
220 mCustomContextMms = ctx;
221 // don't add yet
222 return false;
223 }
224 return true;
225 }
226 return false;
227 });
228
229 // make sure customized are the last on the lists
230 if (mCustomContextInternet !== undefined)
231 internet = internet.concat([mCustomContextInternet.contextPath])
232 if (mCustomContextMms !== undefined)
233 mms = mms.concat([mCustomContextMms.contextPath])
234 else {
235 /// @bug LP(#1361864)
236 // add anyway a "dummy" Custom so we can show at least the one provisioned
237 // MMS context as long as the user does not hit "Custom" in the MMS list.
238 mms = mms.concat(["dummycustom"])
239 }
240
241 // add "Same APN as for Internet" to be the first on the MMS list
242 mms = ["/same/as/internet"].concat(mms);
243
244 mInternetApns = internet;
245 mMmsApns = mms;
246
247 d.__suppressActivation = false;
248 }
249
250 function openApnEditor(type) {
251 var ctx;
252 if (type === "internet") {
253 ctx = mCustomContextInternet;
254 } else if (type == "mms") {
255 ctx = mCustomContextMms;
256 }
257 /// can't modify active context
258 if (ctx !== undefined && ctx.active)
259 ctx.active = false;
260
261 pageStack.push(Qt.resolvedUrl("CustomApnEditor.qml"),
262 {
263 type: type,
264 contexts: {"internet": mCustomContextInternet,
265 "mms": mCustomContextMms},
266 activateCb: activateHelper
267 });
268 }
269
270 function activateHelper(type, contextPath, customMmsData) {
271 if (type === "internet")
272 activator.activate(contextPath, sim.simMng.subscriberIdentity, sim.simMng.modemPath)
273 if (type === "mms") {
274 if (contextPath === undefined) {
275 // LP(:#1362795)
276 pendingCustomMmsData = customMmsData
277 /// remove any provisioned ones..
278 var remove = []
279 Object.keys(mContexts).forEach(function(currentValue, index, array) {
280 var ctx = mContexts[currentValue];
281 if (ctx.type === "mms")
282 remove = remove.concat([ctx.contextPath])
283 });
284 remove.forEach(function(currentValue, index, array) {
285 sim.connMan.removeContext(currentValue);
286 });
287 sim.connMan.addContext("mms")
288 }
289 }
290 }
291 }
292
293 OfonoActivator {
294 id:activator
295 }
296
297 Component {
298 id: connCtx
299 OfonoContextConnection {
300
301 // add helper property to detect dual internet/MMS contexts
302 property bool dual : false
303 Component.onCompleted:{
304 if (type == "internet")
305 if (messageCenter !== "")
306 dual = true
307 }
308
309 onActiveChanged: if (type === "internet") internetApnSelector.updateSelectedIndex()
310 onNameChanged: d.buildLists()
311 onAccessPointNameChanged: d.buildLists()
312 onReportError: console.error("Context error on " + contextPath + ": " + errorString)
313 }
314 }
315
316 Connections {
317 target: sim.connMan
318 onContextsChanged: d.updateContexts()
319
320 Component.onCompleted: {
321 d.updateContexts();
322 // do this once.
323 d.checkAndCreateCustomContexts();
324 }
325 }
326
327 Flickable {
328 id: scrollWidget
329 anchors.fill: parent
330 contentHeight: contentItem.childrenRect.height
331 boundsBehavior: (contentHeight > root.height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
332 flickableDirection: Flickable.VerticalFlick
333
334 Column {
335
336 anchors {
337 left: parent.left
338 right: parent.right
339 }
340
341 ListItem.Standard {
342 id: heading1
343 objectName: "internetapn"
344 text: i18n.tr("Internet APN:")
345 progression: false
346 }
347 ListItem.ThinDivider {}
348 ListItem.SingleControl {
349 control: ListItem.ItemSelector {
350 id: internetApnSelector
351 width: parent.width - units.gu(4)
352 model: d.mInternetApns
353 expanded: true
354 selectedIndex: -1
355 onModelChanged: updateSelectedIndex()
356
357 function updateSelectedIndex()
358 {
359 var tmp = d.__suppressActivation
360 d.__suppressActivation = true;
361 var idx = -1;
362 if (model) {
363 model.forEach(function(currentValue, index, array) {
364 if (d.mContexts[currentValue].active)
365 idx = index;
366 });
367 }
368 selectedIndex = idx;
369 d.__suppressActivation = tmp;
370 }
371
372 delegate: OptionSelectorDelegate {
373 showDivider: false
374 text: {
375 var ctx = d.mContexts[modelData];
376 if (ctx.name !== "") {
377 if (ctx.name !== d.mCustomContextNameInternet) {
378 return ctx.name
379 } else {
380 //: user visible name of the custom Internet APN
381 return i18n.tr("Custom");
382 }
383 } else {
384 return ctx.accessPointName
385 }
386 }
387 }
388 onSelectedIndexChanged: {
389 if (selectedIndex === -1) {
390 if (mmsApnSelector && mmsApnSelector.model[mmsApnSelector.selectedIndex] === "/same/as/internet")
391 mmsApnSelector.selectedIndex = -1;
392 return;
393 }
394
395 var ctx = d.mContexts[model[selectedIndex]];
396 if(ctx.dual) {
397 if (!d.mCustomContextMms)
398 mmsApnSelector.selectedIndex = mmsApnSelector.model.indexOf("/same/as/internet");
399 }
400 else if (mmsApnSelector.model[mmsApnSelector.selectedIndex] === "/same/as/internet")
401 mmsApnSelector.selectedIndex = -1;
402
403 if (d.__suppressActivation)
404 return;
405
406 if (d.mCustomContextInternet && model[selectedIndex] === d.mCustomContextInternet.contextPath) {
407 if (d.mCustomContextInternet.accessPointName === "") {
408 d.openApnEditor("internet");
409 updateSelectedIndex();
410 return;
411 }
412 }
413
414 d.activateHelper(ctx.contextPath);
415 }
416 }
417 }
418 ListItem.SingleControl {
419 control: Button {
420 objectName: "customApnEdit"
421 text: i18n.tr("Custom Internet APN…")
422 width: parent.width - units.gu(4)
423 onClicked: d.openApnEditor("internet")
424 }
425 }
426
427 ListItem.Divider {}
428
429 ListItem.Standard {
430 id: heading2
431 objectName: "mmsapn"
432 text: i18n.tr("MMS APN:")
433 progression: false
434 }
435 ListItem.ThinDivider {}
436 ListItem.SingleControl {
437 control: ListItem.ItemSelector {
438 id: mmsApnSelector
439 width: parent.width - units.gu(4)
440 model: d.mMmsApns
441 expanded: true
442 selectedIndex: -1
443 delegate: OptionSelectorDelegate {
444 showDivider: modelData === "/same/as/internet"
445 enabled: {
446 if (modelData !== "/same/as/internet")
447 return true;
448 else
449 d.mContexts[internetApnSelector.model[internetApnSelector.selectedIndex]].dual
450 }
451 // work around OptionSelectorDelegate not having a visual change depending on being disabled
452 opacity: enabled ? 1.0 : 0.5
453 text: {
454 if (modelData === "/same/as/internet") {
455 return i18n.tr("Same APN as for Internet");
456 }
457 if (modelData === "dummycustom") {
458 return i18n.tr("Custom");
459 }
460 var ctx = d.mContexts[modelData];
461 if (ctx.name !== "") {
462 if (ctx.name !== d.mCustomContextNameMms) {
463 return ctx.name
464 } else {
465 //: user visible name of the custom MMS APN
466 return i18n.tr("Custom");
467 }
468 } else {
469 return ctx.accessPointName
470 }
471 }
472 }
473 onModelChanged: updateSelectedIndex();
474 function updateSelectedIndex()
475 {
476 // if we have custom MMS context, it must be active.
477 // @bug LP(#1361864)
478 var tmp = d.__suppressActivation;
479 d.__suppressActivation = true;
480 if (d.mCustomContextMms) {
481 selectedIndex = model.indexOf(d.mCustomContextMms.contextPath);
482 } else if (model.length === 3) {
483 /* meaning we have:
484 * 0 - /same/as/internet
485 * 1 - some provisioned one
486 * 2 - dummycustom
487 */
488 selectedIndex = 1;
489 } else if (internetApnSelector.model && internetApnSelector.selectedIndex !== -1) {
490 if (d.mContexts[internetApnSelector.model[internetApnSelector.selectedIndex]].dual) {
491 selectedIndex = model.indexOf("/same/as/internet");
492 } else
493 selectedIndex = -1;
494 } else {
495 selectedIndex = -1;
496 }
497 d.__suppressActivation = tmp;
498 }
499
500 onSelectedIndexChanged: {
501 if (selectedIndex === -1 || d.__suppressActivation)
502 return;
503
504 if (model[selectedIndex] === "/same/as/internet") {
505 // @bug delete _any_ actual MMS context
506 // LP:(#1362795)
507 var remove = [];
508 Object.keys(d.mContexts).forEach(function(currentValue, index, array) {
509 var ctx = d.mContexts[currentValue];
510 if (ctx.type === "mms")
511 remove = remove.concat([ctx.contextPath]);
512 });
513 remove.forEach(function(currentValue, index, array) {
514 sim.connMan.removeContext(currentValue);
515 });
516 return;
517 }
518
519 if (model[selectedIndex] === "dummycustom") {
520 d.openApnEditor("mms");
521 updateSelectedIndex()
522 return;
523 }
524
525 // no need to "activate" anything.
526 // just fall through return here.
527 // once we actually are able to suppport multiple MMS contexts
528 // on the system, add some code here to set one of them active
529 }
530 }
531 }
532 ListItem.SingleControl {
533 control: Button {
534 objectName: "customApnEdit"
535 text: i18n.tr("Custom MMS APN…")
536 width: parent.width - units.gu(4)
537 onClicked: d.openApnEditor("mms")
538 }
539 }
540
541 // @todo: no means of doing any meaningful reset right now.
542 // LP(#1338758)
543 // ListItem.ThinDivider {}
544 // ListItem.SingleControl {
545 // control: Button {
546 // objectName: "resetButton"
547 // text: i18n.tr("Reset APN Settings")
548 // width: parent.width - units.gu(4)
549 // onClicked: {
550 // PopupUtils.open(resetDialog)
551 // }
552 // }
553 // }
554 }
555 }
556
557 Component {
558 id: resetDialog
559 Dialog {
560 id: dialogue
561 title: i18n.tr("Reset APN Settings")
562 text: i18n.tr("Are you sure that you want to Reset APN Settings?")
563 Button {
564 text: i18n.tr("Cancel")
565 onClicked: PopupUtils.close(dialogue)
566 }
567 Button {
568 text: i18n.tr("Reset")
569 color: UbuntuColors.orange
570 onClicked: {
571 // delete all APNs
572 // kick ofono per
573 // https://bugs.launchpad.net/ubuntu/+source/ofono/+bug/1338758
574
575 }
576 }
577
578 }
579 }
580}
0581
=== modified file 'plugins/cellular/PageChooseCarrier.qml'
--- plugins/cellular/PageChooseCarrier.qml 2014-07-24 19:00:45 +0000
+++ plugins/cellular/PageChooseCarrier.qml 2014-10-03 20:40:51 +0000
@@ -19,55 +19,104 @@
19 */19 */
2020
21import QtQuick 2.021import QtQuick 2.0
22import QtQuick.Layouts 1.1
22import SystemSettings 1.023import SystemSettings 1.0
23import Ubuntu.Components 0.124import Ubuntu.Components 1.1
24import Ubuntu.Components.ListItems 0.1 as ListItem25import Ubuntu.Components.ListItems 1.0 as ListItem
25import MeeGo.QOfono 0.226import MeeGo.QOfono 0.2
2627
27ItemPage {28ItemPage {
28 title: title29 id: root
30 title: i18n.tr("Carrier")
31
29 objectName: "chooseCarrierPage"32 objectName: "chooseCarrierPage"
3033
31 property var netReg34 property var sim
32 property var operators: []35
33 property bool scanning: false
34 property variant operatorNames36 property variant operatorNames
35 property variant operatorStatus37 property int mode
36 property int curOp38
37 Component.onCompleted: buildLists();39 QtObject {
40 id: d
41 property bool __suppressActivation : true;
42 }
43
44 Component.onCompleted: {
45 updateNetworkOperators();
46 }
3847
39 Connections {48 Connections {
40 target: netReg49 target: sim.netReg
41 onStatusChanged: {50 onNetworkOperatorsChanged: updateNetworkOperators();
42 if (netReg.status === "registered")51 onCurrentOperatorPathChanged: buildLists();
43 buildLists();52 }
44 }53
45 onNetworkOperatorsChanged: buildLists();54 // map of operatorPath : netOp
46 onScanFinished: scanning = false;55 // FIXME: comment on operators' value
47 onScanError: {56 property var operators: ({})
48 scanning = false;57 function updateNetworkOperators()
49 console.warn ("onScanError: " + message);58 {
50 }59 var tmp = sim.netReg.networkOperators;
60 var added = tmp.filter(function(i) {
61 return operators[i] === undefined;
62 });
63 var removed = Object.keys(operators).filter(function(i) {
64 return tmp.indexOf(i) === -1;
65 })
66
67 removed.forEach(function(currentValue, index, array) {
68 // just asserting to verify the logic
69 // remove once proven functional
70 if (operators[currentValue] === undefined) {
71 throw "updateNetworkOperators: removed is broken";
72 }
73
74 operators[currentValue].destroy();
75 delete operators[currentValue];
76 });
77
78 added.forEach(function(currentValue, index, array) {
79 // just asserting to verify the logic
80 // remove once proven functional
81 if (operators[currentValue] !== undefined) {
82 throw "updateNetworkOperators: added is broken";
83 }
84
85 operators[currentValue] = netOp.createObject(parent,
86 {
87 "operatorPath": currentValue
88 });
89 });
90
91 // just asserting to verify the logic
92 // remove once proven functional
93 if (Object.keys(operators).length !== tmp.length) {
94 throw "Object.keys(operators).length !== tmp.length";
95 }
96 tmp.forEach(function(currentValue, index, array) {
97 if (operators[currentValue] === undefined)
98 throw "operators[currentValue] === undefined";
99 });
100
101 buildLists();
51 }102 }
52103
53 function buildLists()104 function buildLists()
54 {105 {
55 var ops = [];106 d.__suppressActivation = true;
56 var oN = new Array();107 var oN = new Array();
57 var oS = new Array();108
58 for (var i = 0; i < netReg.networkOperators.length; i++) {109 for (var i in operators) {
59 var tempOp = netOp.createObject(parent, {"operatorPath": netReg.networkOperators[i]});110 var tempOp = operators[i];
60 if (tempOp.status === "forbidden")111 if (tempOp.status === "forbidden")
61 continue112 continue
62 oN.push(tempOp.name);113 oN.push(tempOp.name);
63 oS.push(tempOp.status);
64 ops.push(tempOp)
65 }114 }
66 curOp = oS.indexOf("current");
67 operatorNames = oN;115 operatorNames = oN;
68 operatorStatus = oS;116
69 operators = ops;117 var cur = operators[sim.netReg.currentOperatorPath];
70 carrierSelector.selectedIndex = curOp;118 carrierSelector.selectedIndex = cur === undefined ? -1 : operatorNames.indexOf(cur.name);
119 d.__suppressActivation = false;
71 }120 }
72121
73 Component {122 Component {
@@ -78,78 +127,114 @@
78 console.warn("registerComplete failed with error: " + errorString);127 console.warn("registerComplete failed with error: " + errorString);
79 } else if (error !== OfonoNetworkOperator.NoError) {128 } else if (error !== OfonoNetworkOperator.NoError) {
80 console.warn("registerComplete failed with error: " + errorString + " Falling back to default");129 console.warn("registerComplete failed with error: " + errorString + " Falling back to default");
81 netReg.registration();130 sim.netReg.registration();
82 }131 }
83 }132 }
133 onNameChanged: buildLists();
134 onStatusChanged: buildLists();
84 }135 }
85 }136 }
86137
87 Flickable {138 Flickable {
139 id: scrollWidget
88 anchors.fill: parent140 anchors.fill: parent
89 contentWidth: parent.width141 contentWidth: parent.width
90 contentHeight: parent.height142 contentHeight: parent.height
91 boundsBehavior: (contentHeight > parent.height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds143 boundsBehavior: (contentHeight > parent.height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
92144
93 Column {145 ColumnLayout {
94 anchors.left: parent.left146
95 anchors.right: parent.right147 anchors {
148 left: parent.left
149 right: parent.right
150 }
96151
97 ListItem.ItemSelector {152 ListItem.ItemSelector {
98 id: chooseCarrier153 id: chooseCarrier
99 objectName: "autoChooseCarrierSelector"154 objectName: "autoChooseCarrierSelector"
100 expanded: true155 expanded: true
101 enabled: netReg.mode !== "auto-only"156 enabled: sim.netReg.mode !== "auto-only"
102 text: i18n.tr("Choose carrier:")157 text: i18n.tr("Choose carrier:")
103 model: [i18n.tr("Automatically"), i18n.tr("Manually")]158 model: [i18n.tr("Automatically"), i18n.tr("Manually")]
104 selectedIndex: netReg.mode === "manual" ? 1 : 0159
160 delegate: OptionSelectorDelegate { showDivider: false }
161 selectedIndex: sim.netReg.mode === "manual" ? 1 : 0
162
163 // we only want to do this per user input
105 onSelectedIndexChanged: {164 onSelectedIndexChanged: {
106 if (selectedIndex === 0)165 if (selectedIndex === -1 || d.__suppressActivation)
107 netReg.registration();166 return;
167
168 if (selectedIndex === 0) {
169 sim.netReg.registration();
170 } else if (selectedIndex === 1) {
171 if (sim.netReg.status !== "searching")
172 sim.netReg.scan();
173 }
108 }174 }
109 }175 }
110176 ListItem.SingleControl {
111 ListItem.ItemSelector {
112 id: carrierSelector
113 objectName: "carrierSelector"
114 expanded: enabled
115 enabled: chooseCarrier.selectedIndex === 1177 enabled: chooseCarrier.selectedIndex === 1
116 model: operatorNames178 anchors {
117 onSelectedIndexChanged: {179 left: parent.left
118 if ((selectedIndex !== curOp) && operators[selectedIndex]) {180 leftMargin: units.gu(0)
119 operators[selectedIndex].registerOperator();181 }
120 }182 control: ColumnLayout {
121 }183 id: child
122 }184 width: parent.width - units.gu(4)
123 }185 anchors.left: parent.left
124186 RowLayout {
125 ListItem.SingleControl {187 id: searchingRow
126 anchors.bottom: parent.bottom188 spacing: units.gu(1)
127 control: Button {189
128 objectName: "refreshButton"190 visible: sim.netReg.status === "searching"
129 width: parent.width - units.gu(4)191 ActivityIndicator {
130 text: i18n.tr("Refresh")192 id: activityIndicator
131 enabled: (netReg.status !== "searching") && (netReg.status !== "denied")193 anchors.verticalCenter: parent.verticalCenter
132 onTriggered: {194 running: parent.visible
133 scanning = true;195 }
134 netReg.scan();196 Label {
135 }197 anchors.verticalCenter: parent.verticalCenter
136 }198 text: i18n.tr("Searching for carriers…")
137 }199 }
138200 }
139 ActivityIndicator {201 ListItem.ItemSelector {
140 id: activityIndicator202 id: carrierSelector
141 anchors.centerIn: parent203 objectName: "carrierSelector"
142 running: scanning204 expanded: true
143 }205 enabled: sim.netReg.status !== "searching" && chooseCarrier.selectedIndex === 1
144206 // work around ItemSelector not having a visual change depending on being disabled
145 Label {207 opacity: enabled ? 1.0 : 0.5
146 anchors {208 width: parent.width
147 top: activityIndicator.bottom209 model: operatorNames
148 topMargin: units.gu(2)210 delegate: OptionSelectorDelegate { enabled: carrierSelector.enabled; showDivider: false }
149 horizontalCenter: activityIndicator.horizontalCenter211 onSelectedIndexChanged: {
150 }212 if (selectedIndex === -1 || d.__suppressActivation)
151 text: i18n.tr("Searching")213 return;
152 visible: activityIndicator.running214
215 // this assumes operator names are unique,
216 // revise if not so
217 for (var op in operators) {
218 if (operators[op].name === operatorNames[selectedIndex]) {
219 operators[op].registerOperator();
220 return;
221 }
222 }
223 // just asserting to verify the logic
224 // remove once proven functional
225 throw "should not be reached.";
226 }
227 }
228 }
229 }
230 ListItem.Standard {
231 text: i18n.tr("APN")
232 progression: true
233 enabled: sim.connMan.powered
234 onClicked: {
235 pageStack.push(Qt.resolvedUrl("PageChooseApn.qml"), {sim: sim})
236 }
237 }
153 }238 }
154 }239 }
155}240}
156241
=== modified file 'plugins/cellular/PageChooseCarriers.qml'
--- plugins/cellular/PageChooseCarriers.qml 2014-08-17 14:50:51 +0000
+++ plugins/cellular/PageChooseCarriers.qml 2014-10-03 20:40:51 +0000
@@ -21,7 +21,6 @@
21import SystemSettings 1.021import SystemSettings 1.0
22import Ubuntu.Components 0.122import Ubuntu.Components 0.1
23import Ubuntu.Components.ListItems 0.1 as ListItem23import Ubuntu.Components.ListItems 0.1 as ListItem
24import MeeGo.QOfono 0.2
2524
26ItemPage {25ItemPage {
27 id: root26 id: root
@@ -50,7 +49,7 @@
50 progression: true49 progression: true
51 onClicked: {50 onClicked: {
52 pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), {51 pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), {
53 netReg: sims[0].netReg,52 sim: sims[0],
54 title: sims[0].title53 title: sims[0].title
55 })54 })
56 }55 }
@@ -66,7 +65,7 @@
66 progression: true65 progression: true
67 onClicked: {66 onClicked: {
68 pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), {67 pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), {
69 netReg: sims[1].netReg,68 sim: sims[1],
70 title: sims[1].title69 title: sims[1].title
71 })70 })
72 }71 }
7372
=== modified file 'plugins/cellular/PageComponent.qml'
--- plugins/cellular/PageComponent.qml 2014-08-19 10:58:01 +0000
+++ plugins/cellular/PageComponent.qml 2014-10-03 20:40:51 +0000
@@ -47,7 +47,7 @@
47 name: "singleSim"47 name: "singleSim"
48 StateChangeScript {48 StateChangeScript {
49 script: loader.setSource("Components/SingleSim.qml", {49 script: loader.setSource("Components/SingleSim.qml", {
50 sim: Sims.get(0)50 sim: Sims.getFirstPresent()
51 })51 })
52 }52 }
53 when: simsLoaded && (Sims.getPresentCount() === 1)53 when: simsLoaded && (Sims.getPresentCount() === 1)
5454
=== added file 'plugins/cellular/ofonoactivator.cpp'
--- plugins/cellular/ofonoactivator.cpp 1970-01-01 00:00:00 +0000
+++ plugins/cellular/ofonoactivator.cpp 2014-10-03 20:40:51 +0000
@@ -0,0 +1,119 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * Authors:
5 * Jussi Pakkanen <jussi.pakkanen@canonical.com>
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 3, as published
9 * by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#include "ofonoactivator.h"
21
22#include"nm_manager_proxy.h"
23#include"nm_settings_proxy.h"
24#include"nm_settings_connection_proxy.h"
25#include<QCoreApplication>
26
27typedef QMap<QString,QVariantMap> Vardict;
28Q_DECLARE_METATYPE(Vardict)
29
30namespace {
31
32QString nmService("org.freedesktop.NetworkManager");
33QString nmSettingsPath("/org/freedesktop/NetworkManager/Settings");
34QString nmPath("/org/freedesktop/NetworkManager");
35
36QDBusObjectPath detectConnection(const QString &ofonoContext, const QString imsi) {
37 auto ofonoContextBase = ofonoContext.split('/').back();
38 auto target = "/" + imsi + "/" + ofonoContextBase;
39
40 OrgFreedesktopNetworkManagerSettingsInterface settings(nmService, nmSettingsPath,
41 QDBusConnection::systemBus());
42 auto reply = settings.ListConnections();
43 reply.waitForFinished();
44 if(!reply.isValid()) {
45 qWarning() << "Error getting connection list: " << reply.error().message() << "\n";
46 }
47 auto connections = reply.value(); // Empty list if failed.
48
49 for(const auto &c : connections) {
50 OrgFreedesktopNetworkManagerSettingsConnectionInterface connProxy(nmService,
51 c.path(), QDBusConnection::systemBus());
52 auto reply2 = connProxy.GetSettings();
53 reply2.waitForFinished();
54 if(!reply2.isValid()) {
55 qWarning() << "Error getting property: " << reply2.error().message() << "\n";
56 continue;
57 }
58 auto settings = reply2.value();
59 auto id = settings["connection"]["id"].toString();
60 if(id == target) {
61 return c;
62 }
63 }
64 return QDBusObjectPath("");
65}
66
67QDBusObjectPath detectDevice(const QString &modemPath) {
68 OrgFreedesktopNetworkManagerInterface nm(nmService, nmPath, QDBusConnection::systemBus());
69 auto reply = nm.GetDevices();
70 reply.waitForFinished();
71 auto devices = reply.value();
72
73 for(const auto &device : devices) {
74 QDBusInterface iface(nmService, device.path(), "org.freedesktop.DBus.Properties",
75 QDBusConnection::systemBus());
76 QDBusReply<QDBusVariant> ifaceReply = iface.call("Get",
77 "org.freedesktop.NetworkManager.Device", "Interface");
78 if(!ifaceReply.isValid()) {
79 qWarning() << "Error getting property: " << ifaceReply.error().message() << "\n";
80 continue;
81 }
82 auto devIface = ifaceReply.value().variant().toString();
83 if(devIface == modemPath) {
84 return device;
85 }
86 }
87 return QDBusObjectPath("");
88}
89}
90
91void activateOfono(QDBusObjectPath connection, QDBusObjectPath device)
92{
93 OrgFreedesktopNetworkManagerInterface nm(nmService, nmPath, QDBusConnection::systemBus());
94 nm.ActivateConnection(connection, device, QDBusObjectPath("/"));
95}
96
97OfonoActivator::OfonoActivator(QObject *parent) : QObject(parent) {
98 static bool isRegistered = false;
99 if(!isRegistered) {
100 qDBusRegisterMetaType<Vardict>();
101 isRegistered = true;
102 }
103}
104
105Q_INVOKABLE bool OfonoActivator::activate(const QString ofonoContext, const QString imsi, const QString modemPath)
106{
107 auto dev = detectDevice(modemPath);
108 if(dev.path() == "") {
109 qWarning() << "Could not detect device object to use for Ofono activation.\n";
110 return false;
111 }
112 auto conn = detectConnection(ofonoContext, imsi);
113 if(conn.path() == "") {
114 qWarning() << "Could not detect connection object to use for Ofono activation.\n";
115 return false;
116 }
117 activateOfono(conn, dev);
118 return true;
119}
0120
=== added file 'plugins/cellular/ofonoactivator.h'
--- plugins/cellular/ofonoactivator.h 1970-01-01 00:00:00 +0000
+++ plugins/cellular/ofonoactivator.h 2014-10-03 20:40:51 +0000
@@ -0,0 +1,42 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * Authors:
5 * Jussi Pakkanen <jussi.pakkanen@canonical.com>
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 3, as published
9 * by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef OFONO_ACTIVATOR
21#define OFONO_ACTIVATOR
22
23#include <QObject>
24
25/**
26 * For exposing ofono controls to qml.
27 */
28
29class OfonoActivator : public QObject {
30 Q_OBJECT
31
32public:
33 OfonoActivator(QObject *parent = nullptr);
34 ~OfonoActivator() {};
35
36 Q_INVOKABLE bool activate(const QString ofonoContext, const QString imsi, const QString modemPath);
37
38private:
39};
40
41
42#endif
043
=== modified file 'plugins/cellular/plugin.cpp'
--- plugins/cellular/plugin.cpp 2014-07-23 13:44:31 +0000
+++ plugins/cellular/plugin.cpp 2014-10-03 20:40:51 +0000
@@ -20,11 +20,13 @@
20#include <QtQml>20#include <QtQml>
21#include <QtQml/QQmlContext>21#include <QtQml/QQmlContext>
22#include "hotspotmanager.h"22#include "hotspotmanager.h"
23#include "ofonoactivator.h"
2324
24void BackendPlugin::registerTypes(const char *uri)25void BackendPlugin::registerTypes(const char *uri)
25{26{
26 Q_ASSERT(uri == QLatin1String("Ubuntu.SystemSettings.Cellular"));27 Q_ASSERT(uri == QLatin1String("Ubuntu.SystemSettings.Cellular"));
27 qmlRegisterType<HotspotManager>(uri, 1, 0, "HotspotManager");28 qmlRegisterType<HotspotManager>(uri, 1, 0, "HotspotManager");
29 qmlRegisterType<OfonoActivator>(uri, 1, 0, "OfonoActivator");
28}30}
2931
30void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)32void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
3133
=== modified file 'plugins/cellular/sims.js'
--- plugins/cellular/sims.js 2014-08-19 10:58:01 +0000
+++ plugins/cellular/sims.js 2014-10-03 20:40:51 +0000
@@ -13,6 +13,10 @@
13 return getAll()[n];13 return getAll()[n];
14}14}
1515
16function getFirstPresent () {
17 return getPresent()[0];
18}
19
16function getCount () {20function getCount () {
17 return getAll().length;21 return getAll().length;
18}22}
1923
=== modified file 'plugins/phone/PageComponent.qml'
--- plugins/phone/PageComponent.qml 2014-08-28 17:33:40 +0000
+++ plugins/phone/PageComponent.qml 2014-10-03 20:40:51 +0000
@@ -46,8 +46,9 @@
46 State {46 State {
47 name: "singleSim"47 name: "singleSim"
48 StateChangeScript {48 StateChangeScript {
49 script: loader.setSource("SingleSim.qml", { sim: Sims.get(0) })49 script: loader.setSource("SingleSim.qml", {
5050 sim: Sims.getFirstPresent()
51 })
51 }52 }
52 when: simsLoaded && (Sims.getPresentCount() === 1)53 when: simsLoaded && (Sims.getPresentCount() === 1)
53 },54 },
5455
=== modified file 'plugins/phone/sims.js'
--- plugins/phone/sims.js 2014-08-19 15:59:18 +0000
+++ plugins/phone/sims.js 2014-10-03 20:40:51 +0000
@@ -13,6 +13,10 @@
13 return getAll()[n];13 return getAll()[n];
14}14}
1515
16function getFirstPresent () {
17 return getPresent()[0];
18}
19
16function getCount () {20function getCount () {
17 return getAll().length;21 return getAll().length;
18}22}
1923
=== modified file 'tests/autopilot/ubuntu_system_settings/tests/__init__.py'
--- tests/autopilot/ubuntu_system_settings/tests/__init__.py 2014-09-26 12:52:31 +0000
+++ tests/autopilot/ubuntu_system_settings/tests/__init__.py 2014-10-03 20:40:51 +0000
@@ -110,7 +110,6 @@
110 dbusmock.DBusTestCase):110 dbusmock.DBusTestCase):
111 """Class for cellular tests which sets up an Ofono mock """111 """Class for cellular tests which sets up an Ofono mock """
112112
113 technology_preference = 'gsm'
114 use_sims = 1113 use_sims = 1
115114
116 @property115 @property
@@ -183,11 +182,12 @@
183 ]182 ]
184 )183 )
185184
186 def mock_radio_settings(self, modem):185 def mock_radio_settings(self, modem, preference='gsm',
187 modem.AddProperty(186 technologies=['gsm', 'umts', 'lte']):
188 RDO_IFACE, 'TechnologyPreference', self.technology_preference)187 modem.AddProperty(
189 modem.AddProperty(188 RDO_IFACE, 'TechnologyPreference', preference)
190 RDO_IFACE, 'ModemTechnologies', ['gsm', 'umts', 'lte'])189 modem.AddProperty(
190 RDO_IFACE, 'ModemTechnologies', technologies)
191 modem.AddMethods(191 modem.AddMethods(
192 RDO_IFACE,192 RDO_IFACE,
193 [('GetProperties', '', 'a{sv}',193 [('GetProperties', '', 'a{sv}',
@@ -260,7 +260,7 @@
260 self.get_all_operators(second_modem)),260 self.get_all_operators(second_modem)),
261 ])261 ])
262 self.mock_carriers(second_modem)262 self.mock_carriers(second_modem)
263 self.mock_radio_settings(self.modem_1)263 self.mock_radio_settings(self.modem_1, technologies=['gsm'])
264 self.mock_connection_manager(self.modem_1)264 self.mock_connection_manager(self.modem_1)
265 self.mock_call_forwarding(self.modem_1)265 self.mock_call_forwarding(self.modem_1)
266 self.mock_call_settings(self.modem_1)266 self.mock_call_settings(self.modem_1)
267267
=== modified file 'tests/autopilot/ubuntu_system_settings/tests/test_cellular.py'
--- tests/autopilot/ubuntu_system_settings/tests/test_cellular.py 2014-08-25 11:33:04 +0000
+++ tests/autopilot/ubuntu_system_settings/tests/test_cellular.py 2014-10-03 20:40:51 +0000
@@ -673,3 +673,16 @@
673 self.assertThat(673 self.assertThat(
674 lambda: self.system_settings.main_view.select_single(674 lambda: self.system_settings.main_view.select_single(
675 objectName='singleSim'), raises(StateNotFoundError))675 objectName='singleSim'), raises(StateNotFoundError))
676
677 # regression test for 1375832
678 # tests that the second slot only exposes gsm, which
679 # the testdata indicates
680 def test_slot_two(self):
681 self.modem_0.EmitSignal(
682 SIM_IFACE,
683 'PropertyChanged',
684 'sv',
685 ['Present', 'False'])
686 self.select_preference(PREFERENCE_2G)
687 self.assertRaises(StateNotFoundError,
688 self.select_preference, PREFERENCE_UMTS)

Subscribers

People subscribed via source and target branches