commit | ff195e8a8ae06ee4e7a850ab791e0905fef4b642 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Wed Jul 27 16:50:11 2022 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed Jul 27 16:50:11 2022 +0000 |
tree | ab2c6d8292a9ed3c8bcc3ea5d7197469c06d9318 | |
parent | 5d0c2f417f1a647c4b220280abc1efd6a788f973 [diff] | |
parent | 864e6a796304ced9f21d84b938299aaaff1ae62f [diff] |
Merge "Create default implementation for getSyncTarget"
diff --git a/core/java/android/view/AttachedSurfaceControl.java b/core/java/android/view/AttachedSurfaceControl.java index 5dae313..c692981 100644 --- a/core/java/android/view/AttachedSurfaceControl.java +++ b/core/java/android/view/AttachedSurfaceControl.java
@@ -145,5 +145,8 @@ * * @hide */ - SurfaceSyncGroup.SyncTarget getSyncTarget(); + @Nullable + default SurfaceSyncGroup.SyncTarget getSyncTarget() { + return null; + } }
diff --git a/core/java/android/window/SurfaceSyncGroup.java b/core/java/android/window/SurfaceSyncGroup.java index 5672697..4248096 100644 --- a/core/java/android/window/SurfaceSyncGroup.java +++ b/core/java/android/window/SurfaceSyncGroup.java
@@ -186,7 +186,11 @@ if (viewRoot == null) { return false; } - return addToSync(viewRoot.getSyncTarget()); + SyncTarget syncTarget = viewRoot.getSyncTarget(); + if (syncTarget == null) { + return false; + } + return addToSync(syncTarget); } /**