1 /* 2 * Copyright (C) 2023 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 package com.android.tv.feedbackconsent; 18 19 import android.net.Uri; 20 import com.android.tv.feedbackconsent.ITvDiagnosticInformationManagerCallback; 21 22 /** 23 * Binder interface for getting Diagnostic Information on TV 24 * {@hide} 25 */ 26 27 interface ITvDiagnosticInformationManager { 28 29 /** 30 * Asks for user consent and shares diagnostic data with the calling application. 31 * 32 * <p> Shows the user a consent screen for sharing diagnostic information such as the bugreport, 33 * system logs, etc with the calling application. 34 * Also allows the user to view the system logs being shared. 35 36 * <p> System logs will be generated in the background and the user will be given the 37 * option to view the logs. 38 * If the user consents to sharing system logs, the logs will be copied over to the 39 * Uri provided by the calling application and 40 * {@link ITvDiagnosticInformationManagerCallback#onSystemLogsFinished} will be executed. 41 * If log generation results in a failure or the user denies consent to sharing the system logs, 42 * {@link ITvDiagnosticInformationManagerCallback#onSystemLogsError} will be called 43 * along with information related to the error. 44 * 45 * <p>If the user consents to sharing the bugreport, {@link BugreportManager#startBugreport} 46 * will be called to generate a bugreport in the background. 47 * On successful bugreport generation, BugreportManager will automatically copy the 48 * bugreport to the Uri provided by the calling application and 49 * {@link ITvDiagnosticInformationManagerCallback#onBugreportFinished} will be executed. 50 * If bugreport generation results in a failure or the user denies consent to sharing the bugreport, 51 * {@link ITvDiagnosticInformationManagerCallback#onBugreportError} will be called 52 * along with information related to the error. 53 * 54 * bugreportUri and systemLogsUri are nullable parameters and are independent of each other. 55 * However, passing both these parameters as null implies no information has been requested, and 56 * result in an error. 57 * 58 * @param bugreportUri the optional identifier for the file to which the zipped bugreport 59 * should be written 60 * @param SystemLogsUri the optional identifier for the file to which the system logs 61 * should be written 62 * @param listener callback for updates; 63 */ getDiagnosticInformation( in Uri bugreportUri, in Uri systemLogsUri, in ITvDiagnosticInformationManagerCallback tvDiagnosticInformationManagerCallback)64 void getDiagnosticInformation( 65 in Uri bugreportUri, 66 in Uri systemLogsUri, 67 in ITvDiagnosticInformationManagerCallback tvDiagnosticInformationManagerCallback); 68 }