From ea43959d8b718f715872a457d6e90130f7a2d72f Mon Sep 17 00:00:00 2001 From: FanWu Date: Mon, 20 Nov 2023 15:48:02 +0800 Subject: [PATCH] Fix InstalledAppCounterTest The root cause is introduced in ag/25089088 which updated the UserManager source Bug: 293405483 Test: atest Change-Id: I380e70c8a774e972153a27ca096cd3b7f8236304 --- .../android/settings/applications/InstalledAppCounterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/robotests/src/com/android/settings/applications/InstalledAppCounterTest.java b/tests/robotests/src/com/android/settings/applications/InstalledAppCounterTest.java index 78cfd366e6b..85d1b78073e 100644 --- a/tests/robotests/src/com/android/settings/applications/InstalledAppCounterTest.java +++ b/tests/robotests/src/com/android/settings/applications/InstalledAppCounterTest.java @@ -98,7 +98,7 @@ public final class InstalledAppCounterTest { @Before public void setUp() { MockitoAnnotations.initMocks(this); - when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager); + when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager); mFakeFeatureFlags = new FakeFeatureFlagsImpl(); mFakeFeatureFlags.setFlag(Flags.FLAG_ARCHIVING, true);