[Merge] lp:~boiko/dialer-app/active_call_indicator into lp:dialer-app

Nick Dedekind nick.dedekind at canonical.com
Fri Jun 27 10:24:46 UTC 2014


> > I took a look into it, and think this works pretty well:
> >
> > === modified file 'src/qml/LiveCallPage/LiveCall.qml'
> > --- src/qml/LiveCallPage/LiveCall.qml   2014-06-19 20:42:19 +0000
> > +++ src/qml/LiveCallPage/LiveCall.qml   2014-06-25 16:43:32 +0000
> > @@ -120,12 +120,10 @@
> >          dtmfVisible = (call && call.voicemail);
> >      }
> >
> > -    onActiveChanged: {
> > -        callManager.callIndicatorVisible = !active;
> > -    }
> > -
> > -    Component.onCompleted: {
> > -        callManager.callIndicatorVisible = !active;
> > +    Binding {
> > +        target: callManager
> > +        property: "callIndicatorVisible"
> > +        value: !active || !Qt.application.active
> >      }
> >
> >      Timer {
> 
> So, this fixes the case of the app being put in background, but what if
> dialer-app crashes? Then the property is going to stay in an inconsistent
> state. I think for now we can only rely on the callIndicatorVisible property
> while the app is in foreground, when it is not we should check hasCalls.
> 
> This is not a clean solution but I couldn't come up with anything better
> doable in short term.

Relying on app focus in the shell creates a bit of a mess, but I have it working, so I'm ok with it for now. But we should get some kind of mechanism for registering app involvement in the callIndicatorVisible property. There is a similar thing going on with powerd display state.

Perhaps sending a pid/process name with a registration request and having a registration tasks poll that it's still alive would solve the crash issue; though it's a bit of a mission.
-- 
https://code.launchpad.net/~boiko/dialer-app/active_call_indicator/+merge/223825
Your team Ubuntu Phablet Team is subscribed to branch lp:dialer-app.



More information about the Ubuntu-reviews mailing list