author | Brad Lassey <blassey@mozilla.com> |
Thu, 10 Nov 2011 21:37:21 -0500 | |
changeset 83437 | dce9246b76d7cde6aeb9c1c3918e9f7a5f19a53f |
parent 83436 | 13f5d3d70ecbbf00224341af29517eed89dd3f3d |
child 83438 | 043d1443dbc2315b74f6b1fc01b5252d9d85bec1 |
push id | 519 |
push user | akeybl@mozilla.com |
push date | Wed, 01 Feb 2012 00:38:35 +0000 |
treeherder | mozilla-beta@788ea1ef610b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mfinkle |
bugs | 699716 |
milestone | 10.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
|
embedding/android/GeckoApp.java | file | annotate | diff | comparison | revisions | |
embedding/android/gfx/PlaceholderLayerClient.java | file | annotate | diff | comparison | revisions |
--- a/embedding/android/GeckoApp.java +++ b/embedding/android/GeckoApp.java @@ -479,18 +479,18 @@ abstract public class GeckoApp case R.id.addons: GeckoAppShell.sendEventToGecko(new GeckoEvent("about:addons")); return true; default: return super.onOptionsItemSelected(item); } } - public String getStartupBitmapFilePath() { - File file = new File(Environment.getExternalStorageDirectory(), + public static String getStartupBitmapFilePath() { + File file = new File(GeckoAppShell.getCacheDir(), "lastScreen.png"); return file.toString(); } private void rememberLastScreen(boolean sync) { if (mUserDefinedProfile) return;
--- a/embedding/android/gfx/PlaceholderLayerClient.java +++ b/embedding/android/gfx/PlaceholderLayerClient.java @@ -37,16 +37,17 @@ package org.mozilla.gecko.gfx; import org.mozilla.gecko.gfx.BufferedCairoImage; import org.mozilla.gecko.gfx.CairoUtils; import org.mozilla.gecko.gfx.IntSize; import org.mozilla.gecko.gfx.LayerClient; import org.mozilla.gecko.gfx.SingleTileLayer; +import org.mozilla.gecko.GeckoApp; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Environment; import android.util.Log; import java.io.File; import java.nio.ByteBuffer; @@ -67,17 +68,17 @@ public class PlaceholderLayerClient exte mWidth = bitmap.getWidth(); mHeight = bitmap.getHeight(); mFormat = CairoUtils.bitmapConfigToCairoFormat(bitmap.getConfig()); mBuffer = ByteBuffer.allocateDirect(mWidth * mHeight * 4); bitmap.copyPixelsToBuffer(mBuffer.asIntBuffer()); } public static PlaceholderLayerClient createInstance(Context context) { - File path = new File(Environment.getExternalStorageDirectory(), "lastScreen.png"); + File path = new File(GeckoApp.getStartupBitmapFilePath()); BitmapFactory.Options options = new BitmapFactory.Options(); options.inScaled = false; Bitmap bitmap = BitmapFactory.decodeFile("" + path, options); if (bitmap == null) return null; return new PlaceholderLayerClient(context, bitmap); }