Loading media/java/android/media/MediaFile.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.mtp.MtpConstants; import java.util.HashMap; import java.util.HashMap; import java.util.Iterator; import java.util.Iterator; import java.util.List; import java.util.List; import java.util.Locale; /** /** * MediaScanner helper class. * MediaScanner helper class. Loading Loading @@ -276,10 +277,10 @@ public class MediaFile { } } public static MediaFileType getFileType(String path) { public static MediaFileType getFileType(String path) { int lastDot = path.lastIndexOf("."); int lastDot = path.lastIndexOf('.'); if (lastDot < 0) if (lastDot < 0) return null; return null; return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase()); return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase(Locale.ROOT)); } } public static boolean isMimeTypeMedia(String mimeType) { public static boolean isMimeTypeMedia(String mimeType) { Loading Loading @@ -325,7 +326,7 @@ public class MediaFile { } } int lastDot = fileName.lastIndexOf('.'); int lastDot = fileName.lastIndexOf('.'); if (lastDot > 0) { if (lastDot > 0) { String extension = fileName.substring(lastDot + 1).toUpperCase(); String extension = fileName.substring(lastDot + 1).toUpperCase(Locale.ROOT); Integer value = sFileTypeToFormatMap.get(extension); Integer value = sFileTypeToFormatMap.get(extension); if (value != null) { if (value != null) { return value.intValue(); return value.intValue(); Loading media/java/android/media/MediaScanner.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -540,7 +540,7 @@ public class MediaScanner if (noMedia) { if (noMedia) { result = endFile(entry, false, false, false, false, false); result = endFile(entry, false, false, false, false, false); } else { } else { String lowpath = path.toLowerCase(); String lowpath = path.toLowerCase(Locale.ROOT); boolean ringtones = (lowpath.indexOf(RINGTONES_DIR) > 0); boolean ringtones = (lowpath.indexOf(RINGTONES_DIR) > 0); boolean notifications = (lowpath.indexOf(NOTIFICATIONS_DIR) > 0); boolean notifications = (lowpath.indexOf(NOTIFICATIONS_DIR) > 0); boolean alarms = (lowpath.indexOf(ALARMS_DIR) > 0); boolean alarms = (lowpath.indexOf(ALARMS_DIR) > 0); Loading media/mca/filterpacks/java/android/filterpacks/text/ToUpperCase.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,8 @@ import android.filterfw.core.Frame; import android.filterfw.core.FrameFormat; import android.filterfw.core.FrameFormat; import android.filterfw.format.ObjectFormat; import android.filterfw.format.ObjectFormat; import java.util.Locale; /** /** * @hide * @hide */ */ Loading @@ -47,7 +49,7 @@ public class ToUpperCase extends Filter { String inputString = (String)input.getObjectValue(); String inputString = (String)input.getObjectValue(); Frame output = env.getFrameManager().newFrame(mOutputFormat); Frame output = env.getFrameManager().newFrame(mOutputFormat); output.setObjectValue(inputString.toUpperCase()); output.setObjectValue(inputString.toUpperCase(Locale.getDefault())); pushOutput("uppercase", output); pushOutput("uppercase", output); } } Loading media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.widget.Toast; import java.io.File; import java.io.File; import java.util.Date; import java.util.Date; import java.util.Locale; /** /** * A view to display the properties of an object. * A view to display the properties of an object. Loading Loading @@ -120,7 +121,7 @@ public class ObjectViewer extends Activity implements View.OnClickListener { mFileName = info.getName(); mFileName = info.getName(); view.setText(mFileName); view.setText(mFileName); view = (TextView)findViewById(R.id.format); view = (TextView)findViewById(R.id.format); view.setText(Integer.toHexString(info.getFormat()).toUpperCase()); view.setText(Integer.toHexString(info.getFormat()).toUpperCase(Locale.ROOT)); view = (TextView)findViewById(R.id.size); view = (TextView)findViewById(R.id.size); view.setText(Long.toString(info.getCompressedSize())); view.setText(Long.toString(info.getCompressedSize())); view = (TextView)findViewById(R.id.thumb_width); view = (TextView)findViewById(R.id.thumb_width); Loading Loading
media/java/android/media/MediaFile.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.mtp.MtpConstants; import java.util.HashMap; import java.util.HashMap; import java.util.Iterator; import java.util.Iterator; import java.util.List; import java.util.List; import java.util.Locale; /** /** * MediaScanner helper class. * MediaScanner helper class. Loading Loading @@ -276,10 +277,10 @@ public class MediaFile { } } public static MediaFileType getFileType(String path) { public static MediaFileType getFileType(String path) { int lastDot = path.lastIndexOf("."); int lastDot = path.lastIndexOf('.'); if (lastDot < 0) if (lastDot < 0) return null; return null; return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase()); return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase(Locale.ROOT)); } } public static boolean isMimeTypeMedia(String mimeType) { public static boolean isMimeTypeMedia(String mimeType) { Loading Loading @@ -325,7 +326,7 @@ public class MediaFile { } } int lastDot = fileName.lastIndexOf('.'); int lastDot = fileName.lastIndexOf('.'); if (lastDot > 0) { if (lastDot > 0) { String extension = fileName.substring(lastDot + 1).toUpperCase(); String extension = fileName.substring(lastDot + 1).toUpperCase(Locale.ROOT); Integer value = sFileTypeToFormatMap.get(extension); Integer value = sFileTypeToFormatMap.get(extension); if (value != null) { if (value != null) { return value.intValue(); return value.intValue(); Loading
media/java/android/media/MediaScanner.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -540,7 +540,7 @@ public class MediaScanner if (noMedia) { if (noMedia) { result = endFile(entry, false, false, false, false, false); result = endFile(entry, false, false, false, false, false); } else { } else { String lowpath = path.toLowerCase(); String lowpath = path.toLowerCase(Locale.ROOT); boolean ringtones = (lowpath.indexOf(RINGTONES_DIR) > 0); boolean ringtones = (lowpath.indexOf(RINGTONES_DIR) > 0); boolean notifications = (lowpath.indexOf(NOTIFICATIONS_DIR) > 0); boolean notifications = (lowpath.indexOf(NOTIFICATIONS_DIR) > 0); boolean alarms = (lowpath.indexOf(ALARMS_DIR) > 0); boolean alarms = (lowpath.indexOf(ALARMS_DIR) > 0); Loading
media/mca/filterpacks/java/android/filterpacks/text/ToUpperCase.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,8 @@ import android.filterfw.core.Frame; import android.filterfw.core.FrameFormat; import android.filterfw.core.FrameFormat; import android.filterfw.format.ObjectFormat; import android.filterfw.format.ObjectFormat; import java.util.Locale; /** /** * @hide * @hide */ */ Loading @@ -47,7 +49,7 @@ public class ToUpperCase extends Filter { String inputString = (String)input.getObjectValue(); String inputString = (String)input.getObjectValue(); Frame output = env.getFrameManager().newFrame(mOutputFormat); Frame output = env.getFrameManager().newFrame(mOutputFormat); output.setObjectValue(inputString.toUpperCase()); output.setObjectValue(inputString.toUpperCase(Locale.getDefault())); pushOutput("uppercase", output); pushOutput("uppercase", output); } } Loading
media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.widget.Toast; import java.io.File; import java.io.File; import java.util.Date; import java.util.Date; import java.util.Locale; /** /** * A view to display the properties of an object. * A view to display the properties of an object. Loading Loading @@ -120,7 +121,7 @@ public class ObjectViewer extends Activity implements View.OnClickListener { mFileName = info.getName(); mFileName = info.getName(); view.setText(mFileName); view.setText(mFileName); view = (TextView)findViewById(R.id.format); view = (TextView)findViewById(R.id.format); view.setText(Integer.toHexString(info.getFormat()).toUpperCase()); view.setText(Integer.toHexString(info.getFormat()).toUpperCase(Locale.ROOT)); view = (TextView)findViewById(R.id.size); view = (TextView)findViewById(R.id.size); view.setText(Long.toString(info.getCompressedSize())); view.setText(Long.toString(info.getCompressedSize())); view = (TextView)findViewById(R.id.thumb_width); view = (TextView)findViewById(R.id.thumb_width); Loading