1/*
2 * Copyright (C) 2014 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
17
18package com.android.camera.stats;
19
20import android.content.Context;
21import android.graphics.Rect;
22
23import com.android.camera.exif.ExifInterface;
24import com.android.camera.ui.TouchCoordinate;
25
26import java.util.HashMap;
27import java.util.List;
28
29public class UsageStatistics {
30    public static final long VIEW_TIMEOUT_MILLIS = 0;
31    public static final int NONE = -1;
32
33    private static UsageStatistics sInstance;
34
35    public static UsageStatistics instance() {
36        if (sInstance == null) {
37            sInstance = new UsageStatistics();
38        }
39        return sInstance;
40    }
41
42    public void initialize(Context context) {
43    }
44
45    public void mediaInteraction(String ref, int interactionType, int cause, float age) {
46    }
47
48    public void mediaView(String ref, long modifiedMillis, float zoom) {
49    }
50
51    public void foregrounded(int source, int mode, boolean isKeyguardLocked,
52                             boolean isKeyguardSecure, boolean startupOnCreate,
53                             long controlTime) {
54    }
55
56    public void backgrounded() {
57    }
58
59    public void cameraFrameDrop(double deltaMs, double previousDeltaMs) {
60    }
61
62    public void jankDetectionEnabled() {
63    }
64
65    public void storageWarning(long storageSpace) {
66    }
67
68    public void videoCaptureDoneEvent(String ref, long durationMsec, boolean front,
69                                      float zoom, int width, int height, long size,
70                                      String flashSetting, boolean gridLinesOn) {
71    }
72
73    public void photoCaptureDoneEvent(int mode, String fileRef, ExifInterface exifRef,
74                                      boolean front, boolean isHDR, float zoom,
75                                      String flashSetting, boolean gridLinesOn,
76                                      Float timerSeconds, Float processingTime,
77                                      TouchCoordinate touch, Boolean volumeButtonShutter,
78                                      List<Camera2FaceProxy> faces, Float lensDistance,
79                                      Rect activeSensorSize
80    ) {
81    }
82
83    public void cameraFailure(int cause, String info, int agentAction, int agentState) {
84    }
85
86    public void changeScreen(int newScreen, Integer interactionCause) {
87    }
88
89    public void controlUsed(int control) {
90    }
91
92    public void tapToFocus(TouchCoordinate touch, Float duration) {
93    }
94
95    public void reportMemoryConsumed(HashMap memoryData, String reportType) {
96    }
97}
98