From 0651a247389b5708a30338654e0cf9583f3c2d5c Mon Sep 17 00:00:00 2001 From: Winson Date: Thu, 23 Apr 2020 09:00:10 -0700 Subject: [PATCH] Mock sourceDir for ActivityThreadClientTest This just has to be non-null for the purposes of path generation. The result is thrown away as the mocked LoadedApk doesn't actually support updating its info, so this should have no effect on the test logic. Bug: 154807103 Test: atest android.app.activity.ActivityThreadClientTest Change-Id: Id097a0f3be3c8822e679093347c9a0320fdba13e --- .../src/android/app/activity/ActivityThreadClientTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/tests/mockingcoretests/src/android/app/activity/ActivityThreadClientTest.java b/core/tests/mockingcoretests/src/android/app/activity/ActivityThreadClientTest.java index 9018320e479c5..0390ac6b8e9cb 100644 --- a/core/tests/mockingcoretests/src/android/app/activity/ActivityThreadClientTest.java +++ b/core/tests/mockingcoretests/src/android/app/activity/ActivityThreadClientTest.java @@ -210,6 +210,7 @@ public class ActivityThreadClientTest { info.applicationInfo = new ApplicationInfo(); info.applicationInfo.packageName = info.packageName; info.applicationInfo.uid = UserHandle.myUserId(); + info.applicationInfo.sourceDir = "/test/sourceDir"; // mock the function for preventing NPE in emulator environment. The purpose of the // test is for activity client state changes, we don't focus on the updating for the