Merge branch 'audiorecorder-1.1.19'

This commit is contained in:
Alexey Kuznetsov 2016-03-28 12:08:31 +03:00
commit ae89f7b996
3 changed files with 7 additions and 7 deletions

View file

@ -8,8 +8,8 @@ android {
applicationId "com.github.axet.audiorecorder"
minSdkVersion 16
targetSdkVersion 23
versionCode 39
versionName "1.1.18"
versionCode 40
versionName "1.1.19"
}
signingConfigs {
release {

View file

@ -664,7 +664,7 @@ public class MainActivity extends AppCompatActivity implements AbsListView.OnScr
}
void updateHeader() {
File f = storage.getTempRecording();
File f = storage.getStoragePath();
long free = storage.getFree(f);
long sec = storage.average(free);

View file

@ -232,8 +232,11 @@ public class Storage {
public File getTempRecording() {
File internal = new File(context.getApplicationInfo().dataDir, TMP_REC);
if (internal.exists())
return internal;
// Starting in KITKAT, no permissions are required to read or write to the returned path;
// it's always accessible to the calling app
// it's always accessible to the calling app.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
if (!permitted(PERMISSIONS))
return internal;
@ -241,9 +244,6 @@ public class Storage {
File external = new File(context.getExternalCacheDir(), TMP_REC);
if (internal.exists())
return internal;
if (external.exists())
return external;