66287d3551e59109a308584473a12737e9094d39
The changes required are: - Change all usages of when(mCm.method()).thenReturn(...) to doReturn(...).when(mCm).method() because spies must use the latter syntax. - In setDataSaverEnabled, set the mocked return value before sending the broadcast. Otherwise, the first time the method is called, the spy will attempt to send the broadcast, and will crash because it does not have permission to do so. This does not do anything useful yet, but it will be used in future CLs. Bug: 173068192 Test: atest TetheringTests Change-Id: I968bfa76ead25b2d45ed1c0e8ede32df81401579
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%