activity manager logic

Signed-off-by: diytz <diytz@qq.com>