Use Build.DEVICE not Build.PRODUCT.

On HTC Butterfly these match, but Build.DEVICE is actually the right value to
use.

Issue: #377
This commit is contained in:
Andrew Lewis 2015-05-29 12:52:05 +01:00
parent cb1e6ad418
commit 02d5cb8109
2 changed files with 4 additions and 4 deletions

View File

@ -178,8 +178,8 @@ public class MediaCodecUtil {
// Workaround an issue where creating a particular MP3 decoder on some HTC devices on platform
// API version 16 crashes mediaserver.
if (Util.SDK_INT == 16
&& ("dlxu".equals(Util.PRODUCT) // HTC Butterfly
|| "protou".equals(Util.PRODUCT)) // HTC Desire X
&& ("dlxu".equals(Util.DEVICE) // HTC Butterfly
|| "protou".equals(Util.DEVICE)) // HTC Desire X
&& name.equals("OMX.qcom.audio.decoder.mp3")) {
return false;
}

View File

@ -62,10 +62,10 @@ public final class Util {
public static final int SDK_INT = android.os.Build.VERSION.SDK_INT;
/**
* Like {@link android.os.Build#PRODUCT}, but in a place where it can be conveniently overridden
* Like {@link android.os.Build#DEVICE}, but in a place where it can be conveniently overridden
* for local testing.
*/
public static final String PRODUCT = android.os.Build.PRODUCT;
public static final String DEVICE = android.os.Build.DEVICE;
private static final Pattern XS_DATE_TIME_PATTERN = Pattern.compile(
"(\\d\\d\\d\\d)\\-(\\d\\d)\\-(\\d\\d)[Tt]"