diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-01 23:21:05 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-01 23:21:05 +1300 |
commit | 4cc8595e84fce7012a1836d06a5e3d5b18c07769 (patch) | |
tree | a6fa20caee83365e720f742413bc869003673c72 /app/src/main/java/org/traccar | |
parent | 1637915c21ce99fc1ea21d4549d28dbd86adfca8 (diff) | |
download | etbsa-traccar-manager-android-4cc8595e84fce7012a1836d06a5e3d5b18c07769.tar.gz etbsa-traccar-manager-android-4cc8595e84fce7012a1836d06a5e3d5b18c07769.tar.bz2 etbsa-traccar-manager-android-4cc8595e84fce7012a1836d06a5e3d5b18c07769.zip |
Check activity in callback
Diffstat (limited to 'app/src/main/java/org/traccar')
-rw-r--r-- | app/src/main/java/org/traccar/manager/StartFragment.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/src/main/java/org/traccar/manager/StartFragment.java b/app/src/main/java/org/traccar/manager/StartFragment.java index f56d7e8..c88c260 100644 --- a/app/src/main/java/org/traccar/manager/StartFragment.java +++ b/app/src/main/java/org/traccar/manager/StartFragment.java @@ -87,10 +87,12 @@ public class StartFragment extends Fragment implements View.OnClickListener { @Override protected void onPostExecute(Boolean result) { - if (result) { - onSuccess(); - } else { - onError(); + if (getActivity() != null) { + if (result) { + onSuccess(); + } else { + onError(); + } } } |