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

Commit 0bd5b4ed authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Fix opt-in handling of new constants

Reverses to logic to consider everything that is not unspecified or
explicitly opted out as explicit opt-in fo account for the new constants.

This prevents unnecessary and confusing logs when developers correctly
use the new constants

Bug: 385802410
Test: atest BackgroundActivityLaunchTest
Flag: EXEMPT log only
Change-Id: I5864751f37321a80d86c9e61ec1d24c409ddfc24
parent 82e4c14d
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -515,7 +515,9 @@ public class BackgroundActivityStartController {
                return !callerExplicitOptOut();
            }
            return mCheckedOptions.getPendingIntentCreatorBackgroundActivityStartMode()
                    == MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
                    != MODE_BACKGROUND_ACTIVITY_START_DENIED
                    && mCheckedOptions.getPendingIntentCreatorBackgroundActivityStartMode()
                    != MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;
        }

        public boolean realCallerExplicitOptInOrAutoOptIn() {
@@ -523,7 +525,9 @@ public class BackgroundActivityStartController {
                return !realCallerExplicitOptOut();
            }
            return mCheckedOptions.getPendingIntentBackgroundActivityStartMode()
                    == MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
                    != MODE_BACKGROUND_ACTIVITY_START_DENIED
                    && mCheckedOptions.getPendingIntentBackgroundActivityStartMode()
                    != MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;
        }

        public boolean callerExplicitOptOut() {