Initialize mAllowWhileInUsePermissionInFgsReason.

Initialize mAllowWhileInUsePermissionInFgsReason to REASON_DENIED to be
consistent with the other while-in-use variables and reduce potential
for incorrect behavior.

Bug: 277635240
Test: atest CtsJobSchedulerTestCases:UserInitiatedJobTest
Change-Id: Ibb2fc7a08290c8064e72a68c5ce33ae14e6ff2c2
This commit is contained in:
Kweku Adams
2023-05-15 21:52:13 +00:00
parent 11cd46966d
commit 95a1c50a19

View File

@@ -175,7 +175,7 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
// while-in-use permissions in FGS started from background might be restricted.
boolean mAllowWhileInUsePermissionInFgs;
@PowerExemptionManager.ReasonCode
int mAllowWhileInUsePermissionInFgsReason;
int mAllowWhileInUsePermissionInFgsReason = REASON_DENIED;
// Integer version of mAllowWhileInUsePermissionInFgs that we keep track to compare
// the old and new logics.