Enable physical display size hacks for API level 29

For AOSP TV devices that might not pass manual verification.

PiperOrigin-RevId: 284154763
This commit is contained in:
olly 2019-12-06 11:33:10 +00:00 committed by Oliver Woodman
parent 22f25c57bb
commit 7e93c5c0b6

View File

@ -1927,7 +1927,7 @@ public final class Util {
* @return The physical display size, in pixels.
*/
public static Point getPhysicalDisplaySize(Context context, Display display) {
if (Util.SDK_INT <= 28 && display.getDisplayId() == Display.DEFAULT_DISPLAY && isTv(context)) {
if (Util.SDK_INT <= 29 && display.getDisplayId() == Display.DEFAULT_DISPLAY && isTv(context)) {
// On Android TVs it is common for the UI to be configured for a lower resolution than
// SurfaceViews can output. Before API 26 the Display object does not provide a way to
// identify this case, and up to and including API 28 many devices still do not correctly set