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

Skip to content
Commit c474bfd0 authored by Artem Iglikov's avatar Artem Iglikov
Browse files

Fix PowerManagerService handling of work chains.

When a wakelock with specific set of flags is requested
PowerManagerService crashes with NPE because
applyWakeLockFlagsOnAcquireLocked does not handle work chains and
requires UID set directly on the work source instead of the work chain.

This fixes the behavior by handling the work chains as well as
introducing additional emptiness checks.

There may be multiple work chains in a work source, and only the first
one is used. I don't know the details of this method, but it looks like
it's a reasonable decision.

Bug: 113868145
Test: atest FrameworksCoreTests:PowerManagerTest

Change-Id: Idbfa1d0cd32ddc021caf6443138688d3f8b7c946
parent a5f160fd
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