1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 * in compliance with the License. You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 * or implied. See the License for the specific language governing permissions and limitations under
12 * the License.
13 */
14
15package com.android.dialer.logging;
16
17
18import android.app.Activity;
19
20/** Allows the container application to gather analytics. */
21public interface LoggingBindings {
22
23  /**
24   * Logs an DialerImpression event that's not associated with a specific call.
25   *
26   * @param dialerImpression an integer representing what event occurred.
27   */
28  void logImpression(DialerImpression.Type dialerImpression);
29
30  /**
31   * Logs an impression for a general dialer event that's not associated with a specific call.
32   *
33   * @param dialerImpression an integer representing what event occurred.
34   */
35  @Deprecated
36  void logImpression(int dialerImpression);
37
38  /**
39   * Logs an impression for a general dialer event that's associated with a specific call.
40   *
41   * @param dialerImpression an integer representing what event occurred.
42   * @param callId unique ID of the call.
43   * @param callStartTimeMillis the absolute time when the call started.
44   */
45  void logCallImpression(
46      DialerImpression.Type dialerImpression, String callId, long callStartTimeMillis);
47
48  /**
49   * Logs an interaction that occurred.
50   *
51   * @param interaction an integer representing what interaction occurred.
52   * @see com.android.dialer.logging.InteractionEvent
53   */
54  void logInteraction(InteractionEvent.Type interaction);
55
56  /**
57   * Logs an event indicating that a screen was displayed.
58   *
59   * @param screenEvent an integer representing the displayed screen.
60   * @param activity Parent activity of the displayed screen.
61   * @see com.android.dialer.logging.ScreenEvent
62   */
63  void logScreenView(com.android.dialer.logging.ScreenEvent.Type screenEvent, Activity activity);
64
65  /** Logs a hit event to the analytics server. */
66  void sendHitEventAnalytics(String category, String action, String label, long value);
67}
68