Closed Bug 856131 Opened 11 years ago Closed 11 years ago

Regression: No Android home-screen shortcut created on app install

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P1)

ARM
Android
defect

Tracking

(firefox22 affected, firefox23 verified, fennec+)

VERIFIED FIXED
Firefox 23
Tracking Status
firefox22 --- affected
firefox23 --- verified
fennec + ---

People

(Reporter: aaronmt, Assigned: jhugman)

References

Details

(Keywords: regression, reproducible, Whiteboard: [A4A] [packagedapps])

Attachments

(1 file, 2 obsolete files)

Not sure what this regressed from, but installing any application is not creating an Android home-screen shortcut anymore on trunk (mozilla-central, Fx22).

i) http://www.testmanifest.com
ii) Click 'install'
iii) Check Android home-screens for newly added shortcut (see notification is existant and fine)

--
Nightly (03/29)
Asus Nexus 7 (Android 4.2.2)
The regression window for this issue is:
1. mozilla central
good build: 26.03.2013  
bad build:  27.03.2013 

possible pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=456cb08f8509&tochange=178a4a770bb1

2. inbound
good build: 1364240243
bad build:  1364243303

possible pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=f7138044b0cf&tochange=9592881ee7fc
Guessing it's bug 813736 that mangled something accidently.
tracking-fennec: --- → ?
Assignee: nobody → jhugman
tracking-fennec: ? → 22+
Whiteboard: [A4A]
Priority: -- → P1
Whiteboard: [A4A] → [A4A] [packagedapps]
James, do you have a plan for this?
Flags: needinfo?(jhugman)
Blocks: 835405
No longer blocks: 813736
Interestingly, the Marketplace (when installed from http://inferno.paas.allizom.org/) generates an icon (albeit after a delay, see bug 862948).

The marketplace is a packaged app, though. Don't know if that makes a difference.
Confirming the above application works; weird. Anything currently on Marketplace doesn't install a shortcut-icon for me; Nightly (04/17) - Nexus 4 (Android 4.2.2)
Investigating now. 

I can replicate with hosted apps, but not with packaged apps.
Status: NEW → ASSIGNED
Flags: needinfo?(jhugman)
Attachment #739348 - Flags: review?(wjohnston)
Attachment #739348 - Flags: review?(fabrice)
Comment on attachment 739348 [details] [diff] [review]
Inform browser.js of download success for hosted apps.

Review of attachment 739348 [details] [diff] [review]:
-----------------------------------------------------------------

Splinter fails miserably at showing the diffs, but from what I see:
- rename aZipDownloadSuccessCallback to aInstallSuccessCallback
- I don't like that we have to copy over the |if (!aFromSync) ...| block.
- why did you change |manifest = new ManifestHelper(jsonManifest, app.manifestURL);| to |manifest = new ManifestHelper(jsonManifest, appObject.installOrigin);| ?
Attachment #739348 - Flags: review?(fabrice)
Attached patch Second patch following feedback. (obsolete) — Splinter Review
- rename aZipDownloadSuccessCallback to aInstallSuccessCallback
done
- I don't like that we have to copy over the |if (!aFromSync) ...| block.
I've put the 'then' block into a function called installFromMarketSuccess(). I could've put more in there, e.g. 

+ this.updateAppHandlers(…)
+          if (aInstallSuccessCallback)
+            aInstallSuccessCallback(aManifest);

or even the if (!aFromSync) {} could go in this function.

I wasn't convinced that this wouldn't change the orderings of the statements from the original.

- why did you change |manifest = new ManifestHelper(jsonManifest, app.manifestURL);| to |manifest = new ManifestHelper(jsonManifest, appObject.installOrigin);| 
To match http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1044 . I took your question as a suggestion, so have changed it back.
Attachment #739348 - Attachment is obsolete: true
Attachment #739348 - Flags: review?(wjohnston)
Attachment #740858 - Flags: review?(fabrice)
Comment on attachment 740858 [details] [diff] [review]
Second patch following feedback.

r=me with the following nits addressed:
- rename installFromMarketSuccess() to something that does not mention "Market", eg postInstallTask().
- use { } for all if blocks, even single lines (I know, some were like this before your patch).

Also, please push this to try before landing.
Attachment #740858 - Flags: review?(fabrice) → review+
Changed postInstallFromMarket to postFirstInstallTask. It's only involved in installs not from sync, hence the reference to "first install".

Pushed to try.
Attachment #740858 - Attachment is obsolete: true
Blocks: 865221
Blocks: 863382
Blocks: 866787
How'd this look on try? Can we land it?
This looks fine on try. Do please land!

https://tbpl.mozilla.org/?tree=Try&rev=df73ff22de54
That try push doesn't look like the right one? I pushed this again...

https://tbpl.mozilla.org/?tree=Try&rev=6bf7e59b19fd
This can ride the trains
tracking-fennec: 22+ → +
https://hg.mozilla.org/mozilla-central/rev/d11b778458e9
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Status: RESOLVED → VERIFIED
Hey, I think this produced bug 873134.

Could you please explain the rationale behind moving the message install event broadcast inside the |if (!aData.isPackage)| block ?

(see https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#2022)
Blocks: 873134
Flags: needinfo?(jhugman)
Flags: needinfo?(jhugman)
This is out of date, obsoleted by synthesized APKs.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: