mirror of
https://github.com/androidx/media.git
synced 2025-05-09 16:40:55 +08:00
Merge pull request #4996 from YukiMatsumura/fix-idle-requirements
fix checkIdleRequirement
This commit is contained in:
parent
bb09f5cb12
commit
e4989d1743
@ -187,7 +187,7 @@ public final class Requirements {
|
||||
}
|
||||
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
return Util.SDK_INT >= 23
|
||||
? !powerManager.isDeviceIdleMode()
|
||||
? powerManager.isDeviceIdleMode()
|
||||
: Util.SDK_INT >= 20 ? !powerManager.isInteractive() : !powerManager.isScreenOn();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user