1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19import "frameworks/base/core/proto/android/app/pendingintent.proto";
20import "frameworks/base/core/proto/android/privacy.proto";
21
22option java_multiple_files = true;
23
24package android.app;
25
26/**
27 * An android.app.AlarmManager object.
28 */
29message AlarmManagerProto {
30    enum AlarmType {
31        // Alarm time in System.currentTimeMillis() (wall clock time in UTC), which
32        // will wake up the device when it goes off.
33        RTC_WAKEUP = 0;
34        // Alarm time in System.currentTimeMillis() (wall clock time in UTC). This
35        // alarm does not wake the device up; if it goes off while the device is
36        // asleep, it will not be delivered until the next time the device wakes up.
37        RTC = 1;
38        // Alarm time in SystemClock.elapsedRealtime() (time since boot, including
39        // sleep), which will wake up the device when it goes off.
40        ELAPSED_REALTIME_WAKEUP = 2;
41        // Alarm time in SystemClock.elapsedRealtime() (time since boot, including
42        // sleep). This alarm does not wake the device up; if it goes off while the
43        // device is asleep, it will not be delivered until the next time the device
44        // wakes up.
45        ELAPSED_REALTIME = 3;
46    }
47}
48
49// An android.app.AlarmManager.AlarmClockInfo object.
50message AlarmClockInfoProto {
51    option (android.msg_privacy).dest = DEST_AUTOMATIC;
52
53    // This value is UTC wall clock time in milliseconds, as returned by
54    // System#currentTimeMillis() for example.
55    optional int64 trigger_time_ms = 1;
56    optional PendingIntentProto show_intent = 2;
57}
58