Upgrading From 2.x To 3.0 The setMaxDepth() method has been removed from the Context class. Use the enableMaxDepth() and disableMaxDepth() methods instead. The getMaxDepth() method has been removed from the Context class. Use the isMaxDepthEnabled() method instead.