From 146405b58a876d1bb50e0520409cff71f376cd84 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Thu, 6 Sep 2018 17:58:16 -0700 Subject: [PATCH] Note confusion-causing breaks in HIDL convention. These were either made at a time when the convention was not fully formed or missed during review. It is somewhat misleading since method overloading isn't supported and method names need this kind of prefix, but nothing else does. The reason for this is that everything is namespaced, but methods are all in the same namespace. The reason method overloading is not supported in HIDL is because the HIDL types may map to types that collide in the target languages, and this would cause any sort of overloading rules to require complicated machinery. Bug: N/A Test: hidl-gen -Lcheck android.hardware.usb@1.1 android.hardware.vibrator@1.1 && echo ":)" :) Change-Id: Iac23c9311925ed140ff1e15d1366829b078c8866 --- current.txt | 2 ++ usb/1.1/types.hal | 4 ++++ vibrator/1.1/types.hal | 2 ++ 3 files changed, 8 insertions(+) diff --git a/current.txt b/current.txt index b8457f80df..909732f19b 100644 --- a/current.txt +++ b/current.txt @@ -392,3 +392,5 @@ da33234403ff5d60f3473711917b9948e6484a4260b5247acdafb111193a9de2 android.hardwar 1d4a5776614c08b5d794a5ec5ab04697260cbd4b3441d5935cd53ee71d19da02 android.hardware.radio@1.0::IRadioResponse 271187e261b30c01a33011aea257c07a2d2f05b72943ebee89e973e997849973 android.hardware.radio@1.0::types 1d19720d4fd38b1095f0f555a4bd92b3b12c9b1d0f560b0e9a474cd6dcc20db6 android.hardware.radio@1.2::IRadio +1722ad002317b1fae1400de709e90f442d94ef22864e05f7a12af48c32e8edc8 android.hardware.usb@1.1::types +29c8da7a13c40d488f569c812441d5754ee45bdcdb8ce6564f524b708d10a057 android.hardware.vibrator@1.1::types diff --git a/usb/1.1/types.hal b/usb/1.1/types.hal index 2261e09cf2..c9cc29230b 100644 --- a/usb/1.1/types.hal +++ b/usb/1.1/types.hal @@ -18,6 +18,8 @@ package android.hardware.usb@1.1; import android.hardware.usb@1.0; +// NOTE: suffix '_1_1' is for legacy ABI compatibility. It cannot be +// changed to 'PortMode' which the convention dictates. @export enum PortMode_1_1 : PortMode { /* @@ -37,6 +39,8 @@ enum PortMode_1_1 : PortMode { * Used as the container to report data back to the caller. * Represents the current connection status of a single USB port. */ +// NOTE: suffix '_1_1' is for legacy ABI compatibility. It cannot be +// changed to 'PortStatus' which the convention dictates. struct PortStatus_1_1 { /* * The supportedModes and the currentMode fields of the status diff --git a/vibrator/1.1/types.hal b/vibrator/1.1/types.hal index f7a619a0f7..72deb4a7e9 100644 --- a/vibrator/1.1/types.hal +++ b/vibrator/1.1/types.hal @@ -18,6 +18,8 @@ package android.hardware.vibrator@1.1; import @1.0::Effect; +// NOTE: suffix '_1_1' is for legacy ABI compatibility. It cannot be +// changed to 'Effect' which the convention dictates. @export enum Effect_1_1 : @1.0::Effect { /**