Remove spy() from ZenModeHelper in ZenModeHelperTest
In addition to spying the object one is testing to be not a great idea, this was messing up some operations (changing the config would be operating on two different objects under the hood). This change removes the spied version of the object in favor of just having a regular ZenModeHelper under test and changes relevant tests to check the operations on the AppOpsManager mock instead. Also changes setupZenConfig() to default to setting zen mode to OFF. It's not technically a correct state for a config to be in ZEN_MODE_IMPORTANT_INTERRUPTIONS without any active zen rules (manual or automatic). Because this method is primarily used in XML tests (where the manual rule isn't expected to be restored anyway), it is more correct to default to starting in the "off" state. Fixes: 278914182 Test: atest ZenModeHelperTest Change-Id: Ib107394134c0babe9ac40befc56245d637e7925a
Loading
Please register or sign in to comment