Merge branch 'audiorecorder-3.0.48'
This commit is contained in:
commit
38959b8d15
2 changed files with 11 additions and 19 deletions
|
|
@ -9,9 +9,9 @@ android {
|
|||
defaultConfig {
|
||||
applicationId "com.github.axet.audiorecorder"
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 25
|
||||
versionCode 213
|
||||
versionName "3.0.47"
|
||||
targetSdkVersion 24 // 25+ file:// unable to open
|
||||
versionCode 214
|
||||
versionName "3.0.48"
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
|
|
@ -55,5 +55,5 @@ android {
|
|||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
testCompile 'junit:junit:4.12'
|
||||
compile 'com.github.axet:android-audio-library:1.0.50' // compile project(':android-audio-library')
|
||||
compile 'com.github.axet:android-audio-library:1.0.51' // compile project(':android-audio-library')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,10 @@ import android.widget.TextView;
|
|||
import android.widget.Toast;
|
||||
|
||||
import com.github.axet.androidlibrary.widgets.AboutPreferenceCompat;
|
||||
import com.github.axet.androidlibrary.widgets.OptimizationPreferenceCompat;
|
||||
import com.github.axet.audiolibrary.app.Recordings;
|
||||
import com.github.axet.audiolibrary.app.Storage;
|
||||
import com.github.axet.audiolibrary.services.RecordingContentProvider;
|
||||
import com.github.axet.audiorecorder.R;
|
||||
import com.github.axet.audiorecorder.app.MainApplication;
|
||||
import com.github.axet.audiorecorder.services.RecordingService;
|
||||
|
|
@ -138,13 +140,6 @@ public class MainActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
|
||||
Intent showIntent() {
|
||||
Uri selectedUri = storage.getStoragePath();
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(selectedUri, "resource/folder");
|
||||
return intent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
|
|
@ -152,8 +147,9 @@ public class MainActivity extends AppCompatActivity {
|
|||
getMenuInflater().inflate(R.menu.menu_main, menu);
|
||||
|
||||
MenuItem item = menu.findItem(R.id.action_show_folder);
|
||||
Intent intent = showIntent();
|
||||
if (intent.resolveActivityInfo(getPackageManager(), 0) == null) {
|
||||
Intent intent = Storage.openFolderIntent(this, storage.getStoragePath(), null);
|
||||
item.setIntent(intent);
|
||||
if (Storage.isFolderCallable(this, intent, RecordingContentProvider.getAuthority())) {
|
||||
item.setVisible(false);
|
||||
}
|
||||
|
||||
|
|
@ -179,12 +175,8 @@ public class MainActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
if (id == R.id.action_show_folder) {
|
||||
Intent intent = showIntent();
|
||||
if (intent.resolveActivityInfo(getPackageManager(), 0) != null) {
|
||||
startActivity(intent);
|
||||
} else {
|
||||
Toast.makeText(this, R.string.no_folder_app, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Intent intent = item.getIntent();
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue