Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
879ed4bb
Commit
879ed4bb
authored
May 15, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
声网
parent
f57d02bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+13
-0
No files found.
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
879ed4bb
...
...
@@ -425,6 +425,19 @@ class AudioHomeActivity :
PowerManager
.
PROXIMITY_SCREEN_OFF_WAKE_LOCK
,
"yidianling"
)
// 获取电源管理器对象
val
screenOn
=
localPowerManager
!!
.
isScreenOn
if
(!
screenOn
)
{
// 获取PowerManager.WakeLock对象,后面的参数|表示同时传入两个值,最后的是LogCat里用的Tag
val
wl
=
localPowerManager
!!
.
newWakeLock
(
PowerManager
.
ACQUIRE_CAUSES_WAKEUP
or
PowerManager
.
SCREEN_BRIGHT_WAKE_LOCK
,
"bright"
)
wl
.
acquire
(
10000
)
// 点亮屏幕
wl
.
release
()
// 释放
}
}
private
fun
initIntentData
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment