Add moto g(20) API 30 in the allowed frame dropping list

This is a workaround to avoid frame dropping.

PiperOrigin-RevId: 576467065
This commit is contained in:
sheenachhabra 2023-10-25 03:02:42 -07:00 committed by Copybara-Service
parent 8796b2e21e
commit fe6305931d

View file

@ -3225,7 +3225,11 @@ public final class Util {
// bounds. From API 29, if the app targets API 29 or later, the {@link
// MediaFormat#KEY_ALLOW_FRAME_DROP} key prevents frame dropping even when the surface is
// full.
return Util.SDK_INT < 29 || context.getApplicationInfo().targetSdkVersion < 29;
// "moto g(20) API 30" might drop frames despite setting {@link
// MediaFormat#KEY_ALLOW_FRAME_DROP} to 0. See b/307518793.
return SDK_INT < 29
|| context.getApplicationInfo().targetSdkVersion < 29
|| (SDK_INT == 30 && Ascii.equalsIgnoreCase(MODEL, "moto g(20)"));
}
/**