1/* 2 * Copyright (C) 2020 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"; 18package android.service; 19 20option java_multiple_files = true; 21option java_outer_classname = "SensorPrivacyServiceProto"; 22 23import "frameworks/base/core/proto/android/privacy.proto"; 24 25message SensorPrivacyServiceDumpProto { 26 option (android.msg_privacy).dest = DEST_AUTOMATIC; 27 28 // DEPRECATED 29 // Is global sensor privacy enabled 30 optional bool is_enabled = 1; 31 32 // DEPRECATED 33 // Per sensor privacy enabled 34 repeated SensorPrivacyIndividualEnabledSensorProto individual_enabled_sensor = 2; 35 36 // Per user settings for sensor privacy 37 repeated SensorPrivacyUserProto user = 3; 38} 39 40message SensorPrivacyUserProto { 41 option (android.msg_privacy).dest = DEST_AUTOMATIC; 42 43 // User id 44 optional int32 user_id = 1; 45 46 // Is global sensor privacy enabled 47 optional bool is_enabled = 2; 48 49 // Per sensor privacy enabled 50 repeated SensorPrivacyIndividualEnabledSensorProto individual_enabled_sensor = 3; 51} 52 53message SensorPrivacyIndividualEnabledSensorProto { 54 option (android.msg_privacy).dest = DEST_AUTOMATIC; 55 56 enum Sensor { 57 UNKNOWN = 0; 58 59 MICROPHONE = 1; 60 CAMERA = 2; 61 } 62 63 // Sensor for which privacy might be enabled 64 optional Sensor sensor = 1; 65 66 // If sensor privacy is enabled for this sensor 67 optional bool is_enabled = 2; 68} 69 70message SensorPrivacyToggleSourceProto { 71 option (android.msg_privacy).dest = DEST_AUTOMATIC; 72 73 enum Source { 74 UNKNOWN = 0; 75 76 QS_TILE = 1; 77 SETTINGS = 2; 78 DIALOG = 3; 79 SHELL = 4; 80 OTHER = 5; 81 } 82 83 // Source for which sensor privacy was toggled. 84 optional Source source = 1; 85 86}