AI 143740: Don't clear supported profiles in settings app if getRemoteClass returns error.
  Also clean up the error codes returned by the framework, so that the settings app can properly detect an error.
  BUG=1748881

Automated import of CL 143740
3 files changed