Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 66ea9c8

Browse files
author
auto-submit[bot]
committed
Revert "[Impeller] disable AHBs on devices that were upgraded to 29. (#56202)"
This reverts commit faf213b.
1 parent d0ad7cf commit 66ea9c8

File tree

3 files changed

+4
-23
lines changed

3 files changed

+4
-23
lines changed

impeller/toolkit/android/shadow_realm.cc

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,13 @@ bool ShadowRealm::ShouldDisableAHB() {
1515
__system_property_get("ro.com.google.clientidbase", clientidbase);
1616

1717
auto api_level = android_get_device_api_level();
18-
char first_api_level[PROP_VALUE_MAX];
19-
__system_property_get("ro.product.first_api_level", first_api_level);
2018

21-
return ShouldDisableAHBInternal(clientidbase, first_api_level, api_level);
19+
return ShouldDisableAHBInternal(clientidbase, api_level);
2220
}
2321

2422
// static
2523
bool ShadowRealm::ShouldDisableAHBInternal(std::string_view clientidbase,
26-
std::string_view first_api_level,
2724
uint32_t api_level) {
28-
// Most devices that have updated to API 29 don't seem to correctly
29-
// support AHBs: https://github.com/flutter/flutter/issues/157113
30-
if (first_api_level == "28" || first_api_level == "27" ||
31-
first_api_level == "26" || first_api_level == "25" ||
32-
first_api_level == "24") {
33-
return false;
34-
}
3525
// From local testing, neither the swapchain nor AHB import works, see also:
3626
// https://github.com/flutter/flutter/issues/154068
3727
if (clientidbase == kAndroidHuawei && api_level <= 29) {

impeller/toolkit/android/shadow_realm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class ShadowRealm {
1818

1919
// For testing.
2020
static bool ShouldDisableAHBInternal(std::string_view clientidbase,
21-
std::string_view first_api_level,
2221
uint32_t api_level);
2322
};
2423

impeller/toolkit/android/toolkit_android_unittests.cc

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,9 @@ TEST(ToolkitAndroidTest, CanPostAndWaitForFrameCallbacks) {
138138
TEST(ToolkitAndroidTest, ShouldDisableAHB) {
139139
EXPECT_FALSE(ShadowRealm::ShouldDisableAHB());
140140

141-
EXPECT_FALSE(
142-
ShadowRealm::ShouldDisableAHBInternal("android-huawei", "30", 30));
143-
EXPECT_FALSE(
144-
ShadowRealm::ShouldDisableAHBInternal("something made up", "29", 29));
145-
146-
EXPECT_TRUE(
147-
ShadowRealm::ShouldDisableAHBInternal("android-huawei", "29", 29));
148-
EXPECT_TRUE(
149-
ShadowRealm::ShouldDisableAHBInternal("something made up", "27", 29));
150-
EXPECT_TRUE(
151-
ShadowRealm::ShouldDisableAHBInternal("android-huawei", "garbage", 29));
141+
EXPECT_TRUE(ShadowRealm::ShouldDisableAHBInternal("android-huawei", 29));
142+
EXPECT_FALSE(ShadowRealm::ShouldDisableAHBInternal("android-huawei", 30));
143+
EXPECT_FALSE(ShadowRealm::ShouldDisableAHBInternal("something made up", 29));
152144
}
153145

154146
} // namespace impeller::android::testing

0 commit comments

Comments
 (0)