Merge "Create default implementation for getSyncTarget"

This commit is contained in:
TreeHugger Robot
2022-07-27 16:50:11 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 2 deletions

View File

@@ -145,5 +145,8 @@ public interface AttachedSurfaceControl {
*
* @hide
*/
SurfaceSyncGroup.SyncTarget getSyncTarget();
@Nullable
default SurfaceSyncGroup.SyncTarget getSyncTarget() {
return null;
}
}

View File

@@ -186,7 +186,11 @@ public final class SurfaceSyncGroup {
if (viewRoot == null) {
return false;
}
return addToSync(viewRoot.getSyncTarget());
SyncTarget syncTarget = viewRoot.getSyncTarget();
if (syncTarget == null) {
return false;
}
return addToSync(syncTarget);
}
/**