From 49e7ff9647e6547c2b852944a5435a05794b9951 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Thu, 14 May 2015 16:18:53 -0700 Subject: Add Configuration data for round displays Add round values to the screenLayout field for Configuration and a convenience method to check roundness. Plumb this through the DisplayManager, making roundness the property of a DisplayAdapter. The built-in main display will read the configuration resource config_mainBuiltInDisplayIsRound to determine its roundness. Device-specific resource overlays should set this to true for devices with round primary displays. By default, this config resource inherits from the existing config_windowIsRound value currently used by some Android Wear device configurations. This change awaits another for aapt/native resources code to make the resource filtering system aware of this property. Change-Id: I1daced7ca6d6e172789e7c32bebfd43753bfa2ae --- core/java/android/view/DisplayInfo.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/java/android/view/DisplayInfo.java') diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java index b9fde8a..cf17990 100644 --- a/core/java/android/view/DisplayInfo.java +++ b/core/java/android/view/DisplayInfo.java @@ -609,6 +609,9 @@ public final class DisplayInfo implements Parcelable { if ((flags & Display.FLAG_SCALING_DISABLED) != 0) { result.append(", FLAG_SCALING_DISABLED"); } + if ((flags & Display.FLAG_ROUND) != 0) { + result.append(", FLAG_ROUND"); + } return result.toString(); } } -- cgit v1.1