public void SetEnabled(bool enabled)
{
if (!HasChangedState(
previousState: IsEnabled(),
newState: enabled,
trueMessage: "Adjust already enabled",
falseMessage: "Adjust already disabled"))
{
return;
}
Enabled = enabled;
if (ActivityState != null)
{
ActivityState.Enabled = enabled;
WriteActivityState();
}
UpdateStatusCondition(
pausingState: !enabled,
pausingMessage: "Pausing package and attribution handler to disable the SDK",
remainsPausedMessage: "Package and attribution handler remain paused due to the SDK is offline",
unPausingMessage: "Resuming package and attribution handler to enabled the SDK");
}