Merge "Fix issue #2549955: Moving the application fails -Activity Manager Crash on launching the app" into froyo

This commit is contained in:
Dianne Hackborn
2010-04-07 18:37:04 -07:00
committed by Android (Google) Code Review

View File

@@ -1482,8 +1482,9 @@ class ContextImpl extends Context {
mPackageInfo = packageInfo;
mResources = mPackageInfo.getResources(mainThread);
if (container != null && container.getCompatibilityInfo().applicationScale !=
mResources.getCompatibilityInfo().applicationScale) {
if (mResources != null && container != null
&& container.getCompatibilityInfo().applicationScale !=
mResources.getCompatibilityInfo().applicationScale) {
if (DEBUG) {
Log.d(TAG, "loaded context has different scaling. Using container's" +
" compatiblity info:" + container.getDisplayMetrics());