diff options
| author | 2024-12-17 19:44:58 +0100 | |
|---|---|---|
| committer | 2024-12-17 19:51:01 +0100 | |
| commit | ac0267dba7591b5b1ef8519a2f04126cb7e5b013 (patch) | |
| tree | a4405d912146f32f55e509d4ea250f52ef09f3db /libs/androidfw/FileStream.cpp | |
| parent | 6b0271bddde4a3d0b6ecc66c5740e0cb0deef666 (diff) | |
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
Change-Id: I01c0b4efd435a1fada1bd9845044600c01c0baf6
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions