Merge "Simplifying some ActivityContext and StateManager methods" into main