From 000ad45722c73f345de77ff43973b2ed811b90e1 Mon Sep 17 00:00:00 2001 From: David Su Date: Wed, 8 Jul 2020 16:33:27 -0700 Subject: Fix EapFailureNotifier failing to resolve resource name dynamically Resources#getIdentifier uses the Java package name rather than the Android APK's package name i.e. the package name generated for R.java at compile time. Bug: 160569695 Test: manually verified notification is displayed Test: atest FrameworksWifiTests Change-Id: I4c9a17c86e23956478a927021fb1b7ade3b86379 --- .../wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java b/tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java index f2ec351ae..d2a3ac0dc 100644 --- a/tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java +++ b/tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java @@ -89,7 +89,8 @@ public class EapFailureNotifierTest extends WifiBaseTest { when(mResources.getString(eq(0), anyString())).thenReturn(null); when(mResources.getString(eq(1), anyString())).thenReturn("Error Message"); when(mContext.createPackageContext(anyString(), eq(0))).thenReturn(mContext); - when(mContext.getWifiOverlayApkPkgName()).thenReturn("test.com.android.wifi.resources"); + when(mContext.getWifiOverlayApkPkgName()).thenReturn("test.com.oem.android.wifi.resources"); + when(mContext.getWifiOverlayJavaPkgName()).thenReturn("test.com.android.wifi.resources"); mEapFailureNotifier = new EapFailureNotifier(mContext, mFrameworkFacade, mWifiCarrierInfoManager); } -- cgit v1.2.3