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

Initialize mFolder.type to FOLDER_TYPE_SEND_RECEIVE

according to the switch element having android:checked=false
by default in the xml layout.
This commit is contained in:
Catfriend1 2018-07-26 10:23:16 +02:00
parent 9382685fc9
commit aad57de03d

View file

@ -436,17 +436,8 @@ public class FolderActivity extends SyncthingActivity
return true;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
mFolderUri != null) {
if (mFolder == null) {
Log.e(TAG, "mFolder == null");
}
if (mFolder.type == null) {
Log.e(TAG, "mFolder.type == null");
}
if (mFolder.type.equals(Constants.FOLDER_TYPE_SEND_ONLY)) {
Log.e(TAG, "mFolder.type == Constants.FOLDER_TYPE_SEND_ONLY");
}
mFolderUri != null &&
mFolder.type.equals(Constants.FOLDER_TYPE_SEND_ONLY)) {
/**
* Normally, syncthing takes care of creating the ".stfolder" marker.
* This fails on newer android versions if the syncthing binary only has
@ -595,6 +586,7 @@ public class FolderActivity extends SyncthingActivity
*/
mFolder.rescanIntervalS = 3600;
mFolder.paused = false;
mFolder.type = Constants.FOLDER_TYPE_SEND_RECEIVE;
mFolder.versioning = new Folder.Versioning();
}