Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30161cba authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[sf] fix crash when taking a screenshot" into main

parents f800339f c54fdb0a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -8956,7 +8956,10 @@ SurfaceFlinger::getLayerSnapshotsForScreenshots(uint32_t rootLayerId, uint32_t u
                     .genericLayerMetadataKeyMap = getGenericLayerMetadataKeyMap(),
                     .skipRoundCornersWhenProtected =
                             !getRenderEngine().supportsProtectedContent()};
        args.rootSnapshot.isSecure = mLayerLifecycleManager.isLayerSecure(rootLayerId);
        // The layer may not exist if it was just created and a screenshot was requested immediately
        // after. In this case, the hierarchy will be empty so we will not render any layers.
        args.rootSnapshot.isSecure = mLayerLifecycleManager.getLayerFromId(rootLayerId) &&
                mLayerLifecycleManager.isLayerSecure(rootLayerId);
        mLayerSnapshotBuilder.update(args);

        auto getLayerSnapshotsFn =