Always make copies of objects from mDefaultConfig

ZenRule and ZenPolicy are not immutable, so taking objects from mDefaultConfig and putting them in mConfig runs the risk of inadvertently modifying mDefaultConfig.

Note that, for API calls from apps, it was most likely safe because copies are creating when unparceling (but it's still risky since ZenModeHelper updates ZenRule objects).

Fixes: 368580925
Test: atest ZenModeHelperTest
Flag: EXEMPT trivial bugfix
Change-Id: If694b615ff911a3f393a5b8d6ae74b224cf5bc2a
2 files changed