am 25dff70f: Merge change 9039 into donut
Merge commit '25dff70f153529b87f5ad4a92f4de21e8950b1de' * commit '25dff70f153529b87f5ad4a92f4de21e8950b1de': Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA
This commit is contained in:
committed by
Android Git Automerger
commit
afcf686cb0
@@ -637,12 +637,13 @@ public final class AssetManager {
|
||||
* mRetData. */
|
||||
private native final int loadResourceBagValue(int ident, int bagEntryId, TypedValue outValue,
|
||||
boolean resolve);
|
||||
/*package*/ static final int STYLE_NUM_ENTRIES = 5;
|
||||
/*package*/ static final int STYLE_NUM_ENTRIES = 6;
|
||||
/*package*/ static final int STYLE_TYPE = 0;
|
||||
/*package*/ static final int STYLE_DATA = 1;
|
||||
/*package*/ static final int STYLE_ASSET_COOKIE = 2;
|
||||
/*package*/ static final int STYLE_RESOURCE_ID = 3;
|
||||
/*package*/ static final int STYLE_CHANGING_CONFIGURATIONS = 4;
|
||||
/*package*/ static final int STYLE_DENSITY = 5;
|
||||
/*package*/ native static final boolean applyStyle(int theme,
|
||||
int defStyleAttr, int defStyleRes, int xmlParser,
|
||||
int[] inAttrs, int[] outValues, int[] outIndices);
|
||||
|
||||
@@ -654,6 +654,7 @@ public class TypedArray {
|
||||
outValue.assetCookie = data[index+AssetManager.STYLE_ASSET_COOKIE];
|
||||
outValue.resourceId = data[index+AssetManager.STYLE_RESOURCE_ID];
|
||||
outValue.changingConfigurations = data[index+AssetManager.STYLE_CHANGING_CONFIGURATIONS];
|
||||
outValue.density = data[index+AssetManager.STYLE_DENSITY];
|
||||
if (type == TypedValue.TYPE_STRING) {
|
||||
outValue.string = loadStringValueAt(index);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import com.android.internal.view.IInputMethodSession;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Region;
|
||||
@@ -1220,6 +1219,8 @@ public final class ViewRoot extends Handler implements ViewParent,
|
||||
if (mTranslator != null) {
|
||||
mTranslator.translateCanvas(canvas);
|
||||
}
|
||||
canvas.setScreenDensity(scalingRequired
|
||||
? DisplayMetrics.DENSITY_DEVICE : 0);
|
||||
mView.draw(canvas);
|
||||
if (Config.DEBUG && ViewDebug.consistencyCheckEnabled) {
|
||||
mView.dispatchConsistencyCheck(ViewDebug.CONSISTENCY_DRAWING);
|
||||
@@ -1328,6 +1329,8 @@ public final class ViewRoot extends Handler implements ViewParent,
|
||||
if (mTranslator != null) {
|
||||
mTranslator.translateCanvas(canvas);
|
||||
}
|
||||
canvas.setScreenDensity(scalingRequired
|
||||
? DisplayMetrics.DENSITY_DEVICE : 0);
|
||||
mView.draw(canvas);
|
||||
} finally {
|
||||
mAttachInfo.mIgnoreDirtyState = false;
|
||||
|
||||
Reference in New Issue
Block a user