1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-29 15:51:17 +00:00

Fallback to built-in path selector (fixes #111) (#112)

* Fallback to built-in path selector (fixes #111)

* Update APK version to 0.14.51.11 / 4174
This commit is contained in:
Catfriend1 2018-10-25 16:20:23 +02:00 committed by GitHub
parent 334f24f027
commit 6712ca657d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -36,8 +36,8 @@ android {
applicationId "com.github.catfriend1.syncthingandroid"
minSdkVersion 16
targetSdkVersion 26
versionCode 4173
versionName "0.14.51.10"
versionCode 4174
versionName "0.14.51.11"
testApplicationId 'com.github.catfriend1.syncthingandroid.test'
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
playAccountConfig = playAccountConfigs.defaultAccountConfig

View file

@ -257,7 +257,13 @@ public class FolderActivity extends SyncthingActivity
}
intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
intent.putExtra("android.content.extra.SHOW_ADVANCED", true);
startActivityForResult(intent, CHOOSE_FOLDER_REQUEST);
try {
startActivityForResult(intent, CHOOSE_FOLDER_REQUEST);
} catch (android.content.ActivityNotFoundException e) {
Log.e(TAG, "onPathViewClick exception, falling back to built-in FolderPickerActivity.", e);
startActivityForResult(FolderPickerActivity.createIntent(this, mFolder.path, null),
FolderPickerActivity.DIRECTORY_REQUEST_CODE);
}
}
/**