Move hiding last screen from onTouch to when the document finishes loading. This will change after the layer manager lands
authorDoug Turner <dougt@dougt.org>
Thu, 13 Oct 2011 19:38:04 -0700
changeset 83175 6f71ab68b80565adbddf62418d3861869b34ac72
parent 83174 73089ff476a24566003a8ab1195b78ccd8ec3b21
child 83176 5ed7e0ff0244f16c14f37cdec111adb713c56409
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Move hiding last screen from onTouch to when the document finishes loading. This will change after the layer manager lands
embedding/android/GeckoAppShell.java
embedding/android/GeckoSurfaceView.java
--- a/embedding/android/GeckoAppShell.java
+++ b/embedding/android/GeckoAppShell.java
@@ -1630,16 +1630,17 @@ public class GeckoAppShell
                             }
                         });
                     }
                     else if ((state & WPL_STATE_STOP) != 0) {
                         Log.i("GeckoShell", "Got a document stop");
                         getMainHandler().post(new Runnable() { 
                             public void run() {
                                 GeckoApp.mProgressBar.setVisibility(View.GONE);
+                                GeckoApp.surfaceView.hideStartupBitmap();
                             }
                         });
                     }
                 }
             } else if (type.equals("onProgressChange")) {
                 final int current = geckoObject.getInt("current");
                 final int total = geckoObject.getInt("total");
 
--- a/embedding/android/GeckoSurfaceView.java
+++ b/embedding/android/GeckoSurfaceView.java
@@ -107,16 +107,21 @@ class GeckoSurfaceView
      */
 
     public String getStartupBitmapFilePath() {
         File file = new File(Environment.getExternalStorageDirectory(),
                              "lastScreen.png");
         return file.toString();
     }
 
+    public void hideStartupBitmap() {
+        mShowingLoadScreen = false;
+        surfaceChanged(getHolder(), mFormat, mWidth, mHeight);
+    }
+
     public void loadStartupBitmap() {
         new Thread(new Runnable() {
                 public void run() {
                     String filePath = getStartupBitmapFilePath();
                     mStartupBitmap = BitmapFactory.decodeFile(filePath);
                 }}).start();
     }
 
@@ -603,22 +608,16 @@ class GeckoSurfaceView
 
     public void onStatusChanged(String provider, int status, Bundle extras)
     {
     }
 
     // event stuff
     public boolean onTouchEvent(MotionEvent event) {
         this.requestFocus(FOCUS_UP, null);
-
-        if (mShowingLoadScreen == true) {
-            mShowingLoadScreen = false;
-            surfaceChanged(getHolder(), mFormat, mWidth, mHeight);
-        }
-
         GeckoAppShell.sendEventToGecko(new GeckoEvent(event));
         return true;
     }
 
     @Override
     public boolean onKeyPreIme(int keyCode, KeyEvent event) {
         if (event.isSystem())
             return super.onKeyPreIme(keyCode, event);