am 9749e335: am 4bc50540: Merge "Support 4K overlay displays." into mnc-dev

* commit '9749e33579a3d27144ac39d9e3572ed30e234039':
  Support 4K overlay displays.
This commit is contained in:
Jeff Brown
2015-06-10 23:14:36 +00:00
committed by Android Git Automerger
3 changed files with 8 additions and 2 deletions

View File

@@ -213,7 +213,7 @@ public class Presentation extends Dialog {
// dismiss the presentation immediately. This case is expected // dismiss the presentation immediately. This case is expected
// to be rare but surprising, so we'll write a log message about it. // to be rare but surprising, so we'll write a log message about it.
if (!isConfigurationStillValid()) { if (!isConfigurationStillValid()) {
Log.i(TAG, "Presentation is being immediately dismissed because the " Log.i(TAG, "Presentation is being dismissed because the "
+ "display metrics have changed since it was created."); + "display metrics have changed since it was created.");
mHandler.sendEmptyMessage(MSG_CANCEL); mHandler.sendEmptyMessage(MSG_CANCEL);
} }
@@ -274,6 +274,8 @@ public class Presentation extends Dialog {
// is invalid and the application must recreate the presentation to get // is invalid and the application must recreate the presentation to get
// a new context. // a new context.
if (!isConfigurationStillValid()) { if (!isConfigurationStillValid()) {
Log.i(TAG, "Presentation is being dismissed because the "
+ "display metrics have changed since it was created.");
cancel(); cancel();
} }
} }

View File

@@ -133,6 +133,8 @@ final class LogicalDisplay {
mInfo.overscanBottom = mOverrideDisplayInfo.overscanBottom; mInfo.overscanBottom = mOverrideDisplayInfo.overscanBottom;
mInfo.rotation = mOverrideDisplayInfo.rotation; mInfo.rotation = mOverrideDisplayInfo.rotation;
mInfo.logicalDensityDpi = mOverrideDisplayInfo.logicalDensityDpi; mInfo.logicalDensityDpi = mOverrideDisplayInfo.logicalDensityDpi;
mInfo.physicalXDpi = mOverrideDisplayInfo.physicalXDpi;
mInfo.physicalYDpi = mOverrideDisplayInfo.physicalYDpi;
} }
} }
return mInfo; return mInfo;

View File

@@ -174,9 +174,11 @@ final class OverlayDisplayAdapter extends DisplayAdapter {
if (width >= MIN_WIDTH && width <= MAX_WIDTH if (width >= MIN_WIDTH && width <= MAX_WIDTH
&& height >= MIN_HEIGHT && height <= MAX_HEIGHT && height >= MIN_HEIGHT && height <= MAX_HEIGHT
&& densityDpi >= DisplayMetrics.DENSITY_LOW && densityDpi >= DisplayMetrics.DENSITY_LOW
&& densityDpi <= DisplayMetrics.DENSITY_XXHIGH) { && densityDpi <= DisplayMetrics.DENSITY_XXXHIGH) {
modes.add(new OverlayMode(width, height, densityDpi)); modes.add(new OverlayMode(width, height, densityDpi));
continue; continue;
} else {
Slog.w(TAG, "Ignoring out-of-range overlay display mode: " + mode);
} }
} catch (NumberFormatException ex) { } catch (NumberFormatException ex) {
} }