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

Skip to content
Commit 8d5d9742 authored by Matías Hernández's avatar Matías Hernández Committed by Android Build Coastguard Worker
Browse files

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
parent 6b22d1c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment