Initial port from MIUI

Change-Id: Ifd4c4435facee9f375fce5441b2a8d70c984188a