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 17syntax = "proto2"; 18 19package android.os.statsd.providers.mediaprovider; 20 21import "frameworks/proto_logging/stats/atoms.proto"; 22import "frameworks/proto_logging/stats/atom_field_options.proto"; 23 24option java_package = "com.android.os.providers.mediaprovider"; 25option java_multiple_files = true; 26 27extend Atom { 28 29 optional MediaProviderDatabaseRollbackReported media_provider_database_rollback_reported = 784 [(module) = "mediaprovider"]; 30 optional BackupSetupStatusReported backup_setup_status_reported = 785 [(module) = "mediaprovider"]; 31} 32 33/** 34 * Logs when MediaProvider goes through a DB rollback. 35 * Logged from: 36 * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java 37 */ 38message MediaProviderDatabaseRollbackReported { 39 enum Database { 40 UNKNOWN = 0; 41 INTERNAL = 1; 42 EXTERNAL = 2; 43 } 44 45 // DB name 46 optional Database database_name = 1; 47} 48 49message BackupSetupStatusReported { 50 enum Status { 51 UNKNOWN = 0; 52 ATTEMPTED = 1; 53 SUCCESS = 2; 54 FAILURE = 3; 55 } 56 57 // Backup status 58 optional Status status = 1; 59 60 enum Volume { 61 UNKNOWN_VOLUME = 0; 62 INTERNAL = 1; 63 EXTERNAL_PRIMARY = 2; 64 PUBLIC = 3; 65 } 66 67 // Volume for which status is captured 68 optional Volume volume = 2; 69} 70 71