summaryrefslogtreecommitdiff
path: root/core/java/android/view/DisplayAddress.java
Commit message (Collapse)AuthorAgeFilesLines
* Add @Nullable annotation to the parameter of Object.equals() methods.Roman Kalukiewicz2020-10-151-2/+2
| | | | | | | | | | | | | | | | | | Those annotations could be inferred by some tools (like Kotlin), but the https://checkerframework.org/ doesn't check inherited annotations complaining about all equals() invocations that get nullable argument. The change was generated by running find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /' in the frameworks/base directory and by automatically adding and formatting required imports if needed. No manual edits. Bug: 170883422 Test: Annotation change only. Should have not impact. Exempt-From-Owner-Approval: Mechanical change not specific to any component. Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
* Change the type of display port from byte to intMarin Shalamanov2020-04-271-8/+11
| | | | | | | | | | | | Using byte for display port is error prone since ports are in the range [0, 255] and bytes have the range [-128, 127]. This way we need to downcast from int to byte in order to write a value to display port and also we need to call Byte.toUnsignedInt every time we want to consume it. Test: m services Bug: 153334857 Change-Id: I4dce87c0a411c5d447f62cc5564eb4b8a8fb75f0
* Fix signedness of DisplayAddress.Physical portsDominik Laskowski2019-11-251-3/+31
| | | | | | | | | | | Interpret port as unsigned byte for consistency with uint8_t in SF/IF, and clarify signedness in doc comments. Bug: 143713778 Test: adb shell dumpsys display | grep physicalPort Test: LocalDisplayAdapterTest Test: DisplayWindowSettingsTests Change-Id: I56ce0067367372a3a747fde783a1956975e833a0
* Always instantiate DisplayAddress.PhysicalDominik Laskowski2019-04-251-14/+24
| | | | | | | | | | | | | | In legacy multi-display mode with at most two physical displays, physical display IDs reduce to the port IDs for the internal and external connections. This CL instantiates a DisplayAddress.Physical whose getModel method returns null, such that port-dependent logic (e.g. display settings and input association) works on legacy systems without EDID support. Bug: 130672828 Test: dumpsys display Change-Id: I12a40078c5e3666e59283623ec600e8d76493359
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-2/+2
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Add android.view.DisplayAddressDominik Laskowski2019-02-041-0/+174
This CL augments DisplayInfo#address from String to an instance of either DisplayAddress.Physical or DisplayAddress.Network. This can be used to obtain the stable port and model for physical displays. It also wires up DisplayViewport#physicalPort for use by InputFlinger. Bug: 116025192 Test: dumpsys display Change-Id: I2928b8b325b992b949b99a7d9175512f7930a54f