Merge "Move a bunch of app restrictions logic to SettingsLib"