set Current Activity

Sets the current Activity by holding a weak reference to it. This method is called to update the reference when the current Activity changes.

Parameters

activity

: the Activity to be set as the current activity.

Throws

if the provided activity is null.