Merge "Support 4K overlay displays." into mnc-dev
This commit is contained in:
@@ -213,7 +213,7 @@ public class Presentation extends Dialog {
|
||||
// dismiss the presentation immediately. This case is expected
|
||||
// to be rare but surprising, so we'll write a log message about it.
|
||||
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.");
|
||||
mHandler.sendEmptyMessage(MSG_CANCEL);
|
||||
}
|
||||
@@ -274,6 +274,8 @@ public class Presentation extends Dialog {
|
||||
// is invalid and the application must recreate the presentation to get
|
||||
// a new context.
|
||||
if (!isConfigurationStillValid()) {
|
||||
Log.i(TAG, "Presentation is being dismissed because the "
|
||||
+ "display metrics have changed since it was created.");
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +133,8 @@ final class LogicalDisplay {
|
||||
mInfo.overscanBottom = mOverrideDisplayInfo.overscanBottom;
|
||||
mInfo.rotation = mOverrideDisplayInfo.rotation;
|
||||
mInfo.logicalDensityDpi = mOverrideDisplayInfo.logicalDensityDpi;
|
||||
mInfo.physicalXDpi = mOverrideDisplayInfo.physicalXDpi;
|
||||
mInfo.physicalYDpi = mOverrideDisplayInfo.physicalYDpi;
|
||||
}
|
||||
}
|
||||
return mInfo;
|
||||
|
||||
@@ -174,9 +174,11 @@ final class OverlayDisplayAdapter extends DisplayAdapter {
|
||||
if (width >= MIN_WIDTH && width <= MAX_WIDTH
|
||||
&& height >= MIN_HEIGHT && height <= MAX_HEIGHT
|
||||
&& densityDpi >= DisplayMetrics.DENSITY_LOW
|
||||
&& densityDpi <= DisplayMetrics.DENSITY_XXHIGH) {
|
||||
&& densityDpi <= DisplayMetrics.DENSITY_XXXHIGH) {
|
||||
modes.add(new OverlayMode(width, height, densityDpi));
|
||||
continue;
|
||||
} else {
|
||||
Slog.w(TAG, "Ignoring out-of-range overlay display mode: " + mode);
|
||||
}
|
||||
} catch (NumberFormatException ex) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user