refactor base code to support one frameworks/miui dev branch

N/A

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

This reverts commit 5df18ec568e784b57f5dcfd9994e4e96da2228f4.
add preferred app Settings

N/A

Change-Id: I9bfb75d0802e8a9dac2950bdc9eb8368d3f77c08
Ref-Id: I595d395762f34906d952cf7cefcdc006830e4ac3