From e2718d4bacbae10a7352eb7162e44d2db82b2ee7 Mon Sep 17 00:00:00 2001 From: ZYP <1721777650@qq.com> Date: Thu, 14 Dec 2023 11:00:54 +0800 Subject: [PATCH] modify --- src/net/micode/notes/ui/AlarmAlertActivity.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/net/micode/notes/ui/AlarmAlertActivity.java b/src/net/micode/notes/ui/AlarmAlertActivity.java index 23c1778..b208e50 100644 --- a/src/net/micode/notes/ui/AlarmAlertActivity.java +++ b/src/net/micode/notes/ui/AlarmAlertActivity.java @@ -106,16 +106,13 @@ public class AlarmAlertActivity extends Activity implements OnClickListener, OnD } } - private boolean isScreenOn() { - //判断屏幕是否锁屏,调用系统函数判断,最后返回值是布尔类型 + private boolean isScreenOn() {//判断屏幕是否锁屏,调用系统函数判断,最后返回值是布尔类型 PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); return pm.isScreenOn(); } - private void playAlarmSound() { - //闹钟提示音激发 - Uri url = RingtoneManager.getActualDefaultRingtoneUri(this, RingtoneManager.TYPE_ALARM); - //调用系统的铃声管理URI,得到闹钟提示音 + private void playAlarmSound() {//闹钟提示音激发 + Uri url = RingtoneManager.getActualDefaultRingtoneUri(this, RingtoneManager.TYPE_ALARM);//调用系统的铃声管理URI,得到闹钟提示音 int silentModeStreams = Settings.System.getInt(getContentResolver(), Settings.System.MODE_RINGER_STREAMS_AFFECTED, 0);