I don't see the need, in this patch, to extract the `activity` variable to the module scope. Why are you doing this, please?