mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-30 08:11:17 +00:00
Fix NPEs
This commit is contained in:
parent
57a8d270e1
commit
3c78c67817
3 changed files with 7 additions and 3 deletions
|
@ -38,8 +38,10 @@ public class DeviceListFragment extends ListFragment implements SyncthingService
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
if (mTimer != null) {
|
||||||
mTimer.cancel();
|
mTimer.cancel();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApiChange(SyncthingService.State currentState) {
|
public void onApiChange(SyncthingService.State currentState) {
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class FolderFragment extends Fragment
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent intent = new Intent(getActivity(), FolderPickerActivity.class);
|
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);
|
intent.putExtra(FolderPickerActivity.EXTRA_INITIAL_DIRECTORY, mFolder.path);
|
||||||
}
|
}
|
||||||
startActivityForResult(intent, DIRECTORY_REQUEST_CODE);
|
startActivityForResult(intent, DIRECTORY_REQUEST_CODE);
|
||||||
|
|
|
@ -46,8 +46,10 @@ public class FolderListFragment extends ListFragment implements SyncthingService
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
if (mTimer != null) {
|
||||||
mTimer.cancel();
|
mTimer.cancel();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApiChange(SyncthingService.State currentState) {
|
public void onApiChange(SyncthingService.State currentState) {
|
||||||
|
|
Loading…
Reference in a new issue