Skip to content
Commit 3b4aa554 authored by Pavel Grafov's avatar Pavel Grafov
Browse files

Make getPersonalAppsSuspensionReasons more robust.

* Make sure that if the time is rolled back after the deadline
  has been reached, it is not undone. When the deadline is
  reached it is set to -1 which is far in the past, so timezone
  change won't affect it.
* Return sensible value in case when the deadline has just
  expired and the suspension itself hasn't been enacted.
  Previously the deadline expiration wouldn't be reflected until
  mAppsSuspended gets updated after all apps are suspended.
* Update deadline on time changes. This makes it react to time
  changes via adb.
* Additional debug logging to investigate further if the issue
  persists.

Bug: 155878352
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I6549f76584121df200ace811285e7a358f262869
parent 83dd0ade
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