zoukankan      html  css  js  c++  java
  • rtc关机闹钟2 Alarm manager

    public void set(int type, long triggerAtMillis, long windowMillis, long intervalMillis,
                PendingIntent operation, WorkSource workSource) {
            setImpl(type, triggerAtMillis, windowMillis, intervalMillis, 0, operation, workSource,
                    null);
        }
    
        private void setImpl(int type, long triggerAtMillis, long windowMillis, long intervalMillis,
                int flags, PendingIntent operation, WorkSource workSource, AlarmClockInfo alarmClock) {
            if (triggerAtMillis < 0) {
                /* NOTYET
                if (mAlwaysExact) {
                    // Fatal error for KLP+ apps to use negative trigger times
                    throw new IllegalArgumentException("Invalid alarm trigger time "
                            + triggerAtMillis);
                }
                */
                triggerAtMillis = 0;
            }
    
            try {
                //mService.set(type, triggerAtMillis, windowMillis, intervalMillis, flags, operation,
                //        workSource, alarmClock);
                if(type == RTC_POWEROFF_WAKEUP){//RTC_POWEROFF_WAKEUP=5,RTC_WAKEUP=0
    mService.set(RTC_WAKEUP, triggerAtMillis, windowMillis, intervalMillis, flags, operation, workSource, alarmClock); 
    RtcEnable.set(RTC_POWEROFF_WAKEUP, triggerAtMillis, windowMillis, intervalMillis, operation, workSource);
    }
    else{
    mService.set(type, triggerAtMillis, windowMillis, intervalMillis, flags, operation, workSource, alarmClock); } } catch (RemoteException ex) { } }
  • 相关阅读:
    Python学习之函数
    Python学习之set集合
    python学习之循环语句
    Python学习之运算符
    python学习之变量类型
    python学习之基础语法
    DAY103
    DAY102
    DAY101
    DAY100
  • 原文地址:https://www.cnblogs.com/muhuacat/p/5258667.html
Copyright © 2011-2022 走看看