Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95a1c50a authored by Kweku Adams's avatar Kweku Adams
Browse files

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
parent 11cd4696
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.