1/*
2 * Copyright (C) 2024 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.camera;
20
21import "frameworks/proto_logging/stats/atom_field_options.proto";
22import "frameworks/proto_logging/stats/atoms.proto";
23
24option java_package = "com.android.server.camera";
25option java_multiple_files = true;
26
27extend Atom {
28  optional CameraFeatureCombinationQueryEvent camera_feature_combination_query_event = 900 [(module) = "framework"];
29}
30
31/**
32 * Information about camera feature combination queries.
33 * Logged from:
34 *   frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java
35 */
36message CameraFeatureCombinationQueryEvent {
37    optional int32 uid = 1 [(is_uid) = true];
38
39    // Camera ID
40    optional string camera_id = 2;
41
42    // Type of feature combination queries
43    enum QueryType {
44        QUERY_FEATURE_COMBINATION = 0;
45        QUERY_SESSION_CHARACTERISTICS = 1;
46    }
47    optional QueryType query_type = 3;
48
49    // Bitmask enum for feature combination queries
50    enum FeatureType {
51        FEATURE_NONE = 0;
52        FEATURE_60_FPS = 0x0001; // 1 << 0
53        FEATURE_STABILIZATION = 0x0002; // 1 << 1
54        FEATURE_HLG10 = 0x0004; // 1 << 2
55        FEATURE_JPEG = 0x0008; // 1 << 3
56        FEATURE_JPEG_R = 0x0010; // 1 << 4
57        FEATURE_4K = 0x0020; // 1 << 5
58    }
59    optional int64 feature_combination_bitmap = 4;
60
61    // Status code for feature combination query
62    // The values matches the values in ICameraService.aidl
63    enum StatusCode {
64        OK = 0;
65        ERROR_ILLEGAL_ARGUMENT = 3;
66        ERROR_INVALID_OPERATION = 10;
67    }
68    optional StatusCode status_code = 5;
69}
70