1 /*
2  * Copyright 2021 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.gui;
18 
19 import android.gui.CaptureArgs;
20 import android.gui.Color;
21 import android.gui.CompositionPreference;
22 import android.gui.ContentSamplingAttributes;
23 import android.gui.DisplayBrightness;
24 import android.gui.DisplayCaptureArgs;
25 import android.gui.DisplayDecorationSupport;
26 import android.gui.DisplayedFrameStats;
27 import android.gui.DisplayModeSpecs;
28 import android.gui.DisplayPrimaries;
29 import android.gui.DisplayState;
30 import android.gui.DisplayStatInfo;
31 import android.gui.DynamicDisplayInfo;
32 import android.gui.FrameEvent;
33 import android.gui.FrameStats;
34 import android.gui.HdrConversionCapability;
35 import android.gui.HdrConversionStrategy;
36 import android.gui.IDisplayEventConnection;
37 import android.gui.IFpsListener;
38 import android.gui.IHdrLayerInfoListener;
39 import android.gui.IRegionSamplingListener;
40 import android.gui.IScreenCaptureListener;
41 import android.gui.ISurfaceComposerClient;
42 import android.gui.ITunnelModeEnabledListener;
43 import android.gui.IWindowInfosListener;
44 import android.gui.IWindowInfosPublisher;
45 import android.gui.LayerCaptureArgs;
46 import android.gui.OverlayProperties;
47 import android.gui.PullAtomData;
48 import android.gui.ScreenCaptureResults;
49 import android.gui.ARect;
50 import android.gui.SchedulingPolicy;
51 import android.gui.StalledTransactionInfo;
52 import android.gui.StaticDisplayInfo;
53 import android.gui.WindowInfosListenerInfo;
54 
55 /** @hide */
56 interface ISurfaceComposer {
57 
58     enum VsyncSource {
59         eVsyncSourceApp = 0,
60         eVsyncSourceSurfaceFlinger = 1
61     }
62 
63     enum EventRegistration {
64         modeChanged = 1 << 0,
65         frameRateOverride = 1 << 1,
66     }
67 
68     /**
69      * Signal that we're done booting.
70      * Requires ACCESS_SURFACE_FLINGER permission
71      */
bootFinished()72     void bootFinished();
73 
74     /**
75      * Create a display event connection.
76      *
77      * layerHandle
78      *     Optional binder handle representing a Layer in SF to associate the new
79      *     DisplayEventConnection with. This handle can be found inside a surface control after
80      *     surface creation, see ISurfaceComposerClient::createSurface. Set to null if no layer
81      *     association should be made.
82      */
createDisplayEventConnection(VsyncSource vsyncSource, EventRegistration eventRegistration, @nullable IBinder layerHandle)83     @nullable IDisplayEventConnection createDisplayEventConnection(VsyncSource vsyncSource,
84             EventRegistration eventRegistration, @nullable IBinder layerHandle);
85 
86     /**
87      * Create a connection with SurfaceFlinger.
88      */
createConnection()89     @nullable ISurfaceComposerClient createConnection();
90 
91     /**
92      * Create a virtual display.
93      *
94      * displayName
95      *     The name of the virtual display.
96      * isSecure
97      *     Whether this virtual display is secure.
98      * uniqueId
99      *     The unique ID for the display.
100      * requestedRefreshRate
101      *     The refresh rate, frames per second, to request on the virtual display.
102      *     This is just a request, the actual rate may be adjusted to align well
103      *     with physical displays running concurrently. If 0 is specified, the
104      *     virtual display is refreshed at the physical display refresh rate.
105      *
106      * requires ACCESS_SURFACE_FLINGER permission.
107      */
createVirtualDisplay(@tf8InCpp String displayName, boolean isSecure, @utf8InCpp String uniqueId, float requestedRefreshRate)108     @nullable IBinder createVirtualDisplay(@utf8InCpp String displayName, boolean isSecure,
109             @utf8InCpp String uniqueId, float requestedRefreshRate);
110 
111     /**
112      * Destroy a virtual display.
113      * requires ACCESS_SURFACE_FLINGER permission.
114      */
destroyVirtualDisplay(IBinder displayToken)115     void destroyVirtualDisplay(IBinder displayToken);
116 
117     /**
118      * Get stable IDs for connected physical displays.
119      */
getPhysicalDisplayIds()120     long[] getPhysicalDisplayIds();
121 
122     /**
123      * Get token for a physical display given its stable ID obtained via getPhysicalDisplayIds or
124      * a DisplayEventReceiver hotplug event.
125      */
getPhysicalDisplayToken(long displayId)126     @nullable IBinder getPhysicalDisplayToken(long displayId);
127 
128     /**
129      * Returns the frame timestamps supported by SurfaceFlinger.
130      */
getSupportedFrameTimestamps()131     FrameEvent[] getSupportedFrameTimestamps();
132 
133     /**
134      * Set display power mode. depending on the mode, it can either trigger
135      * screen on, off or low power mode and wait for it to complete.
136      * requires ACCESS_SURFACE_FLINGER permission.
137      */
setPowerMode(IBinder display, int mode)138     void setPowerMode(IBinder display, int mode);
139 
140     /**
141      * Returns display statistics for a given display
142      * intended to be used by the media framework to properly schedule
143      * video frames */
getDisplayStats(@ullable IBinder display)144     DisplayStatInfo getDisplayStats(@nullable IBinder display);
145 
146     /**
147      * Get transactional state of given display.
148      */
getDisplayState(IBinder display)149     DisplayState getDisplayState(IBinder display);
150 
151     /**
152      * Gets immutable information about given physical display.
153      */
getStaticDisplayInfo(long displayId)154     StaticDisplayInfo getStaticDisplayInfo(long displayId);
155 
156     /**
157      * Gets dynamic information about given physical display.
158      */
getDynamicDisplayInfoFromId(long displayId)159     DynamicDisplayInfo getDynamicDisplayInfoFromId(long displayId);
160 
getDynamicDisplayInfoFromToken(IBinder display)161     DynamicDisplayInfo getDynamicDisplayInfoFromToken(IBinder display);
162 
getDisplayNativePrimaries(IBinder display)163     DisplayPrimaries getDisplayNativePrimaries(IBinder display);
164 
setActiveColorMode(IBinder display, int colorMode)165     void setActiveColorMode(IBinder display, int colorMode);
166 
167     /**
168      * Sets the user-preferred display mode that a device should boot in.
169      */
setBootDisplayMode(IBinder display, int displayModeId)170     void setBootDisplayMode(IBinder display, int displayModeId);
171 
172     /**
173      * Clears the user-preferred display mode. The device should now boot in system preferred
174      * display mode.
175      */
clearBootDisplayMode(IBinder display)176     void clearBootDisplayMode(IBinder display);
177 
178     /**
179      * Gets whether boot time display mode operations are supported on the device.
180      *
181      * outSupport
182      *      An output parameter for whether boot time display mode operations are supported.
183      *
184      * Returns NO_ERROR upon success. Otherwise,
185      *      NAME_NOT_FOUND if the display is invalid, or
186      *      BAD_VALUE      if the output parameter is invalid.
187      */
188     // TODO(b/213909104) : Add unit tests to verify surface flinger boot time APIs
getBootDisplayModeSupport()189     boolean getBootDisplayModeSupport();
190 
191     /**
192      * Gets the HDR conversion capabilities of the device. The conversion capability defines whether
193      * conversion from sourceType to outputType is possible (with or without latency).
194      *
195      * Requires the ACCESS_SURFACE_FLINGER permission.
196      */
getHdrConversionCapabilities()197      List<HdrConversionCapability> getHdrConversionCapabilities();
198 
199      /**
200       * Sets the HDR conversion strategy of the device.
201       * Returns the preferred HDR output type of the device, in case when HdrConversionStrategy has
202       * autoAllowedHdrTypes set. Returns Hdr::INVALID in other cases.
203       *
204       * Requires the ACCESS_SURFACE_FLINGER permission.
205       */
setHdrConversionStrategy(in HdrConversionStrategy hdrConversionStrategy)206      int setHdrConversionStrategy(in HdrConversionStrategy hdrConversionStrategy);
207 
208      /**
209       * Gets whether HDR output conversion operations are supported on the device.
210       */
getHdrOutputConversionSupport()211      boolean getHdrOutputConversionSupport();
212 
213     /**
214      * Switches Auto Low Latency Mode on/off on the connected display, if it is
215      * available. This should only be called if the display supports Auto Low
216      * Latency Mode as reported in #getDynamicDisplayInfo.
217      * For more information, see the HDMI 2.1 specification.
218      */
setAutoLowLatencyMode(IBinder display, boolean on)219     void setAutoLowLatencyMode(IBinder display, boolean on);
220 
221     /**
222      * This will start sending infoframes to the connected display with
223      * ContentType=Game (if on=true). This should only be called if the display
224      * Game Content Type as reported in #getDynamicDisplayInfo.
225      * For more information, see the HDMI 1.4 specification.
226      */
setGameContentType(IBinder display, boolean on)227     void setGameContentType(IBinder display, boolean on);
228 
229     /**
230      * Capture the specified screen. This requires READ_FRAME_BUFFER
231      * permission.  This function will fail if there is a secure window on
232      * screen and DisplayCaptureArgs.captureSecureLayers is false.
233      *
234      * This function can capture a subregion (the source crop) of the screen.
235      * The subregion can be optionally rotated.  It will also be scaled to
236      * match the size of the output buffer.
237      */
captureDisplay(in DisplayCaptureArgs args, IScreenCaptureListener listener)238     oneway void captureDisplay(in DisplayCaptureArgs args, IScreenCaptureListener listener);
239 
240     /**
241      * Capture the specified screen. This requires the READ_FRAME_BUFFER
242      * permission.
243      */
captureDisplayById(long displayId, in CaptureArgs args, IScreenCaptureListener listener)244     oneway void captureDisplayById(long displayId, in CaptureArgs args,
245             IScreenCaptureListener listener);
246 
247     /**
248      * Capture a subtree of the layer hierarchy, potentially ignoring the root node.
249      * This requires READ_FRAME_BUFFER permission. This function will fail if there
250      * is a secure window on screen. This is a blocking call and will return the
251      * ScreenCaptureResults, including the captured buffer. Because this is blocking, the
252      * caller doesn't care about the fence and the binder thread in SurfaceFlinger will wait
253      * on the fence to fire before returning the results.
254      */
captureLayersSync(in LayerCaptureArgs args)255     ScreenCaptureResults captureLayersSync(in LayerCaptureArgs args);
256 
257     /**
258      * Capture a subtree of the layer hierarchy, potentially ignoring the root node.
259      * This requires READ_FRAME_BUFFER permission. This function will fail if there
260      * is a secure window on screen
261      */
captureLayers(in LayerCaptureArgs args, IScreenCaptureListener listener)262     oneway void captureLayers(in LayerCaptureArgs args, IScreenCaptureListener listener);
263 
264     /**
265      * Clears the frame statistics for animations.
266      *
267      * Requires the ACCESS_SURFACE_FLINGER permission.
268      */
clearAnimationFrameStats()269     void clearAnimationFrameStats();
270 
271     /**
272      * Gets the frame statistics for animations.
273      *
274      * Requires the ACCESS_SURFACE_FLINGER permission.
275      */
getAnimationFrameStats()276     FrameStats getAnimationFrameStats();
277 
278     /**
279      * Overrides the supported HDR modes for the given display device.
280      *
281      * Requires the ACCESS_SURFACE_FLINGER permission.
282      */
overrideHdrTypes(IBinder display, in int[] hdrTypes)283     void overrideHdrTypes(IBinder display, in int[] hdrTypes);
284 
285     /**
286      * Pulls surfaceflinger atoms global stats and layer stats to pipe to statsd.
287      *
288      * Requires the calling uid be from system server.
289      */
onPullAtom(int atomId)290     PullAtomData onPullAtom(int atomId);
291 
292     /**
293      * Gets the composition preference of the default data space and default pixel format,
294      * as well as the wide color gamut data space and wide color gamut pixel format.
295      * If the wide color gamut data space is V0_SRGB, then it implies that the platform
296      * has no wide color gamut support.
297      *
298      */
getCompositionPreference()299     CompositionPreference getCompositionPreference();
300 
301     /**
302      * Requires the ACCESS_SURFACE_FLINGER permission.
303      */
getDisplayedContentSamplingAttributes(IBinder display)304     ContentSamplingAttributes getDisplayedContentSamplingAttributes(IBinder display);
305 
306     /**
307      * Turns on the color sampling engine on the display.
308      *
309      * Requires the ACCESS_SURFACE_FLINGER permission.
310      */
setDisplayContentSamplingEnabled(IBinder display, boolean enable, byte componentMask, long maxFrames)311     void setDisplayContentSamplingEnabled(IBinder display, boolean enable, byte componentMask, long maxFrames);
312 
313     /**
314      * Returns statistics on the color profile of the last frame displayed for a given display
315      *
316      * Requires the ACCESS_SURFACE_FLINGER permission.
317      */
getDisplayedContentSample(IBinder display, long maxFrames, long timestamp)318     DisplayedFrameStats getDisplayedContentSample(IBinder display, long maxFrames, long timestamp);
319 
320     /**
321      * Gets whether SurfaceFlinger can support protected content in GPU composition.
322      */
getProtectedContentSupport()323     boolean getProtectedContentSupport();
324 
325     /**
326      * Queries whether the given display is a wide color display.
327      * Requires the ACCESS_SURFACE_FLINGER permission.
328      */
isWideColorDisplay(IBinder token)329     boolean isWideColorDisplay(IBinder token);
330 
331     /**
332      * Registers a listener to stream median luma updates from SurfaceFlinger.
333      *
334      * The sampling area is bounded by both samplingArea and the given stopLayerHandle
335      * (i.e., only layers behind the stop layer will be captured and sampled).
336      *
337      * Multiple listeners may be provided so long as they have independent listeners.
338      * If multiple listeners are provided, the effective sampling region for each listener will
339      * be bounded by whichever stop layer has a lower Z value.
340      *
341      * Requires the same permissions as captureLayers and captureScreen.
342      */
addRegionSamplingListener(in ARect samplingArea, @nullable IBinder stopLayerHandle, IRegionSamplingListener listener)343     void addRegionSamplingListener(in ARect samplingArea, @nullable IBinder stopLayerHandle, IRegionSamplingListener listener);
344 
345     /**
346      * Removes a listener that was streaming median luma updates from SurfaceFlinger.
347      */
removeRegionSamplingListener(IRegionSamplingListener listener)348     void removeRegionSamplingListener(IRegionSamplingListener listener);
349 
350     /**
351      * Registers a listener that streams fps updates from SurfaceFlinger.
352      *
353      * The listener will stream fps updates for the layer tree rooted at the layer denoted by the
354      * task ID, i.e., the layer must have the task ID as part of its layer metadata with key
355      * METADATA_TASK_ID. If there is no such layer, then no fps is expected to be reported.
356      *
357      * Multiple listeners may be supported.
358      *
359      * Requires the READ_FRAME_BUFFER permission.
360      */
addFpsListener(int taskId, IFpsListener listener)361     void addFpsListener(int taskId, IFpsListener listener);
362 
363     /**
364      * Removes a listener that was streaming fps updates from SurfaceFlinger.
365      */
removeFpsListener(IFpsListener listener)366     void removeFpsListener(IFpsListener listener);
367 
368     /**
369      * Registers a listener to receive tunnel mode enabled updates from SurfaceFlinger.
370      *
371      * Requires ACCESS_SURFACE_FLINGER permission.
372      */
addTunnelModeEnabledListener(ITunnelModeEnabledListener listener)373     void addTunnelModeEnabledListener(ITunnelModeEnabledListener listener);
374 
375     /**
376      * Removes a listener that was receiving tunnel mode enabled updates from SurfaceFlinger.
377      *
378      * Requires ACCESS_SURFACE_FLINGER permission.
379      */
removeTunnelModeEnabledListener(ITunnelModeEnabledListener listener)380     void removeTunnelModeEnabledListener(ITunnelModeEnabledListener listener);
381 
382     /**
383      * Sets the refresh rate boundaries for the display.
384      *
385      * @see DisplayModeSpecs.aidl for details.
386      */
setDesiredDisplayModeSpecs(IBinder displayToken, in DisplayModeSpecs specs)387     void setDesiredDisplayModeSpecs(IBinder displayToken, in DisplayModeSpecs specs);
388 
getDesiredDisplayModeSpecs(IBinder displayToken)389     DisplayModeSpecs getDesiredDisplayModeSpecs(IBinder displayToken);
390 
391     /**
392      * Gets whether brightness operations are supported on a display.
393      *
394      * displayToken
395      *      The token of the display.
396      * outSupport
397      *      An output parameter for whether brightness operations are supported.
398      *
399      * Returns NO_ERROR upon success. Otherwise,
400      *      NAME_NOT_FOUND if the display is invalid, or
401      *      BAD_VALUE      if the output parameter is invalid.
402      */
getDisplayBrightnessSupport(IBinder displayToken)403     boolean getDisplayBrightnessSupport(IBinder displayToken);
404 
405     /**
406      * Sets the brightness of a display.
407      *
408      * displayToken
409      *      The token of the display whose brightness is set.
410      * brightness
411      *      The DisplayBrightness info to set on the desired display.
412      *
413      * Returns NO_ERROR upon success. Otherwise,
414      *      NAME_NOT_FOUND    if the display is invalid, or
415      *      BAD_VALUE         if the brightness is invalid, or
416      *      INVALID_OPERATION if brightness operations are not supported.
417      */
setDisplayBrightness(IBinder displayToken, in DisplayBrightness brightness)418     void setDisplayBrightness(IBinder displayToken, in DisplayBrightness brightness);
419 
420     /**
421      * Adds a listener that receives HDR layer information. This is used in combination
422      * with setDisplayBrightness to adjust the display brightness depending on factors such
423      * as whether or not HDR is in use.
424      *
425      * Returns NO_ERROR upon success or NAME_NOT_FOUND if the display is invalid.
426      */
addHdrLayerInfoListener(IBinder displayToken, IHdrLayerInfoListener listener)427     void addHdrLayerInfoListener(IBinder displayToken, IHdrLayerInfoListener listener);
428 
429     /**
430      * Removes a listener that was added with addHdrLayerInfoListener.
431      *
432      * Returns NO_ERROR upon success, NAME_NOT_FOUND if the display is invalid, and BAD_VALUE if
433      *     the listener wasn't registered.
434      *
435      */
removeHdrLayerInfoListener(IBinder displayToken, IHdrLayerInfoListener listener)436     void removeHdrLayerInfoListener(IBinder displayToken, IHdrLayerInfoListener listener);
437 
438     /**
439      * Sends a power boost to the composer. This function is asynchronous.
440      *
441      * boostId
442      *      boost id according to android::hardware::power::Boost
443      *
444      * Returns NO_ERROR upon success.
445      */
notifyPowerBoost(int boostId)446     oneway void notifyPowerBoost(int boostId);
447 
448     /*
449      * Sets the global configuration for all the shadows drawn by SurfaceFlinger. Shadow follows
450      * material design guidelines.
451      *
452      * ambientColor
453      *      Color to the ambient shadow. The alpha is premultiplied.
454      *
455      * spotColor
456      *      Color to the spot shadow. The alpha is premultiplied. The position of the spot shadow
457      *      depends on the light position.
458      *
459      * lightPosY/lightPosZ
460      *      Position of the light used to cast the spot shadow. The X value is always the display
461      *      width / 2.
462      *
463      * lightRadius
464      *      Radius of the light casting the shadow.
465      */
setGlobalShadowSettings(in Color ambientColor, in Color spotColor, float lightPosY, float lightPosZ, float lightRadius)466     oneway void setGlobalShadowSettings(in Color ambientColor, in Color spotColor, float lightPosY, float lightPosZ, float lightRadius);
467 
468     /**
469      * Gets whether a display supports DISPLAY_DECORATION layers.
470      *
471      * displayToken
472      *      The token of the display.
473      * outSupport
474      *      An output parameter for whether/how the display supports
475      *      DISPLAY_DECORATION layers.
476      *
477      * Returns NO_ERROR upon success. Otherwise,
478      *      NAME_NOT_FOUND if the display is invalid, or
479      *      BAD_VALUE      if the output parameter is invalid.
480      */
getDisplayDecorationSupport(IBinder displayToken)481     @nullable DisplayDecorationSupport getDisplayDecorationSupport(IBinder displayToken);
482 
483     /**
484      * Set the override frame rate for a specified uid by GameManagerService.
485      * This override is controlled by game mode interventions.
486      * Passing the frame rate and uid to SurfaceFlinger to update the override mapping
487      * in the LayerHistory.
488      */
setGameModeFrameRateOverride(int uid, float frameRate)489     void setGameModeFrameRateOverride(int uid, float frameRate);
490 
491     /**
492      * Set the override frame rate for a specified uid by GameManagerService.
493      * This override is controlled by game default frame rate sysprop:
494      * "ro.surface_flinger.game_default_frame_rate_override" holding the override value,
495      * "persisit.graphics.game_default_frame_rate.enabled" to determine if it's enabled.
496      * Passing the frame rate and uid to SurfaceFlinger to update the override mapping
497      * in the scheduler.
498      */
setGameDefaultFrameRateOverride(int uid, float frameRate)499     void setGameDefaultFrameRateOverride(int uid, float frameRate);
500 
updateSmallAreaDetection(in int[] appIds, in float[] thresholds)501     oneway void updateSmallAreaDetection(in int[] appIds, in float[] thresholds);
502 
503     /**
504      * Set the small area detection threshold for a specified appId by SmallAreaDetectionController.
505      * Passing the threshold and appId to SurfaceFlinger to update the appId-threshold mapping
506      * in the scheduler.
507      */
setSmallAreaDetectionThreshold(int appId, float threshold)508     oneway void setSmallAreaDetectionThreshold(int appId, float threshold);
509 
510     /**
511      * Enables or disables the frame rate overlay in the top left corner.
512      * Requires root or android.permission.HARDWARE_TEST
513      */
enableRefreshRateOverlay(boolean active)514     void enableRefreshRateOverlay(boolean active);
515 
516     /**
517      * Enables or disables the debug flash.
518      * Requires root or android.permission.HARDWARE_TEST
519      */
setDebugFlash(int delay)520     void setDebugFlash(int delay);
521 
522     /**
523      * Force composite ahead of next VSYNC.
524      * Requires root or android.permission.HARDWARE_TEST
525      */
scheduleComposite()526     void scheduleComposite();
527 
528     /**
529      * Force commit ahead of next VSYNC.
530      * Requires root or android.permission.HARDWARE_TEST
531      */
scheduleCommit()532     void scheduleCommit();
533 
534     /**
535      * Force all window composition to the GPU (i.e. disable Hardware Overlays).
536      * This can help check if there is a bug in HW Composer.
537      * Requires root or android.permission.HARDWARE_TEST
538      */
forceClientComposition(boolean enabled)539     void forceClientComposition(boolean enabled);
540 
541     /**
542      * Gets priority of the RenderEngine in SurfaceFlinger.
543      */
getGpuContextPriority()544     int getGpuContextPriority();
545 
546     /**
547      * Gets the number of buffers SurfaceFlinger would need acquire. This number
548      * would be propagated to the client via MIN_UNDEQUEUED_BUFFERS so that the
549      * client could allocate enough buffers to match SF expectations of the
550      * pipeline depth. SurfaceFlinger will make sure that it will give the app at
551      * least the time configured as the 'appDuration' before trying to latch
552      * the buffer.
553      *
554      * The total buffers needed for a given configuration is basically the
555      * numbers of vsyncs a single buffer is used across the stack. For the default
556      * configuration a buffer is held ~1 vsync by the app, ~1 vsync by SurfaceFlinger
557      * and 1 vsync by the display. The extra buffers are calculated as the
558      * number of additional buffers on top of the 2 buffers already present
559      * in MIN_UNDEQUEUED_BUFFERS.
560      */
getMaxAcquiredBufferCount()561     int getMaxAcquiredBufferCount();
562 
addWindowInfosListener(IWindowInfosListener windowInfosListener)563     WindowInfosListenerInfo addWindowInfosListener(IWindowInfosListener windowInfosListener);
564 
removeWindowInfosListener(IWindowInfosListener windowInfosListener)565     void removeWindowInfosListener(IWindowInfosListener windowInfosListener);
566 
getOverlaySupport()567     OverlayProperties getOverlaySupport();
568 
569     /**
570      * Returns an instance of StalledTransaction if a transaction from the passed pid has not been
571      * applied in SurfaceFlinger due to an unsignaled fence. Otherwise, null is returned.
572      */
getStalledTransactionInfo(int pid)573     @nullable StalledTransactionInfo getStalledTransactionInfo(int pid);
574 
getSchedulingPolicy()575     SchedulingPolicy getSchedulingPolicy();
576 
577     /**
578      * Notifies the SurfaceFlinger that the ShutdownThread is running. When it is called,
579      * transaction traces will be captured and writted into a file.
580      * This method should not block the ShutdownThread therefore it's handled asynchronously.
581      */
notifyShutdown()582     oneway void notifyShutdown();
583 }
584