Revision 5e048300
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/external/RubikFiles.java | ||
---|---|---|
26 | 26 |
import java.io.IOException; |
27 | 27 |
import java.io.InputStream; |
28 | 28 |
import java.io.OutputStream; |
29 |
import java.util.Locale; |
|
29 | 30 |
|
30 | 31 |
import android.content.Context; |
31 | 32 |
import android.graphics.Bitmap; |
... | ... | |
138 | 139 |
|
139 | 140 |
public void deleteIcon(Context context, String name) |
140 | 141 |
{ |
141 |
String filename = name.toLowerCase() + ".png"; |
|
142 |
String filename = name.toLowerCase(Locale.ENGLISH) + ".png";
|
|
142 | 143 |
boolean success = context.deleteFile(filename); |
143 | 144 |
if( !success ) android.util.Log.e("D", "failed to delete "+filename); |
144 | 145 |
else android.util.Log.e("D", "successfully deleted "+filename); |
... | ... | |
148 | 149 |
|
149 | 150 |
public void deleteJsonObject(Context context, String name) |
150 | 151 |
{ |
151 |
String filename = name.toLowerCase() + "_object.json"; |
|
152 |
String filename = name.toLowerCase(Locale.ENGLISH) + "_object.json";
|
|
152 | 153 |
boolean success = context.deleteFile(filename); |
153 | 154 |
if( !success ) android.util.Log.e("D", "failed to delete "+filename); |
154 | 155 |
else android.util.Log.e("D", "successfully deleted "+filename); |
... | ... | |
158 | 159 |
|
159 | 160 |
public void deleteJsonExtras(Context context, String name) |
160 | 161 |
{ |
161 |
String filename = name.toLowerCase() + "_extras.json"; |
|
162 |
String filename = name.toLowerCase(Locale.ENGLISH) + "_extras.json";
|
|
162 | 163 |
boolean success = context.deleteFile(filename); |
163 | 164 |
if( !success ) android.util.Log.e("D", "failed to delete "+filename); |
164 | 165 |
else android.util.Log.e("D", "successfully deleted "+filename); |
Also available in: Unified diff
Fix for a bug when in Turkey and Azerbaijan, the names of downloaded objects which contain the letter 'I' do not get translated to upper case correctly (part 2: fix 'toLowerCase()' )