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

Skip to content
Commit 690f1204 authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Fix issue with auto-adding work tile

When a work profile is created, it is first created as disabled, and
then enabled when it's verified (all this done by DPM).

ManagedProfileControllerImpl, which is what WorkModeTile uses to verify
that there's a work profile available, only returns true if there's an
Enabled work profile. However, WorkTileAutoAddable was adding the tile
when the profile was created, regardless of the enabled state. This made
it so the tile was immediately destroyed if auto-added.

With this change, we explicitly require in WorkTileAutoAddable that the
profile is enabled, matching what ManagedProfileControllerImpl does and
also the correct behavior. UserTracker will send a profiles changed both
when the profile is added as disabled and when it's enabled, so that is
not a problem.

Test: atest WorkTileAutoAddableTest
Test: manual, create a work profile first as disabled and then enable it
Flag: ACONFIG com.android.systemui.qs_new_pipeline NEXTFOOD
Fixes: 325595352
Change-Id: Ib741135315e7a4787049129ba2918bd68bc7484b
parent 26e89044
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment