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) { } }