Merge "Fix adaptive_sleep resetting after reboot" into rvc-dev am: f9551ba4e1 am: ca31f89c74
Change-Id: I414bfe546684062013384402ac1a336f92c22259
This commit is contained in:
@@ -165,7 +165,7 @@ public class AttentionManagerService extends SystemService {
|
|||||||
* Returns {@code true} if attention service is supported on this device.
|
* Returns {@code true} if attention service is supported on this device.
|
||||||
*/
|
*/
|
||||||
private boolean isAttentionServiceSupported() {
|
private boolean isAttentionServiceSupported() {
|
||||||
return isServiceEnabled() && isServiceAvailable();
|
return isServiceEnabled() && isServiceConfigured(mContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
@@ -210,6 +210,11 @@ public class AttentionManagerService extends SystemService {
|
|||||||
return false;
|
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
|
// don't allow attention check in screen off state
|
||||||
if (!mPowerManager.isInteractive()) {
|
if (!mPowerManager.isInteractive()) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user