1 /* 2 * Copyright (C) 2018 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 package com.android.launcher3.logging; 17 18 import android.content.Context; 19 import android.content.Intent; 20 import android.view.View; 21 22 import com.android.launcher3.R; 23 import com.android.launcher3.util.ComponentKey; 24 import com.android.launcher3.util.ResourceBasedOverride; 25 import com.android.launcher3.logging.StatsLogUtils.LogStateProvider; 26 27 /** 28 * Handles the user event logging in Q. 29 */ 30 public class StatsLogManager implements ResourceBasedOverride { 31 32 protected LogStateProvider mStateProvider; newInstance(Context context, LogStateProvider stateProvider)33 public static StatsLogManager newInstance(Context context, LogStateProvider stateProvider) { 34 StatsLogManager mgr = Overrides.getObject(StatsLogManager.class, 35 context.getApplicationContext(), R.string.stats_log_manager_class); 36 mgr.mStateProvider = stateProvider; 37 mgr.verify(); 38 return mgr; 39 } 40 logAppLaunch(View v, Intent intent)41 public void logAppLaunch(View v, Intent intent) { } logTaskLaunch(View v, ComponentKey key)42 public void logTaskLaunch(View v, ComponentKey key) { } logTaskDismiss(View v, ComponentKey key)43 public void logTaskDismiss(View v, ComponentKey key) { } logSwipeOnContainer(boolean isSwipingToLeft, int pageId)44 public void logSwipeOnContainer(boolean isSwipingToLeft, int pageId) { } verify()45 public void verify() {} // TODO: should move into robo tests 46 } 47