Merge change I097b1e77 into eclair-mr2
* changes: Add PageCacheCapacity to the WebSettings.
This commit is contained in:
@@ -152,6 +152,7 @@ public class WebSettings {
|
|||||||
private int mMinimumLogicalFontSize = 8;
|
private int mMinimumLogicalFontSize = 8;
|
||||||
private int mDefaultFontSize = 16;
|
private int mDefaultFontSize = 16;
|
||||||
private int mDefaultFixedFontSize = 13;
|
private int mDefaultFixedFontSize = 13;
|
||||||
|
private int mPageCacheCapacity = 0;
|
||||||
private boolean mLoadsImagesAutomatically = true;
|
private boolean mLoadsImagesAutomatically = true;
|
||||||
private boolean mBlockNetworkImage = false;
|
private boolean mBlockNetworkImage = false;
|
||||||
private boolean mBlockNetworkLoads;
|
private boolean mBlockNetworkLoads;
|
||||||
@@ -878,6 +879,20 @@ public class WebSettings {
|
|||||||
return mDefaultFixedFontSize;
|
return mDefaultFixedFontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the number of pages cached by the WebKit for the history navigation.
|
||||||
|
* @param size A non-negative integer between 0 (no cache) and 20 (max).
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public synchronized void setPageCacheCapacity(int size) {
|
||||||
|
if (size < 0) size = 0;
|
||||||
|
if (size > 20) size = 20;
|
||||||
|
if (mPageCacheCapacity != size) {
|
||||||
|
mPageCacheCapacity = size;
|
||||||
|
postSync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell the WebView to load image resources automatically.
|
* Tell the WebView to load image resources automatically.
|
||||||
* @param flag True if the WebView should load images automatically.
|
* @param flag True if the WebView should load images automatically.
|
||||||
|
|||||||
Reference in New Issue
Block a user