Account for different charging policies.

Consider the device charging when special charging policies are active
that may not increase the battery level, but will keep the device in a
stable charging state.

This is intended to be a short-term change until the final logic can be
moved into BatteryService or another more appropriate location.

Bug: 304512874
Test: atest CtsJobSchedulerTestCases
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job
Test: atest FrameworksMockingServicesTests:JobSchedulerServiceTest
Change-Id: Id8ba3ffb9112e662be4deadd8f823db5cc32b440
7 files changed