uses aidl3 servicemanager on API level 31 & 32

Nikita (@NotKit) noticed that the change in commit f227ae4291
("[gbinder] All binder objects need stability field in Android 11.
JB#58951") has made the aidl4 servicemanager variant redundant. In fact,
using aidl4 variant will cause an extra stability field to be sent on
the wire (luckily it has not caused any problem).

I've tried using aidl3 variant on Volla Phone X23 which runs Halium 12
(API level 32), and service registration still work, which seems to
validate this theory. Thus, stop using aidl4 servicemanager variant on
any of the API level-based config, as it no longer correspond to any of
Android versions.

Note that this commit doesn't outright remove aidl4 variant, as doing so
would break configurations which explicitly request its use. This commit
doesn't doesn't alias the aidl4 variant to aidl3 variant either.
Manually requesting a certain variant could mean some unusual setup;
aliasing aidl4 to aidl3 could break such setup.

Origin: vendor
Forwarded: https://github.com/mer-hybris/libgbinder/pull/133
This commit is contained in:
Ratchanan Srirattanamet
2024-10-13 02:42:18 +07:00
committed by kuailexs
parent e3764d7002
commit 8c65520173
2 changed files with 3 additions and 9 deletions

View File

@@ -141,15 +141,9 @@ static const GBinderConfigPresetEntry gbinder_config_31_protocol[] = {
{ NULL, NULL }
};
static const GBinderConfigPresetEntry gbinder_config_31_servicemanager[] = {
{ "/dev/binder", "aidl4" },
{ "/dev/vndbinder", "aidl4" },
{ NULL, NULL }
};
static const GBinderConfigPresetGroup gbinder_config_31[] = {
{ GBINDER_CONFIG_GROUP_PROTOCOL, gbinder_config_31_protocol },
{ GBINDER_CONFIG_GROUP_SERVICEMANAGER, gbinder_config_31_servicemanager },
{ GBINDER_CONFIG_GROUP_SERVICEMANAGER, gbinder_config_30_servicemanager },
{ NULL, NULL }
};

View File

@@ -534,8 +534,8 @@ static const TestPresetsData test_presets_data [] = {
"/dev/binder = aidl4\n"
"/dev/vndbinder = aidl4\n"
"[ServiceManager]\n"
"/dev/binder = aidl4\n"
"/dev/vndbinder = aidl4\n"
"/dev/binder = aidl3\n"
"/dev/vndbinder = aidl3\n"
},{
"33",