fix ActivityThread.getTopLevelResources NullPointerException

MIUI-17680

Change-Id: Ic5796181cb5002eca65a7c9bd4e15df6a85d02bf
Signed-off-by: mochangming <mochangming@xiaomi.com>