Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/1.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Amab committed Feb 12, 2017
2 parents 63e3807 + a2b73e0 commit b25a772
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 25 deletions.
11 changes: 3 additions & 8 deletions SWADroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ android {

variant.outputs.each { output ->
def newApkName
//If there's no ZipAlign task it means that our artifact will be unaligned and we need to mark it as such.
if (output.zipAlign) {
newApkName = "${appName}-${output.baseName}-${variant.versionName}.apk"
} else {
newApkName = "${appName}-${output.baseName}-${variant.versionName}-unaligned.apk"
}
newApkName = "${appName}-${output.baseName}-${variant.versionName}.apk"
output.outputFile = new File(output.outputFile.parent, newApkName)
}
}
Expand Down Expand Up @@ -82,8 +77,8 @@ def getBuildConfigField(String property){
}

dependencies {
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.google.android.gms:play-services-analytics:10.0.1'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.2'
compile 'commons-io:commons-io:2.5'
Expand Down
26 changes: 16 additions & 10 deletions SWADroid/src/main/java/es/ugr/swad/swadroid/SWADMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,12 @@ private void createBaseMenu() {
//Order:
// 1- Course
// 2- Evaluation
// 3- Messages
// 4- Enrollment
// 5- Users
mHeaderData.add(getMenuItem(R.string.course, R.string.fa_folder_open));
// 3- Files
// 4- Users
// 5- Messages
mHeaderData.add(getMenuItem(R.string.course, R.string.fa_list_ol));
mHeaderData.add(getMenuItem(R.string.evaluation, R.string.fa_check_square_o));
mHeaderData.add(getMenuItem(R.string.files, R.string.fa_folder_open));
mHeaderData.add(getMenuItem(R.string.users, R.string.fa_users));
mHeaderData.add(getMenuItem(R.string.messages, R.string.fa_envelope));

Expand All @@ -554,6 +555,9 @@ private void createBaseMenu() {
final ArrayList<HashMap<String, Object>> evaluationData = new ArrayList<>();
mChildData.add(evaluationData);

final ArrayList<HashMap<String, Object>> filesData = new ArrayList<>();
mChildData.add(filesData);

mChildData.add(mUsersData);
mChildData.add(mMessagesData);

Expand All @@ -566,12 +570,8 @@ private void createBaseMenu() {
courseData.add(getMenuItem(R.string.syllabusLecturesModuleLabel, R.string.fa_list_ol));
//Syllabus (practicals)
courseData.add(getMenuItem(R.string.syllabusPracticalsModuleLabel, R.string.fa_flask));
//Documents
courseData.add(getMenuItem(R.string.documentsDownloadModuleLabel, R.string.fa_folder_open));
//Shared area
courseData.add(getMenuItem(R.string.sharedsDownloadModuleLabel, R.string.fa_folder_open));
//Bibliography
courseData.add(getMenuItem(R.string.bibliographyModuleLabel, R.string.fa_folder_open));
courseData.add(getMenuItem(R.string.bibliographyModuleLabel, R.string.fa_book));
//FAQs
courseData.add(getMenuItem(R.string.faqsModuleLabel, R.string.fa_question));
//Links
Expand All @@ -582,8 +582,14 @@ private void createBaseMenu() {
evaluationData.add(getMenuItem(R.string.assessmentModuleLabel, R.string.fa_info));
//Test
evaluationData.add(getMenuItem(R.string.testsModuleLabel, R.string.fa_check_square_o));

//Files category
//Documents
filesData.add(getMenuItem(R.string.documentsDownloadModuleLabel, R.string.fa_folder_open));
//Shared area
filesData.add(getMenuItem(R.string.sharedsDownloadModuleLabel, R.string.fa_folder_open));
//Marks
evaluationData.add(getMenuItem(R.string.marksModuleLabel, R.string.fa_list_alt));
filesData.add(getMenuItem(R.string.marksModuleLabel, R.string.fa_list_alt));

//Users category
//Groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ public class Preferences {
* Share preference name
*/
public static final String SHAREPREF = "sharePref";
/**
* Privacy policy preference name
*/
public static final String PRIVACYPOLICYPREF = "privacyPolicyPref";
/**
* Server preference name
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public class PreferencesActivity extends PreferenceActivity implements OnPrefere
* Share preference
*/
private static Preference sharePref;
/**
* Privacy policy preference
*/
private static Preference privacyPolicyPref;
/**
* Synchronization time preference
*/
Expand Down Expand Up @@ -195,6 +199,7 @@ protected void onCreate(Bundle savedInstanceState) {
telegramPref = findPreference(Preferences.TELEGRAMPREF);
blogPref = findPreference(Preferences.BLOGPREF);
sharePref = findPreference(Preferences.SHAREPREF);
privacyPolicyPref = findPreference(Preferences.PRIVACYPOLICYPREF);
syncTimePref = findPreference(Preferences.SYNCTIMEPREF);
syncEnablePref = (CheckBoxPreference) findPreference(Preferences.SYNCENABLEPREF);
notifSoundEnablePref = (CheckBoxPreference) findPreference(Preferences.NOTIFSOUNDENABLEPREF);
Expand All @@ -208,6 +213,7 @@ protected void onCreate(Bundle savedInstanceState) {
telegramPref.setOnPreferenceChangeListener(this);
blogPref.setOnPreferenceChangeListener(this);
sharePref.setOnPreferenceChangeListener(this);
privacyPolicyPref.setOnPreferenceChangeListener(this);
syncEnablePref.setOnPreferenceChangeListener(this);
syncTimePref.setOnPreferenceChangeListener(this);
notifSoundEnablePref.setOnPreferenceChangeListener(this);
Expand Down Expand Up @@ -316,6 +322,18 @@ public boolean onPreferenceClick(Preference preference) {
return true;
}
});
privacyPolicyPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
/**
* Called when a preference is selected.
* @param preference Preference selected.
*/
public boolean onPreferenceClick(Preference preference) {
Intent urlIntent = new Intent(Intent.ACTION_VIEW);
urlIntent.setData(Uri.parse(getString(R.string.privacyPolicyURL)));
startActivity(urlIntent);
return true;
}
});

try {
currentVersionPref.setSummary(getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
Expand Down
9 changes: 9 additions & 0 deletions SWADroid/src/main/res/raw-es/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
</head>

<body bgcolor="white">
<h4>1.5.2 (2017-02-12)</h4>
<ul>
<lh class="new">[NOVEDADES]</lh>
<li type="disc">A&ntilde;adida pol&iacute;tica de privacidad de datos en la pantalla de configuraci&oacute;n</li>
</ul>
<ul>
<lh class="update">[ACTUALIZACIONES]</lh>
<li type="disc">Reorganizada la distribuci&oacute;n de algunas opciones en el men&uacute; principal. Las opciones para descargar archivos, como Documentos, Compartidos y Calificaciones, ahora se encuentran en la nueva carpeta Archivos</li>
</ul>
<h4>1.5.1 (2017-01-21)</h4>
<ul>
<lh class="fix">[CORRECCIONES]</lh>
Expand Down
9 changes: 9 additions & 0 deletions SWADroid/src/main/res/raw/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
</head>

<body bgcolor="white">
<h4>1.5.2 (2017-02-12)</h4>
<ul>
<lh class="new">[NEW]</lh>
<li type="disc">Added privacy policy in Preferences screen</li>
</ul>
<ul>
<lh class="update">[UPDATES]</lh>
<li type="disc">Rearranged the layout of some options in main menu. Options for downloading files, such as Documents, Shared and Marks, are now available in the new Files folder</li>
</ul>
<h4>1.5.1 (2017-01-21)</h4>
<ul>
<lh class="fix">[FIXES]</lh>
Expand Down
10 changes: 6 additions & 4 deletions SWADroid/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@
<string name="faqsModuleLabel">FAQs</string>
<string name="linksModuleLabel">Enlaces</string>
<string name="bibliographyModuleLabel">Bibliografía</string>
<string name="syllabusPracticalsModuleLabel">Programa de Prácticas</string>
<string name="syllabusLecturesModuleLabel">Programa de Teoría</string>
<string name="teachingguideModuleLabel">Guía Docente</string>
<string name="assessmentModuleLabel">Sistema de Evaluación</string>
<string name="syllabusPracticalsModuleLabel">Programa de prácticas</string>
<string name="syllabusLecturesModuleLabel">Programa de teoría</string>
<string name="teachingguideModuleLabel">Guía docente</string>
<string name="assessmentModuleLabel">Sistema de evaluación</string>
<string name="informationProgressDescription">Obteniendo información…\nPor favor, espere…</string>
<string name="informationProgressTitle">Información</string>
<string name="emptyInformation">Información no disponible</string>
Expand Down Expand Up @@ -333,4 +333,6 @@
<string name="NOTfrequent_users">No hay usuarios frecuentes</string>
<string name="replyModuleLabel">Responder mensaje</string>
<string name="primaryReceiver">Principal</string>
<string name="privacyPolicyTitle">Política de privacidad</string>
<string name="files">Archivos</string>
</resources>
9 changes: 6 additions & 3 deletions SWADroid/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@
<string name="faqsModuleLabel">FAQs</string>
<string name="linksModuleLabel">Links</string>
<string name="bibliographyModuleLabel">Bibliography</string>
<string name="syllabusPracticalsModuleLabel">Practices Program</string>
<string name="syllabusLecturesModuleLabel">Theory Program</string>
<string name="teachingguideModuleLabel">Teaching Guide</string>
<string name="syllabusPracticalsModuleLabel">Practices program</string>
<string name="syllabusLecturesModuleLabel">Theory program</string>
<string name="teachingguideModuleLabel">Teaching guide</string>
<string name="assessmentModuleLabel">Assessment</string>
<string name="informationProgressDescription">Getting information…\nWait, please…</string>
<string name="informationProgressTitle">Information</string>
Expand Down Expand Up @@ -349,4 +349,7 @@
<string name="NOTfrequent_users">There are no frequent users</string>
<string name="replyModuleLabel">Reply message</string>
<string name="primaryReceiver">Primary</string>
<string name="privacyPolicyURL" translatable="false">https://swadroid.wordpress.com/politica-de-proteccion-de-datos/</string>
<string name="privacyPolicyTitle">Privacy policy</string>
<string name="files">Files</string>
</resources>
5 changes: 5 additions & 0 deletions SWADroid/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
android:key="telegramPref"
android:summary="@string/telegramURL"
android:title="@string/telegramTitle" />
<Preference
android:defaultValue=""
android:key="privacyPolicyPref"
android:summary="@string/privacyPolicyURL"
android:title="@string/privacyPolicyTitle" />
</PreferenceCategory>

</PreferenceScreen>

0 comments on commit b25a772

Please sign in to comment.