on xenial help sign in
Handle incoming calls
commitc4d70b9cb491bca13df5f10745b18f9a73d23770 authorMichael Terry <michael.terry@canonical.com> dateWed 19 Nov 2014, 14:05 (12 years ago) parent995f202
2 files changed+18−5
qml/Components/EdgeDemo.qml+10−5 qml/Shell.qml+8
qml/Components/EdgeDemo.qml+10−5
@@ -62,11 +62,16 @@ Item {
6262 stagesEnabled = true
6363 panelEnabled = true
6464 panelContentEnabled = true
65− if (d.rightEdgeDemo) d.rightEdgeDemo.destroy()
66− if (d.topEdgeDemo) d.topEdgeDemo.destroy()
67− if (d.bottomEdgeDemo) d.bottomEdgeDemo.destroy()
68− if (d.leftEdgeDemo) d.leftEdgeDemo.destroy()
69− if (d.finalEdgeDemo) d.finalEdgeDemo.destroy()
65+
66+ // Use a tiny delay for these destroy() calls because if a lot is
67+ // happening at once (like creating and being destroyed in same event
68+ // loop, as might happen when answering a call while demo is open),
69+ // the destroy() call will be ignored.
70+ if (d.rightEdgeDemo) d.rightEdgeDemo.destroy(1);
71+ if (d.topEdgeDemo) d.topEdgeDemo.destroy(1);
72+ if (d.bottomEdgeDemo) d.bottomEdgeDemo.destroy(1);
73+ if (d.leftEdgeDemo) d.leftEdgeDemo.destroy(1);
74+ if (d.finalEdgeDemo) d.finalEdgeDemo.destroy(1);
7075 }
7176
7277 function startDemo() {
qml/Shell.qml+8
@@ -233,6 +233,14 @@ Item {
233233 onApplicationAdded: {
234234 if (greeter.shown && appId != "unity8-dash") {
235235 greeter.startUnlock()
236+
237+ // If this happens on first boot, we may be in edge
238+ // tutorial or wizard while receiving a call. But a call
239+ // is more important than wizard so just bail out of those.
240+ if (edgeDemo.running) {
241+ edgeDemo.hideEdgeDemos();
242+ wizard.hide();
243+ }
236244 }
237245 if (greeter.narrowMode && greeter.hasLockedApp && appId === greeter.lockedApp) {
238246 lockscreen.hide() // show locked app