Only user whitelist gets allow_while_idle_unrestricted

Due to earlier refactorings, now allow-in-power-save-except-idle apps
are getting the flag ALLOW_WHILE_IDLE_UNRESTRICTED, which should not
happen. Restricting to user whitelisted app ids as was the case in O.

Test: atest com.android.server.AppStateTrackerTest
atest android.alarmmanager.cts.AppStandbyTests
Also, manually,
adb shell cmd deviceidle whitelist +<package-name>
Then verify the app id appears in App state tracker dump in
adb shell dumpsys alarm

Bug: 74773710
Change-Id: I6fdce33446e1374c6672ce98769aa8b5844effa9
5 files changed