refactor base code to support one frameworks/miui dev branch

N/A

Change-Id: I9a4db32b2b50bec41bbf636947618730813a17e2
Ref-Id: I5bdcbab5a64f0912a5b5c82b234466270041c4a3
Revert "Remove post-install processing of auto-start state."

This reverts commit e2396bb42390b7716bebf32ae932f7fdbf6e1ee8.
add preferred app Settings

N/A

Change-Id: I75a95a013a93cd7b301d66504a5937d2aeb09562
Ref-Id: I595d395762f34906d952cf7cefcdc006830e4ac3