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:
parent
cb1e6ad418
commit
02d5cb8109
@ -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;
|
||||
}
|
||||
|
@ -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]"
|
||||
|
Loading…
x
Reference in New Issue
Block a user