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 com.android.server.vibrator; 19 20option java_multiple_files = true; 21 22import "frameworks/base/core/proto/android/privacy.proto"; 23 24message StepSegmentProto { 25 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 26 optional int32 duration = 1; 27 optional float amplitude = 2; 28 optional float frequency = 3; 29} 30 31message RampSegmentProto { 32 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 33 optional int32 duration = 1; 34 optional float startAmplitude = 2; 35 optional float endAmplitude = 3; 36 optional float startFrequency = 4; 37 optional float endFrequency = 5; 38} 39 40message PrebakedSegmentProto { 41 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 42 optional int32 effect_id = 1; 43 optional int32 effect_strength = 2; 44 optional int32 fallback = 3; 45} 46 47message PrimitiveSegmentProto { 48 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 49 optional int32 primitive_id = 1; 50 optional float scale = 2; 51 optional int32 delay = 3; 52} 53 54message SegmentProto { 55 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 56 optional PrebakedSegmentProto prebaked = 1; 57 optional PrimitiveSegmentProto primitive = 2; 58 optional StepSegmentProto step = 3; 59 optional RampSegmentProto ramp = 4; 60} 61 62// A com.android.os.VibrationEffect object. 63message VibrationEffectProto { 64 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 65 optional SegmentProto segments = 1; 66 required int32 repeat = 2; 67} 68 69message SyncVibrationEffectProto { 70 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 71 repeated VibrationEffectProto effects = 1; 72 repeated int32 vibrator_ids = 2; 73} 74 75// A com.android.os.CombinedVibrationEffect object. 76message CombinedVibrationEffectProto { 77 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 78 repeated SyncVibrationEffectProto effects = 1; 79 repeated int32 delays = 2; 80} 81 82message VibrationAttributesProto { 83 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 84 optional int32 usage = 1; 85 optional int32 audio_usage = 2; 86 optional int32 flags = 3; 87} 88 89// Next id: 7 90message VibrationProto { 91 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 92 optional int64 start_time = 1; 93 optional int64 end_time = 2; 94 optional CombinedVibrationEffectProto effect = 3; 95 optional CombinedVibrationEffectProto original_effect = 4; 96 optional VibrationAttributesProto attributes = 5; 97 optional int32 status = 6; 98} 99 100// Next id: 18 101message VibratorManagerServiceDumpProto { 102 option (.android.msg_privacy).dest = DEST_AUTOMATIC; 103 repeated int32 vibrator_ids = 1; 104 optional VibrationProto current_vibration = 2; 105 optional bool is_vibrating = 3; 106 optional VibrationProto current_external_vibration = 4; 107 optional bool vibrator_under_external_control = 5; 108 optional bool low_power_mode = 6; 109 optional int32 haptic_feedback_intensity = 7; 110 optional int32 haptic_feedback_default_intensity = 8; 111 optional int32 notification_intensity = 9; 112 optional int32 notification_default_intensity = 10; 113 optional int32 ring_intensity = 11; 114 optional int32 ring_default_intensity = 12; 115 repeated VibrationProto previous_ring_vibrations = 13; 116 repeated VibrationProto previous_notification_vibrations = 14; 117 repeated VibrationProto previous_alarm_vibrations = 15; 118 repeated VibrationProto previous_vibrations = 16; 119 repeated VibrationProto previous_external_vibrations = 17; 120}