Use task's userId to obtain PackageManager instance
This is a follow up to Ia4b2cf80278e49fe1b6d26ea99d4be48110c7232 with a proper fix. Instead of using MATCH_UNINSTALLED_PACKAGES, which worked because the package is technically "uninstalled" for the current user (because it's installed for another user), this change now builds a user context using the userId in TaskInfo, and whose PackageManager can now obtain the ActivityInfo without additional flags. Bug: 354884302 Fix: 355306146 Test: with HSUM enabled, app name and icon can be obtained through PackageManager without crashing Flag: EXEMPT bugfix Change-Id: I54c3a4332dbb330b0c4ff9df0e86ec038716f7ff
Loading
Please register or sign in to comment