1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 22:31:16 +00:00

Merge pull request #780 from Unrud/npe

Fix NPEs
This commit is contained in:
Felix Ableitner 2016-11-06 14:23:08 +09:00 committed by GitHub
commit 8d6ce42297
3 changed files with 7 additions and 3 deletions

View file

@ -38,8 +38,10 @@ public class DeviceListFragment extends ListFragment implements SyncthingService
@Override
public void onPause() {
super.onPause();
if (mTimer != null) {
mTimer.cancel();
}
}
@Override
public void onApiChange(SyncthingService.State currentState) {

View file

@ -138,7 +138,7 @@ public class FolderFragment extends Fragment
@Override
public void onClick(View v) {
Intent intent = new Intent(getActivity(), FolderPickerActivity.class);
if (mFolder.path.length() > 0) {
if (!TextUtils.isEmpty(mFolder.path)) {
intent.putExtra(FolderPickerActivity.EXTRA_INITIAL_DIRECTORY, mFolder.path);
}
startActivityForResult(intent, DIRECTORY_REQUEST_CODE);

View file

@ -46,8 +46,10 @@ public class FolderListFragment extends ListFragment implements SyncthingService
@Override
public void onPause() {
super.onPause();
if (mTimer != null) {
mTimer.cancel();
}
}
@Override
public void onApiChange(SyncthingService.State currentState) {