From 96bba0f57a70b4f8fe04ca260a68a9e39d0c13b9 Mon Sep 17 00:00:00 2001 From: Sarah Chin Date: Tue, 3 Nov 2020 17:24:39 -0800 Subject: Update TelephonyDisplayInfo docs Explain how to get TelephonyDisplayInfo through TelephonyManager and PhoneStateListener Test: build Fix: 158760752 Change-Id: Ia59efcf68c77d79be1a223f9fd6cbf3ec333478a Merged-In: Ia59efcf68c77d79be1a223f9fd6cbf3ec333478a --- telephony/java/android/telephony/TelephonyDisplayInfo.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/telephony/java/android/telephony/TelephonyDisplayInfo.java b/telephony/java/android/telephony/TelephonyDisplayInfo.java index 3d5c6aad1042..1fcb504e7895 100644 --- a/telephony/java/android/telephony/TelephonyDisplayInfo.java +++ b/telephony/java/android/telephony/TelephonyDisplayInfo.java @@ -29,6 +29,10 @@ import java.util.Objects; * information is provided in accordance with carrier policy and branding preferences; it is not * necessarily a precise or accurate representation of the current state and should be treated * accordingly. + * To be notified of changes in TelephonyDisplayInfo, use + * {@link TelephonyManager#registerPhoneStateListener} with a {@link PhoneStateListener} + * that implements {@link PhoneStateListener.DisplayInfoChangedListener}. + * Override the onDisplayInfoChanged() method to handle the broadcast. */ public final class TelephonyDisplayInfo implements Parcelable { /** -- cgit v1.2.3-59-g8ed1b