зеркало из https://github.com/mozilla/pjs.git
bug 699716 - Incorrect screenshot shown when starting up after clearing app data r=mfinkle
This commit is contained in:
Родитель
0ec525e8d0
Коммит
bdfecb8df9
|
@ -484,8 +484,8 @@ abstract public class GeckoApp
|
|||
}
|
||||
}
|
||||
|
||||
public String getStartupBitmapFilePath() {
|
||||
File file = new File(Environment.getExternalStorageDirectory(),
|
||||
public static String getStartupBitmapFilePath() {
|
||||
File file = new File(GeckoAppShell.getCacheDir(),
|
||||
"lastScreen.png");
|
||||
return file.toString();
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ 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;
|
||||
|
@ -72,7 +73,7 @@ public class PlaceholderLayerClient extends LayerClient {
|
|||
}
|
||||
|
||||
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче