StateSaver should not restore when app launched from content-hub

Bug #1429899 reported by Bill Filler on 2015-03-09
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
content-hub (Ubuntu)
High
Unassigned
ubuntu-ui-toolkit (Ubuntu)
High
Zsombor Egri

Bug Description

Testing the messaging-app state saving ability that we've been adding from this MR:
https://code.launchpad.net/~tiagosh/messaging-app/state-saver2/+merge/250996

deb can be found here:
http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/1669/artifact/work/output/*zip*/output.zip

The problem is, when the app is launched from the content-hub, the StateSaver still tries to restore it's previously saved state, but it should not and this causes problems. It should clear the state, the same way it does when launched via url-dispatcher. According to Ken, there are content-hub signals that StateSaver will need to listen to in order to know when the app is being launched by content-hub.

To reproucde:
1) install the messaging-app deb from above
2) open messaging-app, swipe from bottom to create a new message
3) type some names in the recipient field, and type some message in the send field
4) do "kill -2 <pidOfMessagingApp>" to kill the messaging-app and save it's state
5) open camera-app and go to the photo roll
6) press "Share" from toolbar and select messaging-app from the list

Expected results:
- messaging-app should be displayed with a new page showing the photo as an attachment, and nothing else

Actual results:
- messaging-app shows the restored state from when it was last run (the values entered in Step 3 above)

Related branches

Bill Filler (bfiller) on 2015-03-09
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → High
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zsombor Egri (zsombi)
Zsombor Egri (zsombi) wrote :

I need more details on this: was this also happening on RTM (Qt 5.3.x)? Or only on Vivid (Qt 5.4)? Had there be any changes in the way ContentHub invokes Application (i.e. not thru UriHandler, the URI is passed over the application later than it si launched, etc).

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Incomplete
Bill Filler (bfiller) wrote :

Yes it happens in rtm (qt 5.3 based) and Vivid. I don't believe this ever worked. Content-Hub does not invoke the application through UriHandler with arguments. Rather is get launched via upstart-app-launch and then there are some signals fired through the ContentHub api that the app listens to so it knows it's being invoked in picker mode.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Incomplete → Confirmed
Ken VanDine (ken-vandine) wrote :

There are 3 signals, depending on the handler type:
  onImportRequested
  onExportRequested
  onShareRequested

This signals are all on the ContentHub singleton

Zsombor Egri (zsombi) on 2015-03-10
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
Changed in content-hub (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
status: New → In Progress
importance: Undecided → High
Zsombor Egri (zsombi) wrote :

Ken, let's do this with launching the app with some argument (e.g. --no-restore-state) rather than url_dispatch.

Christian Dywan (kalikiana) wrote :

This bug report seems to have been abandoned, as such I marked it Incomplete.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Incomplete
Changed in content-hub (Ubuntu):
assignee: Ken VanDine (ken-vandine) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers