Updated Android API to 9 (Android 2.3) and fixed Downloads path
This commit is contained in:
parent
e3752daeeb
commit
502f2b0eb1
@ -28,7 +28,7 @@
|
||||
android:required="false" />
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:minSdkVersion="9"
|
||||
android:targetSdkVersion="19" >
|
||||
</uses-sdk>
|
||||
|
||||
|
@ -575,7 +575,7 @@ public final class R {
|
||||
public static final int MenuItem_android_titleCondensed = 8;
|
||||
public static final int MenuItem_android_visible = 4;
|
||||
public static final int MenuItem_showAsAction = 13;
|
||||
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x01010435 };
|
||||
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x01010438 };
|
||||
public static final int MenuView_android_headerBackground = 4;
|
||||
public static final int MenuView_android_horizontalDivider = 2;
|
||||
public static final int MenuView_android_itemBackground = 5;
|
||||
|
@ -8,6 +8,6 @@
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-19
|
||||
target=android-20
|
||||
android.library=false
|
||||
android.library.reference.1=../android-support-v7-appcompat
|
||||
|
@ -409,11 +409,11 @@ public class Constants {
|
||||
/**
|
||||
* Path for downloaded files
|
||||
*/
|
||||
public static final String DIRECTORY_SWADDROID = "SwadDroid";
|
||||
public static final String DIRECTORY_SWADROID = "Swadroid";
|
||||
public static final String DOWNLOADS_PATH =
|
||||
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
|
||||
.getAbsolutePath()
|
||||
+ File.separator + DIRECTORY_SWADDROID;
|
||||
+ File.separator + DIRECTORY_SWADROID;
|
||||
|
||||
/**
|
||||
* Checks if user is already logged on SWAD
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
package es.ugr.swad.swadroid.utils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.DownloadManager;
|
||||
import android.content.Context;
|
||||
@ -194,7 +193,7 @@ public class Utils {
|
||||
request.allowScanningByMediaScanner();
|
||||
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||
request.setDestinationInExternalPublicDir(
|
||||
Environment.DIRECTORY_DOWNLOADS + File.separator + Constants.DIRECTORY_SWADDROID,
|
||||
Environment.DIRECTORY_DOWNLOADS + File.separator + Constants.DIRECTORY_SWADROID,
|
||||
fileName);
|
||||
|
||||
// get download service and enqueue file
|
||||
@ -311,19 +310,8 @@ public class Utils {
|
||||
return stars;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public static String unAccent(String s) {
|
||||
//
|
||||
// JDK1.5
|
||||
// use sun.text.Normalizer.normalize(s, Normalizer.DECOMP, 0);
|
||||
//
|
||||
String temp;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
||||
temp = Normalizer.normalize(s, Normalizer.Form.NFD);
|
||||
} else {
|
||||
/* TODO Fall back on some default behavior */
|
||||
temp = s;
|
||||
}
|
||||
String temp = Normalizer.normalize(s, Normalizer.Form.NFD);
|
||||
Pattern pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+");
|
||||
return pattern.matcher(temp).replaceAll("");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user