diff options
Diffstat (limited to 'core/java/android/view/SurfaceView.java')
-rw-r--r-- | core/java/android/view/SurfaceView.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 87b3d79..3efc799 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -21,7 +21,6 @@ import com.android.internal.view.BaseIWindow; import android.content.Context; import android.content.res.Configuration; -import android.content.res.Resources; import android.content.res.CompatibilityInfo.Translator; import android.graphics.Canvas; import android.graphics.PixelFormat; @@ -433,9 +432,8 @@ public class SurfaceView extends View { mTranslator = viewRoot.mTranslator; } - Resources res = getContext().getResources(); - if (mTranslator != null || !res.getCompatibilityInfo().supportsScreen()) { - mSurface.setCompatibleDisplayMetrics(res.getDisplayMetrics(), mTranslator); + if (mTranslator != null) { + mSurface.setCompatibilityTranslator(mTranslator); } int myWidth = mRequestedWidth; |