Skip to content

Commit

Permalink
FTVPI-2556: Disable Dummy Surface workaround for Amazon Devices
Browse files Browse the repository at this point in the history
[JIRA]
FTVPI-2556

[Problem]
Framedrops are seen in selected Amazon devices.
ExoPlayer has an optimization which a dummy surface
is shown if a null surface is set.

[Solution]
Add selected Amazon devices as target devices
for disabling this optimization.
  • Loading branch information
saumya-y committed Mar 4, 2020
1 parent 204a14c commit 52bd718
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,20 @@ protected boolean codecNeedsSetOutputSurfaceWorkaround(String name) {
// https://github.com/google/ExoPlayer/issues/4468#issuecomment-459291645.
deviceNeedsSetOutputSurfaceWorkaround = true;
} else if (Util.SDK_INT >= 27) {
// In general, devices running API level 27 or later should be unaffected. Do nothing.
// AMZN_CHANGE_BEGIN
switch (Util.MODEL){
case "AFTR":
case "AFTSO001":
case "AFTEU014":
case "AFTEUFF014":
case "AFTEU011":
deviceNeedsSetOutputSurfaceWorkaround = true;
break;
default:
// Do nothing.
break;
}
// AMZN_CHANGE_END
} else {
// Enable the workaround on a per-device basis. Works around:
// https://github.com/google/ExoPlayer/issues/3236,
Expand Down Expand Up @@ -1824,6 +1837,10 @@ protected boolean codecNeedsSetOutputSurfaceWorkaround(String name) {
case "AFTA":
case "AFTN":
case "JSN-L21":
// AMZN_CHANGE_BEGIN
case "AFTJMST12":
case "AFTKMST12":
// AMZN_CHANGE_END
deviceNeedsSetOutputSurfaceWorkaround = true;
break;
default:
Expand Down

0 comments on commit 52bd718

Please sign in to comment.