Skip to content

Commit 9c082cc

Browse files
author
hailiang.chen
committed
增对23版本以上的添加注解,低于23版本的可以用反射进行获取queue
1 parent f172df2 commit 9c082cc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/src/main/java/com/example/signal/MyHandler.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import androidx.core.content.getSystemService
1616
import com.example.lib_signal.CallOnCatchSignal
1717

1818
class MyHandler : CallOnCatchSignal {
19+
@RequiresApi(Build.VERSION_CODES.M)
1920
override fun onCatchSignal(signal: Int, context: Context) {
2021
// 自定义处理,比如弹出一个toast,或者更友好的交互
2122
Log.i("hello", "custom onCatchSignal ")

0 commit comments

Comments
 (0)