* commit '9749e33579a3d27144ac39d9e3572ed30e234039': Support 4K overlay displays.
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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) {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user