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

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

Revert "Fix NameNotFound exception in loadAppResources"

This reverts commit d8fedb73.

Reason for revert: This CL is not related to the crash actually. It's not needed.

Bug: 404119367
Bug: 409001082
Bug: 409485902
Change-Id: I36ca5814f5d9bff83b41ea101dce028ca30e5b5a
parent d8fedb73
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -167,11 +167,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
@@ -87,7 +87,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 =