Update the uid correctly.

use the pending intent to find out the uid rather than
from binder which is calling the api. If other alarms
get updated internally due to this call from the app, other
alarms will have invalid uid.

Update the worksource correctly with the next alarm that
will be processed, The blocked UID alarm processing will be delayed,
if we set that as the worksource that will not be correct.

During Alarm delivery also do a check if wake lock needs to be released.
As the UID might have been blocked already.

Change-Id: I954f09b87d73387e1a7afd862638d8a0e2a88a53
1 file changed