blob: 7b97524d051053c2f05930b6d0d1ac20730ed452 [file] [log] [blame]
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";
package com.android.server.vibrator;
option java_multiple_files = true;
import "frameworks/base/core/proto/android/privacy.proto";
message StepSegmentProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 duration = 1;
optional float amplitude = 2;
optional float frequency = 3;
}
message RampSegmentProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 duration = 1;
optional float startAmplitude = 2;
optional float endAmplitude = 3;
optional float startFrequency = 4;
optional float endFrequency = 5;
}
message PrebakedSegmentProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 effect_id = 1;
optional int32 effect_strength = 2;
optional int32 fallback = 3;
}
message PrimitiveSegmentProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 primitive_id = 1;
optional float scale = 2;
optional int32 delay = 3;
}
message SegmentProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional PrebakedSegmentProto prebaked = 1;
optional PrimitiveSegmentProto primitive = 2;
optional StepSegmentProto step = 3;
optional RampSegmentProto ramp = 4;
}
// A com.android.os.VibrationEffect object.
message VibrationEffectProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional SegmentProto segments = 1;
required int32 repeat = 2;
}
message SyncVibrationEffectProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
repeated VibrationEffectProto effects = 1;
repeated int32 vibrator_ids = 2;
}
// A com.android.os.CombinedVibrationEffect object.
message CombinedVibrationEffectProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
repeated SyncVibrationEffectProto effects = 1;
repeated int32 delays = 2;
}
message VibrationAttributesProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 usage = 1;
optional int32 audio_usage = 2;
optional int32 flags = 3;
}
// Next id: 7
message VibrationProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional int64 start_time = 1;
optional int64 end_time = 2;
optional CombinedVibrationEffectProto effect = 3;
optional CombinedVibrationEffectProto original_effect = 4;
optional VibrationAttributesProto attributes = 5;
optional int32 status = 6;
}
// Next id: 18
message VibratorManagerServiceDumpProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
repeated int32 vibrator_ids = 1;
optional VibrationProto current_vibration = 2;
optional bool is_vibrating = 3;
optional VibrationProto current_external_vibration = 4;
optional bool vibrator_under_external_control = 5;
optional bool low_power_mode = 6;
optional int32 haptic_feedback_intensity = 7;
optional int32 haptic_feedback_default_intensity = 8;
optional int32 notification_intensity = 9;
optional int32 notification_default_intensity = 10;
optional int32 ring_intensity = 11;
optional int32 ring_default_intensity = 12;
repeated VibrationProto previous_ring_vibrations = 13;
repeated VibrationProto previous_notification_vibrations = 14;
repeated VibrationProto previous_alarm_vibrations = 15;
repeated VibrationProto previous_vibrations = 16;
repeated VibrationProto previous_external_vibrations = 17;
}