merge patches to LegacyMod

Change-Id: If0f3c6299f2315bd8aff521c1f731f8b771b50f7