Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.hardware.display; |
| 18 | |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 19 | import android.annotation.NonNull; |
| 20 | import android.annotation.Nullable; |
Michael Wright | eedcbf1 | 2017-08-16 23:14:54 +0100 | [diff] [blame] | 21 | import android.annotation.SystemApi; |
Jeff Sharkey | d86b8fe | 2017-06-02 17:36:26 -0600 | [diff] [blame] | 22 | import android.annotation.SystemService; |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 23 | import android.content.Context; |
Michael Wright | eedcbf1 | 2017-08-16 23:14:54 +0100 | [diff] [blame] | 24 | import android.graphics.Point; |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 25 | import android.media.projection.MediaProjection; |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 26 | import android.os.Handler; |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 27 | import android.util.SparseArray; |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 28 | import android.view.Display; |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 29 | import android.view.Surface; |
Andrii Kulian | 732a90a | 2017-08-17 17:21:20 -0700 | [diff] [blame] | 30 | import android.view.WindowManagerPolicy; |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 31 | |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 32 | import java.util.ArrayList; |
Kenny Guy | 22bd044 | 2017-10-26 00:15:54 +0100 | [diff] [blame^] | 33 | import java.util.List; |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 34 | |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 35 | /** |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 36 | * Manages the properties of attached displays. |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 37 | */ |
Jeff Sharkey | d86b8fe | 2017-06-02 17:36:26 -0600 | [diff] [blame] | 38 | @SystemService(Context.DISPLAY_SERVICE) |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 39 | public final class DisplayManager { |
| 40 | private static final String TAG = "DisplayManager"; |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 41 | private static final boolean DEBUG = false; |
| 42 | |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 43 | private final Context mContext; |
| 44 | private final DisplayManagerGlobal mGlobal; |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 45 | |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 46 | private final Object mLock = new Object(); |
| 47 | private final SparseArray<Display> mDisplays = new SparseArray<Display>(); |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 48 | |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 49 | private final ArrayList<Display> mTempDisplays = new ArrayList<Display>(); |
| 50 | |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 51 | /** |
| 52 | * Broadcast receiver that indicates when the Wifi display status changes. |
| 53 | * <p> |
| 54 | * The status is provided as a {@link WifiDisplayStatus} object in the |
| 55 | * {@link #EXTRA_WIFI_DISPLAY_STATUS} extra. |
| 56 | * </p><p> |
Jeff Brown | bc33545 | 2012-09-26 18:34:47 -0700 | [diff] [blame] | 57 | * This broadcast is only sent to registered receivers and can only be sent by the system. |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 58 | * </p> |
| 59 | * @hide |
| 60 | */ |
| 61 | public static final String ACTION_WIFI_DISPLAY_STATUS_CHANGED = |
| 62 | "android.hardware.display.action.WIFI_DISPLAY_STATUS_CHANGED"; |
| 63 | |
| 64 | /** |
| 65 | * Contains a {@link WifiDisplayStatus} object. |
| 66 | * @hide |
| 67 | */ |
| 68 | public static final String EXTRA_WIFI_DISPLAY_STATUS = |
| 69 | "android.hardware.display.extra.WIFI_DISPLAY_STATUS"; |
| 70 | |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 71 | /** |
| 72 | * Display category: Presentation displays. |
| 73 | * <p> |
| 74 | * This category can be used to identify secondary displays that are suitable for |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 75 | * use as presentation displays such as HDMI or Wireless displays. Applications |
| 76 | * may automatically project their content to presentation displays to provide |
| 77 | * richer second screen experiences. |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 78 | * </p> |
| 79 | * |
Jeff Brown | 511cd35 | 2013-08-23 17:43:37 -0700 | [diff] [blame] | 80 | * @see android.app.Presentation |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 81 | * @see Display#FLAG_PRESENTATION |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 82 | * @see #getDisplays(String) |
| 83 | */ |
| 84 | public static final String DISPLAY_CATEGORY_PRESENTATION = |
| 85 | "android.hardware.display.category.PRESENTATION"; |
| 86 | |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 87 | /** |
| 88 | * Virtual display flag: Create a public display. |
| 89 | * |
| 90 | * <h3>Public virtual displays</h3> |
| 91 | * <p> |
| 92 | * When this flag is set, the virtual display is public. |
| 93 | * </p><p> |
| 94 | * A public virtual display behaves just like most any other display that is connected |
| 95 | * to the system such as an HDMI or Wireless display. Applications can open |
| 96 | * windows on the display and the system may mirror the contents of other displays |
| 97 | * onto it. |
| 98 | * </p><p> |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 99 | * Creating a public virtual display that isn't restricted to own-content only implicitly |
| 100 | * creates an auto-mirroring display. See {@link #VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR} for |
| 101 | * restrictions on who is allowed to create an auto-mirroring display. |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 102 | * </p> |
| 103 | * |
| 104 | * <h3>Private virtual displays</h3> |
| 105 | * <p> |
| 106 | * When this flag is not set, the virtual display is private as defined by the |
| 107 | * {@link Display#FLAG_PRIVATE} display flag. |
| 108 | * </p> |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 109 | * |
| 110 | * <p> |
Andrii Kulian | fc8f82b | 2017-01-26 13:17:27 -0800 | [diff] [blame] | 111 | * A private virtual display belongs to the application that created it. Only the a owner of a |
| 112 | * private virtual display and the apps that are already on that display are allowed to place |
| 113 | * windows upon it. The private virtual display also does not participate in display mirroring: |
| 114 | * it will neither receive mirrored content from another display nor allow its own content to be |
| 115 | * mirrored elsewhere. More precisely, the only processes that are allowed to enumerate or |
| 116 | * interact with the private display are those that have the same UID as the application that |
| 117 | * originally created the private virtual display or as the activities that are already on that |
| 118 | * display. |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 119 | * </p> |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 120 | * |
| 121 | * @see #createVirtualDisplay |
Jeff Brown | d14c8c9 | 2014-01-07 18:13:09 -0800 | [diff] [blame] | 122 | * @see #VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 123 | * @see #VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 124 | */ |
| 125 | public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1 << 0; |
| 126 | |
| 127 | /** |
| 128 | * Virtual display flag: Create a presentation display. |
| 129 | * |
| 130 | * <h3>Presentation virtual displays</h3> |
| 131 | * <p> |
| 132 | * When this flag is set, the virtual display is registered as a presentation |
| 133 | * display in the {@link #DISPLAY_CATEGORY_PRESENTATION presentation display category}. |
| 134 | * Applications may automatically project their content to presentation displays |
| 135 | * to provide richer second screen experiences. |
| 136 | * </p> |
| 137 | * |
| 138 | * <h3>Non-presentation virtual displays</h3> |
| 139 | * <p> |
| 140 | * When this flag is not set, the virtual display is not registered as a presentation |
| 141 | * display. Applications can still project their content on the display but they |
| 142 | * will typically not do so automatically. This option is appropriate for |
| 143 | * more special-purpose displays. |
| 144 | * </p> |
| 145 | * |
Jeff Brown | 511cd35 | 2013-08-23 17:43:37 -0700 | [diff] [blame] | 146 | * @see android.app.Presentation |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 147 | * @see #createVirtualDisplay |
| 148 | * @see #DISPLAY_CATEGORY_PRESENTATION |
| 149 | * @see Display#FLAG_PRESENTATION |
| 150 | */ |
| 151 | public static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = 1 << 1; |
| 152 | |
| 153 | /** |
| 154 | * Virtual display flag: Create a secure display. |
| 155 | * |
| 156 | * <h3>Secure virtual displays</h3> |
| 157 | * <p> |
| 158 | * When this flag is set, the virtual display is considered secure as defined |
| 159 | * by the {@link Display#FLAG_SECURE} display flag. The caller promises to take |
| 160 | * reasonable measures, such as over-the-air encryption, to prevent the contents |
| 161 | * of the display from being intercepted or recorded on a persistent medium. |
| 162 | * </p><p> |
| 163 | * Creating a secure virtual display requires the |
| 164 | * {@link android.Manifest.permission#CAPTURE_SECURE_VIDEO_OUTPUT} permission. |
| 165 | * This permission is reserved for use by system components and is not available to |
| 166 | * third-party applications. |
| 167 | * </p> |
| 168 | * |
| 169 | * <h3>Non-secure virtual displays</h3> |
| 170 | * <p> |
| 171 | * When this flag is not set, the virtual display is considered unsecure. |
| 172 | * The content of secure windows will be blanked if shown on this display. |
| 173 | * </p> |
| 174 | * |
Jeff Brown | 511cd35 | 2013-08-23 17:43:37 -0700 | [diff] [blame] | 175 | * @see Display#FLAG_SECURE |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 176 | * @see #createVirtualDisplay |
| 177 | */ |
| 178 | public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 1 << 2; |
| 179 | |
Jeff Brown | d14c8c9 | 2014-01-07 18:13:09 -0800 | [diff] [blame] | 180 | /** |
| 181 | * Virtual display flag: Only show this display's own content; do not mirror |
| 182 | * the content of another display. |
| 183 | * |
| 184 | * <p> |
| 185 | * This flag is used in conjunction with {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}. |
| 186 | * Ordinarily public virtual displays will automatically mirror the content of the |
| 187 | * default display if they have no windows of their own. When this flag is |
| 188 | * specified, the virtual display will only ever show its own content and |
| 189 | * will be blanked instead if it has no windows. |
| 190 | * </p> |
| 191 | * |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 192 | * <p> |
| 193 | * This flag is mutually exclusive with {@link #VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR}. If both |
| 194 | * flags are specified then the own-content only behavior will be applied. |
| 195 | * </p> |
| 196 | * |
| 197 | * <p> |
| 198 | * This behavior of this flag is implied whenever neither {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC} |
| 199 | * nor {@link #VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR} have been set. This flag is only required to |
| 200 | * override the default behavior when creating a public display. |
| 201 | * </p> |
| 202 | * |
Jeff Brown | d14c8c9 | 2014-01-07 18:13:09 -0800 | [diff] [blame] | 203 | * @see #createVirtualDisplay |
| 204 | */ |
| 205 | public static final int VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY = 1 << 3; |
| 206 | |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 207 | |
| 208 | /** |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 209 | * Virtual display flag: Allows content to be mirrored on private displays when no content is |
| 210 | * being shown. |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 211 | * |
Michael Wright | 9469cdd | 2014-07-29 13:03:56 -0700 | [diff] [blame] | 212 | * <p> |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 213 | * This flag is mutually exclusive with {@link #VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY}. |
| 214 | * If both flags are specified then the own-content only behavior will be applied. |
Michael Wright | 9469cdd | 2014-07-29 13:03:56 -0700 | [diff] [blame] | 215 | * </p> |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 216 | * |
Michael Wright | 9469cdd | 2014-07-29 13:03:56 -0700 | [diff] [blame] | 217 | * <p> |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 218 | * The behavior of this flag is implied whenever {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC} is set |
| 219 | * and {@link #VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY} has not been set. This flag is only |
| 220 | * required to override the default behavior when creating a private display. |
| 221 | * </p> |
| 222 | * |
| 223 | * <p> |
| 224 | * Creating an auto-mirroing virtual display requires the |
| 225 | * {@link android.Manifest.permission#CAPTURE_VIDEO_OUTPUT} |
| 226 | * or {@link android.Manifest.permission#CAPTURE_SECURE_VIDEO_OUTPUT} permission. |
| 227 | * These permissions are reserved for use by system components and are not available to |
| 228 | * third-party applications. |
| 229 | * |
| 230 | * Alternatively, an appropriate {@link MediaProjection} may be used to create an |
| 231 | * auto-mirroring virtual display. |
Michael Wright | 9469cdd | 2014-07-29 13:03:56 -0700 | [diff] [blame] | 232 | * </p> |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 233 | * |
| 234 | * @see #createVirtualDisplay |
| 235 | */ |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 236 | public static final int VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR = 1 << 4; |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 237 | |
Andrii Kulian | fc8f82b | 2017-01-26 13:17:27 -0800 | [diff] [blame] | 238 | /** |
| 239 | * Virtual display flag: Allows content to be displayed on private virtual displays when |
| 240 | * keyguard is shown but is insecure. |
| 241 | * |
| 242 | * <p> |
Andrii Kulian | 732a90a | 2017-08-17 17:21:20 -0700 | [diff] [blame] | 243 | * This might be used in a case when the content of a virtual display is captured and sent to an |
| 244 | * external hardware display that is not visible to the system directly. This flag will allow |
| 245 | * the continued display of content while other displays will be covered by a keyguard which |
| 246 | * doesn't require providing credentials to unlock. This means that there is either no password |
| 247 | * or other authentication method set, or the device is in a trusted state - |
| 248 | * {@link android.service.trust.TrustAgentService} has available and active trust agent. |
| 249 | * </p><p> |
Andrii Kulian | fc8f82b | 2017-01-26 13:17:27 -0800 | [diff] [blame] | 250 | * This flag can only be applied to private displays as defined by the |
| 251 | * {@link Display#FLAG_PRIVATE} display flag. It is mutually exclusive with |
| 252 | * {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}. If both flags are specified then this flag's behavior |
| 253 | * will not be applied. |
| 254 | * </p> |
| 255 | * |
| 256 | * @see #createVirtualDisplay |
Andrii Kulian | 732a90a | 2017-08-17 17:21:20 -0700 | [diff] [blame] | 257 | * @see WindowManagerPolicy#isKeyguardSecure(int) |
| 258 | * @see WindowManagerPolicy#isKeyguardTrustedLw() |
Andrii Kulian | 22512e8 | 2017-04-13 11:34:43 -0700 | [diff] [blame] | 259 | * @hide |
Andrii Kulian | fc8f82b | 2017-01-26 13:17:27 -0800 | [diff] [blame] | 260 | */ |
Andrii Kulian | 732a90a | 2017-08-17 17:21:20 -0700 | [diff] [blame] | 261 | // TODO: Update name and documentation and un-hide the flag. Don't change the value before that. |
Andrii Kulian | 7211d2e | 2017-01-27 15:58:05 -0800 | [diff] [blame] | 262 | public static final int VIRTUAL_DISPLAY_FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD = 1 << 5; |
Andrii Kulian | fc8f82b | 2017-01-26 13:17:27 -0800 | [diff] [blame] | 263 | |
Santos Cordon | b060863 | 2017-04-05 10:31:15 -0700 | [diff] [blame] | 264 | /** |
| 265 | * Virtual display flag: Specifies that the virtual display can be associated with a |
| 266 | * touchpad device that matches its uniqueId. |
| 267 | * |
| 268 | * @see #createVirtualDisplay |
| 269 | * @hide |
| 270 | */ |
| 271 | public static final int VIRTUAL_DISPLAY_FLAG_SUPPORTS_TOUCH = 1 << 6; |
| 272 | |
Alex Sakhartchouk | 879d24f | 2017-06-20 22:01:19 -0400 | [diff] [blame] | 273 | /** |
| 274 | * Virtual display flag: Indicates that the orientation of this display device is coupled to |
| 275 | * the rotation of its associated logical display. |
| 276 | * |
| 277 | * @see #createVirtualDisplay |
| 278 | * @hide |
| 279 | */ |
| 280 | public static final int VIRTUAL_DISPLAY_FLAG_ROTATES_WITH_CONTENT = 1 << 7; |
| 281 | |
rongliu | 1e90fc3 | 2017-10-04 17:30:30 -0700 | [diff] [blame] | 282 | /** |
| 283 | * Virtual display flag: Indicates that the contents will be destroyed once |
| 284 | * the display is removed. |
| 285 | * |
rongliu | 3e9f972 | 2017-10-06 11:01:02 -0700 | [diff] [blame] | 286 | * Public virtual displays without this flag will move their content to main display |
| 287 | * stack once they're removed. Private vistual displays will always destroy their |
| 288 | * content on removal even without this flag. |
| 289 | * |
rongliu | 1e90fc3 | 2017-10-04 17:30:30 -0700 | [diff] [blame] | 290 | * @see #createVirtualDisplay |
| 291 | * @hide |
| 292 | */ |
| 293 | public static final int VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL = 1 << 8; |
| 294 | |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 295 | /** @hide */ |
| 296 | public DisplayManager(Context context) { |
| 297 | mContext = context; |
| 298 | mGlobal = DisplayManagerGlobal.getInstance(); |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 299 | } |
| 300 | |
| 301 | /** |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 302 | * Gets information about a logical display. |
Jeff Brown | 848c2dc | 2012-08-19 20:18:08 -0700 | [diff] [blame] | 303 | * |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 304 | * The display metrics may be adjusted to provide compatibility |
| 305 | * for legacy applications. |
Jeff Brown | 848c2dc | 2012-08-19 20:18:08 -0700 | [diff] [blame] | 306 | * |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 307 | * @param displayId The logical display id. |
| 308 | * @return The display object, or null if there is no valid display with the given id. |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 309 | */ |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 310 | public Display getDisplay(int displayId) { |
| 311 | synchronized (mLock) { |
| 312 | return getOrCreateDisplayLocked(displayId, false /*assumeValid*/); |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | /** |
| 317 | * Gets all currently valid logical displays. |
| 318 | * |
| 319 | * @return An array containing all displays. |
| 320 | */ |
| 321 | public Display[] getDisplays() { |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 322 | return getDisplays(null); |
| 323 | } |
| 324 | |
| 325 | /** |
| 326 | * Gets all currently valid logical displays of the specified category. |
| 327 | * <p> |
| 328 | * When there are multiple displays in a category the returned displays are sorted |
| 329 | * of preference. For example, if the requested category is |
| 330 | * {@link #DISPLAY_CATEGORY_PRESENTATION} and there are multiple presentation displays |
| 331 | * then the displays are sorted so that the first display in the returned array |
| 332 | * is the most preferred presentation display. The application may simply |
| 333 | * use the first display or allow the user to choose. |
| 334 | * </p> |
| 335 | * |
| 336 | * @param category The requested display category or null to return all displays. |
| 337 | * @return An array containing all displays sorted by order of preference. |
| 338 | * |
| 339 | * @see #DISPLAY_CATEGORY_PRESENTATION |
| 340 | */ |
| 341 | public Display[] getDisplays(String category) { |
| 342 | final int[] displayIds = mGlobal.getDisplayIds(); |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 343 | synchronized (mLock) { |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 344 | try { |
| 345 | if (category == null) { |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 346 | addAllDisplaysLocked(mTempDisplays, displayIds); |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 347 | } else if (category.equals(DISPLAY_CATEGORY_PRESENTATION)) { |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 348 | addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_WIFI); |
| 349 | addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_HDMI); |
| 350 | addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_OVERLAY); |
| 351 | addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_VIRTUAL); |
Jeff Brown | 848c2dc | 2012-08-19 20:18:08 -0700 | [diff] [blame] | 352 | } |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 353 | return mTempDisplays.toArray(new Display[mTempDisplays.size()]); |
| 354 | } finally { |
| 355 | mTempDisplays.clear(); |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 356 | } |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 357 | } |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 358 | } |
| 359 | |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 360 | private void addAllDisplaysLocked(ArrayList<Display> displays, int[] displayIds) { |
| 361 | for (int i = 0; i < displayIds.length; i++) { |
| 362 | Display display = getOrCreateDisplayLocked(displayIds[i], true /*assumeValid*/); |
| 363 | if (display != null) { |
| 364 | displays.add(display); |
| 365 | } |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | private void addPresentationDisplaysLocked( |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 370 | ArrayList<Display> displays, int[] displayIds, int matchType) { |
| 371 | for (int i = 0; i < displayIds.length; i++) { |
| 372 | Display display = getOrCreateDisplayLocked(displayIds[i], true /*assumeValid*/); |
| 373 | if (display != null |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 374 | && (display.getFlags() & Display.FLAG_PRESENTATION) != 0 |
| 375 | && display.getType() == matchType) { |
Jeff Brown | 92130f6 | 2012-10-24 21:28:33 -0700 | [diff] [blame] | 376 | displays.add(display); |
| 377 | } |
| 378 | } |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 379 | } |
| 380 | |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 381 | private Display getOrCreateDisplayLocked(int displayId, boolean assumeValid) { |
| 382 | Display display = mDisplays.get(displayId); |
| 383 | if (display == null) { |
Bryce Lee | c406152 | 2017-05-09 10:40:23 -0700 | [diff] [blame] | 384 | // TODO: We cannot currently provide any override configurations for metrics on displays |
| 385 | // other than the display the context is associated with. |
| 386 | final Context context = mContext.getDisplay().getDisplayId() == displayId |
| 387 | ? mContext : mContext.getApplicationContext(); |
| 388 | |
| 389 | display = mGlobal.getCompatibleDisplay(displayId, context.getResources()); |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 390 | if (display != null) { |
| 391 | mDisplays.put(displayId, display); |
| 392 | } |
| 393 | } else if (!assumeValid && !display.isValid()) { |
| 394 | display = null; |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 395 | } |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 396 | return display; |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 397 | } |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 398 | |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 399 | /** |
| 400 | * Registers an display listener to receive notifications about when |
| 401 | * displays are added, removed or changed. |
| 402 | * |
| 403 | * @param listener The listener to register. |
| 404 | * @param handler The handler on which the listener should be invoked, or null |
| 405 | * if the listener should be invoked on the calling thread's looper. |
| 406 | * |
| 407 | * @see #unregisterDisplayListener |
| 408 | */ |
| 409 | public void registerDisplayListener(DisplayListener listener, Handler handler) { |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 410 | mGlobal.registerDisplayListener(listener, handler); |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 411 | } |
| 412 | |
| 413 | /** |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 414 | * Unregisters a display listener. |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 415 | * |
| 416 | * @param listener The listener to unregister. |
| 417 | * |
| 418 | * @see #registerDisplayListener |
| 419 | */ |
| 420 | public void unregisterDisplayListener(DisplayListener listener) { |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 421 | mGlobal.unregisterDisplayListener(listener); |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 422 | } |
| 423 | |
| 424 | /** |
Jeff Brown | ce468a3 | 2013-11-21 16:42:03 -0800 | [diff] [blame] | 425 | * Starts scanning for available Wifi displays. |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 426 | * The results are sent as a {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED} broadcast. |
Jeff Brown | af57418 | 2013-11-14 18:16:08 -0800 | [diff] [blame] | 427 | * <p> |
Jeff Brown | ce468a3 | 2013-11-21 16:42:03 -0800 | [diff] [blame] | 428 | * Calls to this method nest and must be matched by an equal number of calls to |
| 429 | * {@link #stopWifiDisplayScan()}. |
| 430 | * </p><p> |
| 431 | * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}. |
| 432 | * </p> |
| 433 | * |
| 434 | * @hide |
| 435 | */ |
| 436 | public void startWifiDisplayScan() { |
| 437 | mGlobal.startWifiDisplayScan(); |
| 438 | } |
| 439 | |
| 440 | /** |
| 441 | * Stops scanning for available Wifi displays. |
| 442 | * <p> |
Jeff Brown | af57418 | 2013-11-14 18:16:08 -0800 | [diff] [blame] | 443 | * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}. |
| 444 | * </p> |
| 445 | * |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 446 | * @hide |
| 447 | */ |
Jeff Brown | ce468a3 | 2013-11-21 16:42:03 -0800 | [diff] [blame] | 448 | public void stopWifiDisplayScan() { |
| 449 | mGlobal.stopWifiDisplayScan(); |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 450 | } |
| 451 | |
| 452 | /** |
| 453 | * Connects to a Wifi display. |
| 454 | * The results are sent as a {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED} broadcast. |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 455 | * <p> |
| 456 | * Automatically remembers the display after a successful connection, if not |
| 457 | * already remembered. |
Jeff Brown | bc33545 | 2012-09-26 18:34:47 -0700 | [diff] [blame] | 458 | * </p><p> |
Jeff Brown | af57418 | 2013-11-14 18:16:08 -0800 | [diff] [blame] | 459 | * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}. |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 460 | * </p> |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 461 | * |
| 462 | * @param deviceAddress The MAC address of the device to which we should connect. |
| 463 | * @hide |
| 464 | */ |
| 465 | public void connectWifiDisplay(String deviceAddress) { |
| 466 | mGlobal.connectWifiDisplay(deviceAddress); |
| 467 | } |
| 468 | |
Chong Zhang | 1f3ecaa | 2013-05-03 15:55:36 -0700 | [diff] [blame] | 469 | /** @hide */ |
| 470 | public void pauseWifiDisplay() { |
| 471 | mGlobal.pauseWifiDisplay(); |
| 472 | } |
| 473 | |
| 474 | /** @hide */ |
| 475 | public void resumeWifiDisplay() { |
| 476 | mGlobal.resumeWifiDisplay(); |
| 477 | } |
| 478 | |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 479 | /** |
| 480 | * Disconnects from the current Wifi display. |
| 481 | * The results are sent as a {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED} broadcast. |
| 482 | * @hide |
| 483 | */ |
| 484 | public void disconnectWifiDisplay() { |
| 485 | mGlobal.disconnectWifiDisplay(); |
| 486 | } |
| 487 | |
| 488 | /** |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 489 | * Renames a Wifi display. |
| 490 | * <p> |
| 491 | * The display must already be remembered for this call to succeed. In other words, |
| 492 | * we must already have successfully connected to the display at least once and then |
| 493 | * not forgotten it. |
Jeff Brown | bc33545 | 2012-09-26 18:34:47 -0700 | [diff] [blame] | 494 | * </p><p> |
| 495 | * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}. |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 496 | * </p> |
| 497 | * |
| 498 | * @param deviceAddress The MAC address of the device to rename. |
| 499 | * @param alias The alias name by which to remember the device, or null |
| 500 | * or empty if no alias should be used. |
| 501 | * @hide |
| 502 | */ |
| 503 | public void renameWifiDisplay(String deviceAddress, String alias) { |
| 504 | mGlobal.renameWifiDisplay(deviceAddress, alias); |
| 505 | } |
| 506 | |
| 507 | /** |
| 508 | * Forgets a previously remembered Wifi display. |
| 509 | * <p> |
| 510 | * Automatically disconnects from the display if currently connected to it. |
Jeff Brown | bc33545 | 2012-09-26 18:34:47 -0700 | [diff] [blame] | 511 | * </p><p> |
| 512 | * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}. |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 513 | * </p> |
| 514 | * |
| 515 | * @param deviceAddress The MAC address of the device to forget. |
| 516 | * @hide |
| 517 | */ |
| 518 | public void forgetWifiDisplay(String deviceAddress) { |
| 519 | mGlobal.forgetWifiDisplay(deviceAddress); |
| 520 | } |
| 521 | |
| 522 | /** |
Jeff Brown | e08ae38 | 2012-09-07 20:36:36 -0700 | [diff] [blame] | 523 | * Gets the current Wifi display status. |
| 524 | * Watch for changes in the status by registering a broadcast receiver for |
| 525 | * {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED}. |
| 526 | * |
| 527 | * @return The current Wifi display status. |
| 528 | * @hide |
| 529 | */ |
| 530 | public WifiDisplayStatus getWifiDisplayStatus() { |
| 531 | return mGlobal.getWifiDisplayStatus(); |
| 532 | } |
| 533 | |
| 534 | /** |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 535 | * Creates a virtual display. |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 536 | * |
Dianne Hackborn | 8ad2af7 | 2015-03-17 17:00:24 -0700 | [diff] [blame] | 537 | * @see #createVirtualDisplay(String, int, int, int, Surface, int, |
| 538 | * VirtualDisplay.Callback, Handler) |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 539 | */ |
| 540 | public VirtualDisplay createVirtualDisplay(@NonNull String name, |
| 541 | int width, int height, int densityDpi, @Nullable Surface surface, int flags) { |
| 542 | return createVirtualDisplay(name, width, height, densityDpi, surface, flags, null, null); |
| 543 | } |
| 544 | |
| 545 | /** |
| 546 | * Creates a virtual display. |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 547 | * <p> |
| 548 | * The content of a virtual display is rendered to a {@link Surface} provided |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 549 | * by the application. |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 550 | * </p><p> |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 551 | * The virtual display should be {@link VirtualDisplay#release released} |
| 552 | * when no longer needed. Because a virtual display renders to a surface |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 553 | * provided by the application, it will be released automatically when the |
| 554 | * process terminates and all remaining windows on it will be forcibly removed. |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 555 | * </p><p> |
| 556 | * The behavior of the virtual display depends on the flags that are provided |
| 557 | * to this method. By default, virtual displays are created to be private, |
| 558 | * non-presentation and unsecure. Permissions may be required to use certain flags. |
Jeff Brown | 92207df | 2014-04-16 13:16:07 -0700 | [diff] [blame] | 559 | * </p><p> |
| 560 | * As of {@link android.os.Build.VERSION_CODES#KITKAT_WATCH}, the surface may |
| 561 | * be attached or detached dynamically using {@link VirtualDisplay#setSurface}. |
| 562 | * Previously, the surface had to be non-null when {@link #createVirtualDisplay} |
| 563 | * was called and could not be changed for the lifetime of the display. |
| 564 | * </p><p> |
| 565 | * Detaching the surface that backs a virtual display has a similar effect to |
| 566 | * turning off the screen. |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 567 | * </p> |
| 568 | * |
| 569 | * @param name The name of the virtual display, must be non-empty. |
| 570 | * @param width The width of the virtual display in pixels, must be greater than 0. |
| 571 | * @param height The height of the virtual display in pixels, must be greater than 0. |
| 572 | * @param densityDpi The density of the virtual display in dpi, must be greater than 0. |
| 573 | * @param surface The surface to which the content of the virtual display should |
Jeff Brown | 92207df | 2014-04-16 13:16:07 -0700 | [diff] [blame] | 574 | * be rendered, or null if there is none initially. |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 575 | * @param flags A combination of virtual display flags: |
Jeff Brown | d14c8c9 | 2014-01-07 18:13:09 -0800 | [diff] [blame] | 576 | * {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}, {@link #VIRTUAL_DISPLAY_FLAG_PRESENTATION}, |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 577 | * {@link #VIRTUAL_DISPLAY_FLAG_SECURE}, {@link #VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY}, |
Michael Wright | 6720be4 | 2014-07-29 19:14:16 -0700 | [diff] [blame] | 578 | * or {@link #VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR}. |
Michael Wright | 75ee9fc | 2014-09-01 19:55:22 -0700 | [diff] [blame] | 579 | * @param callback Callback to call when the state of the {@link VirtualDisplay} changes |
Michael Wright | 5438e4e | 2014-07-25 14:05:42 -0700 | [diff] [blame] | 580 | * @param handler The handler on which the listener should be invoked, or null |
| 581 | * if the listener should be invoked on the calling thread's looper. |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 582 | * @return The newly created virtual display, or null if the application could |
| 583 | * not create the virtual display. |
Jeff Brown | 7d00aff | 2013-08-02 19:03:49 -0700 | [diff] [blame] | 584 | * |
| 585 | * @throws SecurityException if the caller does not have permission to create |
| 586 | * a virtual display with the specified flags. |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 587 | */ |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 588 | public VirtualDisplay createVirtualDisplay(@NonNull String name, |
| 589 | int width, int height, int densityDpi, @Nullable Surface surface, int flags, |
Michael Wright | 75ee9fc | 2014-09-01 19:55:22 -0700 | [diff] [blame] | 590 | @Nullable VirtualDisplay.Callback callback, @Nullable Handler handler) { |
Santos Cordon | b060863 | 2017-04-05 10:31:15 -0700 | [diff] [blame] | 591 | return createVirtualDisplay(null /* projection */, name, width, height, densityDpi, surface, |
| 592 | flags, callback, handler, null /* uniqueId */); |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 593 | } |
| 594 | |
| 595 | /** @hide */ |
| 596 | public VirtualDisplay createVirtualDisplay(@Nullable MediaProjection projection, |
| 597 | @NonNull String name, int width, int height, int densityDpi, @Nullable Surface surface, |
Santos Cordon | b060863 | 2017-04-05 10:31:15 -0700 | [diff] [blame] | 598 | int flags, @Nullable VirtualDisplay.Callback callback, @Nullable Handler handler, |
| 599 | @Nullable String uniqueId) { |
Michael Wright | c39d47a | 2014-07-08 18:07:36 -0700 | [diff] [blame] | 600 | return mGlobal.createVirtualDisplay(mContext, projection, |
Santos Cordon | b060863 | 2017-04-05 10:31:15 -0700 | [diff] [blame] | 601 | name, width, height, densityDpi, surface, flags, callback, handler, uniqueId); |
Jeff Brown | a506a6e | 2013-06-04 00:02:38 -0700 | [diff] [blame] | 602 | } |
| 603 | |
| 604 | /** |
Michael Wright | eedcbf1 | 2017-08-16 23:14:54 +0100 | [diff] [blame] | 605 | * Gets the stable device display size, in pixels. |
| 606 | * |
| 607 | * This should really only be used for things like server-side filtering of available |
| 608 | * applications. Most applications don't need the level of stability guaranteed by this and |
| 609 | * should instead query either the size of the display they're currently running on or the |
| 610 | * size of the default display. |
| 611 | * @hide |
| 612 | */ |
| 613 | @SystemApi |
| 614 | public Point getStableDisplaySize() { |
| 615 | return mGlobal.getStableDisplaySize(); |
| 616 | } |
| 617 | |
| 618 | /** |
Kenny Guy | 22bd044 | 2017-10-26 00:15:54 +0100 | [diff] [blame^] | 619 | * Fetch {@link BrightnessChangeEvent}s. |
| 620 | * @hide until we make it a system api. |
| 621 | */ |
| 622 | public List<BrightnessChangeEvent> getBrightnessEvents() { |
| 623 | return mGlobal.getBrightnessEvents(); |
| 624 | } |
| 625 | |
| 626 | /** |
| 627 | * @hide STOPSHIP - remove when adaptive brightness accepts curves. |
| 628 | */ |
| 629 | public void setBrightness(int brightness) { |
| 630 | mGlobal.setBrightness(brightness); |
| 631 | } |
| 632 | |
| 633 | /** |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 634 | * Listens for changes in available display devices. |
| 635 | */ |
| 636 | public interface DisplayListener { |
| 637 | /** |
| 638 | * Called whenever a logical display has been added to the system. |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 639 | * Use {@link DisplayManager#getDisplay} to get more information about |
| 640 | * the display. |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 641 | * |
| 642 | * @param displayId The id of the logical display that was added. |
| 643 | */ |
| 644 | void onDisplayAdded(int displayId); |
| 645 | |
| 646 | /** |
| 647 | * Called whenever a logical display has been removed from the system. |
| 648 | * |
| 649 | * @param displayId The id of the logical display that was removed. |
| 650 | */ |
| 651 | void onDisplayRemoved(int displayId); |
| 652 | |
| 653 | /** |
| 654 | * Called whenever the properties of a logical display have changed. |
| 655 | * |
| 656 | * @param displayId The id of the logical display that changed. |
| 657 | */ |
| 658 | void onDisplayChanged(int displayId); |
| 659 | } |
Jeff Brown | fa25bf5 | 2012-07-23 19:26:30 -0700 | [diff] [blame] | 660 | } |