Do not clean profiles unconditonally during app data clean up
The goal is to enable profiles to be persisted across OTAs.
This CL makes profile removal a dedicated path which will be called by
PackageManger during an app update or uninstall.
Profiles are cleared when:
- requested to do a full clean up of application data files
- specifically requested to clear them (e.g. app updates)
Profiles are destroyed (includes profile directory removal)
- for each user individually when its application data is destroyed
- for all users if the package gets uninstalled.
Bug: 27081617
Bug: 27688727
Change-Id: Id53c7625011af3cdbe8a58ac0982982fa461e5fd
3 files changed