/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.tv.analytics;

/** Provides Trackers used for user activity analysis. */
public interface Analytics {
    Tracker getDefaultTracker();

    /** Returns whether the state of the application-level opt is on. */
    boolean isAppOptOut();

    /**
     * Sets or resets the application-level opt out flag. If set, no hits will be sent. The value of
     * this flag will <i>not</i> persist across application starts. The correct value should thus be
     * set in application initialization code.
     *
     * @param optOut {@code true} if application-level opt out should be enforced.
     */
    void setAppOptOut(boolean optOut);
}
