Fix the robo test case failed

- Fix the test case failed in the
  ControlsTrivialPrivacyPreferenceControllerTest.
- Use the correct paramter in the PackageManager.resolveActivity API.

Fixes: 300378707
Test: atest ControlsTrivialPrivacyPreferenceControllerTest
Change-Id: Id80dfb95ceffb048461b79d2d5ceb67100f83cd5
This commit is contained in:
Sunny Shao
2023-11-13 13:53:28 +08:00
parent 05104fc8ff
commit 94bf9d9bc3

View File

@@ -20,6 +20,7 @@ import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.spy;
@@ -220,7 +221,7 @@ public class ControlsTrivialPrivacyPreferenceControllerTest {
final ResolveInfo resolveInfo = new ResolveInfo();
resolveInfo.activityInfo = activityInfo;
when(mPackageManager.resolveActivity(any(), any())).thenReturn(resolveInfo);
when(mPackageManager.resolveActivity(any(), anyInt())).thenReturn(resolveInfo);
}
}
}