am 7941e903: Merge change 5091 into donut

Merge commit '7941e903c973af66075bbd4fa4bcadf021a61ccc'

* commit '7941e903c973af66075bbd4fa4bcadf021a61ccc':
  * new screen resolution support impl.
This commit is contained in:
Android (Google) Code Review
2009-06-24 17:56:05 -07:00
committed by The Android Open Source Project
10 changed files with 537 additions and 227 deletions

View File

@@ -968,35 +968,7 @@ class PackageManagerService extends IPackageManager.Stub {
if (Config.LOGV) Log.v(TAG, "getActivityInfo " + component + ": " + a);
if (a != null && mSettings.isEnabledLP(a.info, flags)) {
ActivityInfo ainfo = PackageParser.generateActivityInfo(a, flags);
if (ainfo != null) {
ApplicationInfo appInfo = getApplicationInfo(component.getPackageName(),
PackageManager.GET_SUPPORTS_DENSITIES);
if (appInfo != null &&
(appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) == 0) {
// Check if the screen size is same as what the application expect.
CompatibilityInfo info = new CompatibilityInfo(appInfo);
DisplayMetrics metrics = new DisplayMetrics();
metrics.setTo(mMetrics);
int orientation = mMetrics.widthPixels > mMetrics.heightPixels ?
Configuration.ORIENTATION_LANDSCAPE :
Configuration.ORIENTATION_PORTRAIT;
metrics.updateMetrics(info, orientation);
if (!info.mExpandable) {
// Don't allow an app that cannot expand to handle rotation.
ainfo.configChanges &= ~ ActivityInfo.CONFIG_ORIENTATION;
} else {
appInfo.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS;
}
if (DEBUG_SETTINGS) {
Log.d(TAG, "component=" + component +
", expandable:" +
((appInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0));
}
}
}
return ainfo;
return PackageParser.generateActivityInfo(a, flags);
}
if (mResolveComponentName.equals(component)) {
return mResolveActivity;