Closed Bug 687312 Opened 14 years ago Closed 14 years ago

Show a non-interactive UI as soon as possible on startup

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 9

People

(Reporter: mfinkle, Assigned: mfinkle)

References

Details

Attachments

(3 files, 3 obsolete files)

Attached patch WIP 1 (obsolete) — Splinter Review
The splash screen hurts perceived startup time performance. The user stares at a splash screen for a few seconds (or longer on some phones) and it can actually make people think Firefox takes longer to start than it really does. One way to counteract this affect is to show whatever bits and pieces of the application we can, as soon as we can, during startup. This patch is a WIP that: * Creates a non-interactive UI very early in the Java process. * The code has to deal with froyo and gingerbread theme differences. I was going to use the res/drawables-v# technique, but the build process (android-resources.mn file) wasn't ideally setup for that, and I plan to do more dynamic tweaks anyway. * Removes extra calls to show the splash screen, One is enough. * Skips this non-interactive UI for honeycomb, since we startup fast enough there and showing a splash/non-interactive UI can actually slow us down a little. To do: * Add the logo to the favicon area * Show some text in the URL area. Maybe a "Starting Firefox..." for simple startups and the URL of a passed intent otherwise. I tested this patch on Nexus ON (gingerbread, hdpi), Droid Pro (froyo, mdpi), Galaxy Tab (froyo, hdpi) and Acer A500 (honeycomb, xdpi). Worked well on all of them.
Mark, can you add splash_v9 and splash_v8 to the patch?
(In reply to Fabrice Desré [:fabrice] from comment #1) > Mark, can you add splash_v9 and splash_v8 to the patch? splash_v8.9.png and splash_v9.9.png is what you should be looking for
Attached patch patch (obsolete) — Splinter Review
First round review. This patch builds on the WIP patch and adds: * Overlays the branded favicon in the right spot * Draws the URL text in the URL bar if we are loading a URL. Stays blank otherwise. Tweaks: * The favicons are stretched smoothly, but Fennec uses crisp * The URL text font is slightly "bolder" than that used in Fennec These might be low priority tweaks and we can work to fix them. Asking for a review to find any big problems.
Assignee: nobody → mark.finkle
Attachment #560754 - Attachment is obsolete: true
Attachment #560924 - Flags: review?(mbrubeck)
Alo, we need to clip the text so it doesn't overrun the "url bar". I assume we could do that using StaticLayout.
Comment on attachment 560924 [details] [diff] [review] patch >+ c.drawText(GeckoSurfaceView.mSplashURL, urlOffsetX, urlOffsetY, p); If the URL is long, it will overrun the titlebar. Is there a good way to truncate it?
Attachment #560924 - Flags: review?(mbrubeck) → review+
(In reply to Matt Brubeck (:mbrubeck) from comment #6) > Comment on attachment 560924 [details] [diff] [review] > patch > > >+ c.drawText(GeckoSurfaceView.mSplashURL, urlOffsetX, urlOffsetY, p); > > If the URL is long, it will overrun the titlebar. Is there a good way to > truncate it? Yes. I now use: String url = TextUtils.ellipsize(GeckoSurfaceView.mSplashURL, p, width - urlOffsetX * 2, TextUtils.TruncateAt.END).toString(); c.drawText(url, urlOffsetX, urlOffsetY, p); And it even matches the Gecko ellipsizing
Attached patch patch 2 (obsolete) — Splinter Review
Same as before with the ellipsizing code. Carrying the r+
Attachment #560924 - Attachment is obsolete: true
Attachment #561235 - Flags: review+
Attached patch patch 3Splinter Review
Matt - Slight change. This patch keeps the old splash screen around and uses it for the long, "new profile" situation, which is slow on slow phones. Madhava and Johnathan noticed the long pause. We don't want to keep the static UI in front of the user and have them think we are hung. If we already have a profile, we use the new static UI splash. interdiff to follow
Attachment #561235 - Attachment is obsolete: true
Attachment #561377 - Flags: review?(mbrubeck)
Attachment #561377 - Flags: review?(mbrubeck) → review+
Comment on attachment 561377 [details] [diff] [review] patch 3 You should also remove splash_screen_loading from android_strings.dtd and strings.xml.in.
Status: NEW → RESOLVED
Closed: 14 years ago
OS: Linux → Android
Hardware: x86 → ARM
Resolution: --- → FIXED
Target Milestone: --- → Firefox 9
Followup patch to fix the situation where profile is on an sdcard. In that situation, we were always showing the old splash screen. I tweaked the search path to be "just enough" to know if this is a "new profile" startup.
Attachment #561724 - Flags: review?(mbrubeck)
Attachment #561724 - Flags: review?(mbrubeck) → review+
Verified fixed on: Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110923 Firefox/9.0a1 Fennec/9.0a1 Device: Samsung Galaxy S OS: Android 2.2
Status: RESOLVED → VERIFIED
Depends on: 690134
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: