add MainLoop
am: 3b1d20a572

Change-Id: Ide14f0a10b7de0dcaacc044025e790e0c95c9c59