From c86abd9b99ec21db6d575e087b7d24b44859c611 Mon Sep 17 00:00:00 2001 From: Zhen Zhang Date: Wed, 24 Mar 2021 10:56:30 -0700 Subject: [PATCH] Fix HibernationSwitchPreferenceControllerTest Fix the HibernationSwitchPreferenceControllerTest Test: this is the test Bug: 183585589 Change-Id: If97f664596e2724b3435b88ed7f3ea8c3fa4df94 --- .../appinfo/HibernationSwitchPreferenceControllerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/src/com/android/settings/applications/appinfo/HibernationSwitchPreferenceControllerTest.java b/tests/unit/src/com/android/settings/applications/appinfo/HibernationSwitchPreferenceControllerTest.java index e27942a6e69..65ffe4b7657 100644 --- a/tests/unit/src/com/android/settings/applications/appinfo/HibernationSwitchPreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/applications/appinfo/HibernationSwitchPreferenceControllerTest.java @@ -70,9 +70,9 @@ public class HibernationSwitchPreferenceControllerTest { MockitoAnnotations.initMocks(this); mContext = spy(ApplicationProvider.getApplicationContext()); when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); - when(mPackageManager.getPackageUidAsUser(eq(VALID_PACKAGE_NAME), anyInt())) + when(mPackageManager.getPackageUid(eq(VALID_PACKAGE_NAME), anyInt())) .thenReturn(PACKAGE_UID); - when(mPackageManager.getPackageUidAsUser(eq(INVALID_PACKAGE_NAME), anyInt())) + when(mPackageManager.getPackageUid(eq(INVALID_PACKAGE_NAME), anyInt())) .thenThrow(new PackageManager.NameNotFoundException()); when(mPackageManager.getTargetSdkVersion(eq(EXEMPTED_PACKAGE_NAME))) .thenReturn(android.os.Build.VERSION_CODES.Q);