diff options
author | David Su <dysu@google.com> | 2020-07-08 16:33:27 -0700 |
---|---|---|
committer | David Su <dysu@google.com> | 2020-07-10 22:56:13 +0000 |
commit | 000ad45722c73f345de77ff43973b2ed811b90e1 (patch) | |
tree | 621e976e278c1d50b0b36187146c0ddeb51a4942 /tests | |
parent | 2022b51e1bf7fb88a409998b2bd31eaabe227e03 (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |