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
21option java_package = "com.android.os.providers.mediaprovider";
22option java_multiple_files = true;
23
24/**
25 * Logs when MediaProvider recovers volume data after a DB rollback.
26 * Logged from:
27 *   packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java
28 */
29message MediaProviderVolumeRecoveryReported {
30    enum Volume {
31        UNKNOWN = 0;
32        INTERNAL = 1;
33        EXTERNAL_PRIMARY = 2;
34        PUBLIC = 3;
35    }
36    // Volume recovered
37    optional Volume volume = 1;
38    // Time taken to recover data in milliseconds
39    optional float recovery_time_millis = 2;
40    // Count of rows recovered
41    optional int64 rows_recovered = 3;
42    // Dirty rows count
43    optional int64 dirty_rows_found = 4;
44}
45
46