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

Commit 678274a9 authored by Alex Salo's avatar Alex Salo Committed by Automerger Merge Worker
Browse files

Merge "Fix adaptive_sleep resetting after reboot" into rvc-dev am: f9551ba4...

Merge "Fix adaptive_sleep resetting after reboot" into rvc-dev am: f9551ba4 am: ca31f89c am: 445ae78b am: fb1e50f9

Change-Id: I9993047c3ea2669e488d3597d25f7736864a4010
parents c14c2915 fb1e50f9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ public class AttentionManagerService extends SystemService {
     * Returns {@code true} if attention service is supported on this device.
     */
    private boolean isAttentionServiceSupported() {
        return isServiceEnabled() && isServiceAvailable();
        return isServiceEnabled() && isServiceConfigured(mContext);
    }

    @VisibleForTesting
@@ -214,6 +214,11 @@ public class AttentionManagerService extends SystemService {
            return false;
        }

        if (!isServiceAvailable()) {
            Slog.w(LOG_TAG, "Service is not available at this moment.");
            return false;
        }

        // don't allow attention check in screen off state
        if (!mPowerManager.isInteractive()) {
            return false;