diff options
| author | Jeff Brown <jeffbrown@google.com> | 2014-04-11 01:21:14 -0700 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2014-04-11 01:33:20 -0700 |
| commit | 4e5c089ef3e62e7f658e71c0be262d09bd3e399b (patch) | |
| tree | 6482287ee4ff25d4f40d8e2fd162c85c2dbbc14e /core/java/android/view/DisplayInfo.java | |
| parent | 90b39abaf95640021d15be70b5841abe8366b33e (diff) | |
| parent | 337e764debde56b1462fb5f2794b3e917d8a42e2 (diff) | |
resolved conflicts for merge of 337e764d to master
Change-Id: I8168dbf42b68c2f7b5ccb300e0080dddc627af26
Diffstat (limited to 'core/java/android/view/DisplayInfo.java')
| -rw-r--r-- | core/java/android/view/DisplayInfo.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java index 7fd7b83cdff9..b0fe0faf72f6 100644 --- a/core/java/android/view/DisplayInfo.java +++ b/core/java/android/view/DisplayInfo.java @@ -180,6 +180,11 @@ public final class DisplayInfo implements Parcelable { public float physicalYDpi; /** + * The state of the display, such as {@link android.view.Display#STATE_ON}. + */ + public int state; + + /** * The UID of the application that owns this display, or zero if it is owned by the system. * <p> * If the display is private, then only the owner can use it. @@ -248,6 +253,7 @@ public final class DisplayInfo implements Parcelable { && logicalDensityDpi == other.logicalDensityDpi && physicalXDpi == other.physicalXDpi && physicalYDpi == other.physicalYDpi + && state == other.state && ownerUid == other.ownerUid && Objects.equal(ownerPackageName, other.ownerPackageName); } @@ -280,6 +286,7 @@ public final class DisplayInfo implements Parcelable { logicalDensityDpi = other.logicalDensityDpi; physicalXDpi = other.physicalXDpi; physicalYDpi = other.physicalYDpi; + state = other.state; ownerUid = other.ownerUid; ownerPackageName = other.ownerPackageName; } @@ -307,6 +314,7 @@ public final class DisplayInfo implements Parcelable { logicalDensityDpi = source.readInt(); physicalXDpi = source.readFloat(); physicalYDpi = source.readFloat(); + state = source.readInt(); ownerUid = source.readInt(); ownerPackageName = source.readString(); } @@ -335,6 +343,7 @@ public final class DisplayInfo implements Parcelable { dest.writeInt(logicalDensityDpi); dest.writeFloat(physicalXDpi); dest.writeFloat(physicalYDpi); + dest.writeInt(state); dest.writeInt(ownerUid); dest.writeString(ownerPackageName); } @@ -431,7 +440,7 @@ public final class DisplayInfo implements Parcelable { sb.append(smallestNominalAppHeight); sb.append(", "); sb.append(refreshRate); - sb.append(" fps, rotation"); + sb.append(" fps, rotation "); sb.append(rotation); sb.append(", density "); sb.append(logicalDensityDpi); @@ -446,6 +455,8 @@ public final class DisplayInfo implements Parcelable { if (address != null) { sb.append(", address ").append(address); } + sb.append(", state "); + sb.append(Display.stateToString(state)); if (ownerUid != 0 || ownerPackageName != null) { sb.append(", owner ").append(ownerPackageName); sb.append(" (uid ").append(ownerUid).append(")"); |
