Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2aa6d33b authored by Yuichiro Hanada's avatar Yuichiro Hanada Committed by Android (Google) Code Review
Browse files

Merge "Revert "Fix NameNotFound exception in loadAppResources"" into main

parents 6f73deb1 78b25da0
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -166,11 +166,7 @@ class WindowDecorTaskResourceLoader(
    private fun loadAppResources(taskInfo: RunningTaskInfo): AppResources {
        Trace.beginSection("$TAG#loadAppResources")
        try {
            val pm =
                userProfilesContexts
                .getOrCreate(taskInfo.userId)
                .createPackageContext(taskInfo.component().packageName, /* flags= */ 0)
                .packageManager
            val pm = userProfilesContexts.getOrCreate(taskInfo.userId).packageManager
            val activityInfo = getActivityInfo(taskInfo, pm)
            val appName = pm.getApplicationLabel(activityInfo.applicationInfo)
            val appIconDrawable = iconProvider.getIcon(activityInfo)
+0 −1
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ class WindowDecorTaskResourceLoaderTest : ShellTestCase() {
        spyContext = spy(mContext)
        spyContext.setMockPackageManager(mockPackageManager)
        doReturn(spyContext).whenever(spyContext).createContextAsUser(any(), anyInt())
        doReturn(spyContext).whenever(spyContext).createPackageContext(any(), anyInt())
        doReturn(spyContext).whenever(mMockUserProfileContexts)[anyInt()]
        doReturn(spyContext).whenever(mMockUserProfileContexts).getOrCreate(anyInt())
        loader =