Merge lp:~tiagosh/telephony-service/clear_snap_decision_on_reject into lp:telephony-service

Proposed by Tiago Salem Herrmann
Status: Merged
Merged at revision: 823
Proposed branch: lp:~tiagosh/telephony-service/clear_snap_decision_on_reject
Merge into: lp:telephony-service
Diff against target: 69 lines (+17/-10)
2 files modified
approver/approver.cpp (+16/-10)
libtelephonyservice/greetercontacts.cpp (+1/-0)
To merge this branch: bzr merge lp:~tiagosh/telephony-service/clear_snap_decision_on_reject
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+222041@code.launchpad.net

Commit message

Clear pending snap decision when rejecting an incoming call.

Description of the change

Clear pending snap decision when rejecting an incoming call.

--Checklist--

Are there any related MPs required for this MP to build/function as expected? Please list.
No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/telephony-service) on device or emulator?
Yes

If you changed the UI, was the change specified/approved by design?
N/A

If you changed the packaging (debian), did you subscribe a core-dev to this MP?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
822. By Tiago Salem Herrmann

clear snap decision if it failed to show

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
823. By Tiago Salem Herrmann

update contact filter after notification is displayed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes

Did CI run pass? If not, please explain why.
Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

Code looks good and works as expected!

review: Approve
Revision history for this message
Michael Terry (mterry) wrote :

Can this be top-approved and merged?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'approver/approver.cpp'
2--- approver/approver.cpp 2014-03-12 20:58:50 +0000
3+++ approver/approver.cpp 2014-06-04 18:21:07 +0000
4@@ -210,6 +210,7 @@
5
6 GError *error = NULL;
7 if (!notify_notification_show(mPendingSnapDecision, &error)) {
8+ closeSnapDecision();
9 qWarning() << "Failed to show snap decision:" << error->message;
10 g_error_free (error);
11 }
12@@ -310,6 +311,19 @@
13
14 mPendingSnapDecision = notification;
15
16+ GError *error = NULL;
17+ if (!notify_notification_show(notification, &error)) {
18+ closeSnapDecision();
19+ qWarning() << "Failed to show snap decision:" << error->message;
20+ g_error_free (error);
21+ }
22+
23+ // play a ringtone
24+ Ringtone::instance()->playIncomingCallSound();
25+
26+ mChannels.remove(pr);
27+
28+ // and now set up the contact matching for either greeter mode or regular mode
29 if (GreeterContacts::isGreeterMode()) {
30 GreeterContacts::instance()->setContactFilter(QContactPhoneNumber::match(contact->id()));
31 } else {
32@@ -334,16 +348,6 @@
33 request->start();
34 }
35
36- GError *error = NULL;
37- if (!notify_notification_show(notification, &error)) {
38- qWarning() << "Failed to show snap decision:" << error->message;
39- g_error_free (error);
40- }
41-
42- // play a ringtone
43- Ringtone::instance()->playIncomingCallSound();
44-
45- mChannels.remove(pr);
46 }
47
48 void Approver::onApproved(Tp::ChannelDispatchOperationPtr dispatchOp)
49@@ -379,6 +383,8 @@
50
51 void Approver::onRejected(Tp::ChannelDispatchOperationPtr dispatchOp)
52 {
53+ closeSnapDecision();
54+
55 Tp::PendingOperation *claimop = dispatchOp->claim();
56 // assume there is just one channel in the dispatchOp for calls
57 mChannels[claimop] = dispatchOp->channels().first();
58
59=== modified file 'libtelephonyservice/greetercontacts.cpp'
60--- libtelephonyservice/greetercontacts.cpp 2014-03-12 20:58:50 +0000
61+++ libtelephonyservice/greetercontacts.cpp 2014-06-04 18:21:07 +0000
62@@ -155,6 +155,7 @@
63 } else {
64 qWarning() << "Failed to get user property " << propName << " from AccountsService:" << reply.error().message();
65 }
66+ return QVariant();
67 }
68
69 void GreeterContacts::checkUpdatedValue(const QVariantMap &changed,

Subscribers

People subscribed via source and target branches