From 6e9ab4a9d5b502e9ce6ac85062dc74d3339bc091 Mon Sep 17 00:00:00 2001 From: Doug Turner Date: Tue, 11 Oct 2011 22:08:42 -0700 Subject: [PATCH] During first run, or when the lastScreen.png is missing, we currently show a black screen. I am changing this to display a stock image with some text over it. We should think about exactly what we want to show here. --- embedding/android/GeckoSurfaceView.java | 20 ++++++++++++------ embedding/android/Makefile.in | 3 ++- .../android/resources/drawable/start.png | Bin 0 -> 5827 bytes 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 embedding/android/resources/drawable/start.png diff --git a/embedding/android/GeckoSurfaceView.java b/embedding/android/GeckoSurfaceView.java index 214cccd278b..8eea3c07195 100644 --- a/embedding/android/GeckoSurfaceView.java +++ b/embedding/android/GeckoSurfaceView.java @@ -125,10 +125,6 @@ class GeckoSurfaceView if (mStartupBitmap == null) { Log.e(LOG_FILE_NAME, "!!! NO STARTUP BITMAP !!!"); loadStartupBitmap(); - if (mStartupBitmap == null) { - mShowingLoadScreen = false; - return; - } } Canvas c = holder.lockCanvas(); @@ -138,9 +134,19 @@ class GeckoSurfaceView return; } - Drawable drawable = new BitmapDrawable(mStartupBitmap); - drawable.setBounds(0, 0, width, height); - drawable.draw(c); + if (mStartupBitmap == null) { + Resources res = getResources(); + Drawable drawable = res.getDrawable(R.drawable.start); + drawable.setBounds(0, 0, width, height); + drawable.draw(c); + + Paint paint = new Paint(); + c.drawText("Place holder. Missing screenshot.", 10.0f, 20.0f, paint); + } else { + Drawable drawable = new BitmapDrawable(mStartupBitmap); + drawable.setBounds(0, 0, width, height); + drawable.draw(c); + } holder.unlockCanvasAndPost(c); } diff --git a/embedding/android/Makefile.in b/embedding/android/Makefile.in index c48e7c15d87..ece77123627 100644 --- a/embedding/android/Makefile.in +++ b/embedding/android/Makefile.in @@ -150,9 +150,10 @@ RES_LAYOUT += res/layout/crash_reporter.xml endif MOZ_ANDROID_DRAWABLES += embedding/android/resources/drawable/desktop_notification.png \ - embedding/android/resources/drawable/favicon.png \ + embedding/android/resources/drawable/favicon.png \ embedding/android/resources/drawable/reload.png \ embedding/android/resources/drawable/quit.png \ + embedding/android/resources/drawable/start.png \ embedding/android/resources/drawable/address_bar_button_left.9.png \ embedding/android/resources/drawable/address_bar_button_right.9.png \ embedding/android/resources/drawable/address_bar_button_middle.9.png \ diff --git a/embedding/android/resources/drawable/start.png b/embedding/android/resources/drawable/start.png new file mode 100644 index 0000000000000000000000000000000000000000..00209642b4efd64ba7f24537118e55502c865400 GIT binary patch literal 5827 zcmXwdbyyVN`}T^|(y4@WgMh#y(gM45EsX-o($WnQ(y=HdB`ok2fhD9xN)YK<8UbnP z?vDM9pZ9wIn3?Ok=b4#v&OFck-1mvq)m9-TVju#6K%{D_P(9$91srySIKVkWAKd_4 zz;3Fho*)oe$G_uVssI@y01|kqX~77lh^Wc9rNlSCl>Z08OuQ7lz3g2*K*i+)ssKdd z1wc?6Pb&`xH!lZQ7Z5d=jRU}m{^3flZvGw)cJ^MNujB(#07~{B>S1H~FO=2G!Py2R zeohVs?tuT@(Ra1=^0oA^0hzmD|AiC(_i_hMDffKIXD+y6gI$<^7}#>ESCHjwrc!0`Wt88~=3*?@}nMtMLW+ITgn zf`K1uH~ZaleM4;bPz~vKe5qi(zZ43(6qh1+I5hWZ-NF2PYX+K-AQVh871@GF`fDsY zV3Wd|l2{}rGNMdn84{*=<3`B4p$VmcQzWvGN&G(U&hcAo_Vx9hVPfprmLD9HU9UXf zyF8T4J(k2?UGM+=#mhk$R?hf@Xz)G1)To~VTwyspvoN~xO&{-@;oo!p4`)+!*m|)^ z#sW77<9Hm^Z0*1QysI`}99O&h$itxDqcqb4PhqtW)YUyVR+yVRYSO|m>7YjhmFV>e z-K{V9odqeA5^2o%+XKg&=*ouWZp9>m(hhh=8_Y29wn}; za}++Ou`BY3srYp4F&?aW$C(w6RJEYMcQ1Xu0ejgHXJqw3iGFZt-X(PKjOPA*LGd6O z|E(9yc4>xohVw=C_C_h){W(I|^`ESz4=0%j-ej?SHnxI3wZ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