Skip to content
Commit c5629d1e authored by Yuri Lin's avatar Yuri Lin
Browse files

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
parent 4e942f08
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment