[automerger skipped] Add canAllowWhileInUsePermissionInFgsLocked() method back. am: 94b62d998d -s ours am: 0a819742a3 -s ours

am skip reason: Merged-In Idc88f274c7a323d175d65bb47eca041772ae9bb7 with SHA-1 6706c1acc0 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15687218

Change-Id: I26f1d8b33aaf8580fd7d36015275e19455744f8d