Browse Source

Version 2.2.1

master v2.2.1
Ezerous 5 months ago
parent
commit
1d6964d339
  1. 2
      README.md
  2. 6
      app/build.gradle
  3. 18
      app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

2
README.md

@ -7,7 +7,7 @@
![mTHMMY logo](app/src/main/res/mipmap-xhdpi/ic_launcher_round.png)
A mobile app for [thmmy.gr](https://www.thmmy.gr).
The mobile app of [thmmy.gr](https://www.thmmy.gr).
## Requirements

6
app/build.gradle

@ -7,14 +7,14 @@ apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 33
defaultConfig {
applicationId "gr.thmmy.mthmmy"
compileSdk 33
minSdkVersion 23
targetSdkVersion 33
versionCode 32
versionName "2.2.0"
versionCode 33
versionName "2.2.1"
archivesBaseName = "mTHMMY-v$versionName"
buildConfigField "String", "CURRENT_BRANCH", "\"" + getCurrentBranch() + "\""
buildConfigField "String", "COMMIT_HASH", "\"" + getCommitHash() + "\""

18
app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

@ -18,7 +18,9 @@ import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
@ -695,12 +697,15 @@ public abstract class BaseActivity extends AppCompatActivity {
//True if permissions are OK
protected boolean checkPerms() {
Timber.i("Checking storage permissions.");
String[] PERMISSIONS_STORAGE = {
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE};
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU){
String[] PERMISSIONS_STORAGE = {
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE};
return !(checkSelfPermission(PERMISSIONS_STORAGE[0]) == PackageManager.PERMISSION_DENIED ||
checkSelfPermission(PERMISSIONS_STORAGE[1]) == PackageManager.PERMISSION_DENIED);
return !(checkSelfPermission(PERMISSIONS_STORAGE[0]) == PackageManager.PERMISSION_DENIED ||
checkSelfPermission(PERMISSIONS_STORAGE[1]) == PackageManager.PERMISSION_DENIED);
}
return true;
}
//Display popup for user to grant permission
@ -735,7 +740,8 @@ public abstract class BaseActivity extends AppCompatActivity {
prepareDownload(thmmyFile);
else {
tempThmmyFile = thmmyFile;
requestPerms(DOWNLOAD_REQUEST_CODE);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU)
requestPerms(DOWNLOAD_REQUEST_CODE);
}
}

Loading…
Cancel
Save