Fix getPackagesBypassingDnd() for multiple profiles
Despite what its name indicates, PackagePreferences.userId is almost always empty (0). This meant that getPackagesBypassingDnd() would treat all packages as belonging to USER_SYSTEM when looking app which apps have priority channels! In the Settings UI, this manifested as the personal-profile entry of the app appearing when the work-profile entry is the one that has priority channels (and the app not appearing at all if it's not installed in the personal profile). Fixed the check and renamed the field, since this is a gigantic footgun. Fixes: 384714165 Test: atest PreferencesHelperTest + manual Flag: android.app.modes_ui (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ac0267dba7591b5b1ef8519a2f04126cb7e5b013) Merged-In: I01c0b4efd435a1fada1bd9845044600c01c0baf6 Change-Id: I01c0b4efd435a1fada1bd9845044600c01c0baf6
Loading
Please register or sign in to comment