diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-28 02:35:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-28 02:35:07 +0000 |
commit | 281998c825ad48d842bb653e2f462719fdb0c1d9 (patch) | |
tree | bc8bfcce809257b3ddbb423a9808082292b9f6a3 /java/com/android/incallui/calllocation/impl/LocationPresenter.java | |
parent | fc81a030a7b4f6d4a497f71aed593d398795e7da (diff) | |
parent | 183cb71663320f16149d83eeebaff7795a4b55f2 (diff) |
Merge "Remove field prefixes."
Diffstat (limited to 'java/com/android/incallui/calllocation/impl/LocationPresenter.java')
-rw-r--r-- | java/com/android/incallui/calllocation/impl/LocationPresenter.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/java/com/android/incallui/calllocation/impl/LocationPresenter.java b/java/com/android/incallui/calllocation/impl/LocationPresenter.java index 1199308a5..83195baf8 100644 --- a/java/com/android/incallui/calllocation/impl/LocationPresenter.java +++ b/java/com/android/incallui/calllocation/impl/LocationPresenter.java @@ -37,9 +37,9 @@ import java.util.Objects; public class LocationPresenter extends Presenter<LocationPresenter.LocationUi> implements LocationListener { - private Location mLastLocation; - private AsyncTask mDownloadMapTask; - private AsyncTask mReverseGeocodeTask; + private Location lastLocation; + private AsyncTask downloadMapTask; + private AsyncTask reverseGeocodeTask; LocationPresenter() {} @@ -47,7 +47,7 @@ public class LocationPresenter extends Presenter<LocationPresenter.LocationUi> public void onUiReady(LocationUi ui) { LogUtil.i("LocationPresenter.onUiReady", ""); super.onUiReady(ui); - updateLocation(mLastLocation, true); + updateLocation(lastLocation, true); } @Override @@ -55,11 +55,11 @@ public class LocationPresenter extends Presenter<LocationPresenter.LocationUi> LogUtil.i("LocationPresenter.onUiUnready", ""); super.onUiUnready(ui); - if (mDownloadMapTask != null) { - mDownloadMapTask.cancel(true); + if (downloadMapTask != null) { + downloadMapTask.cancel(true); } - if (mReverseGeocodeTask != null) { - mReverseGeocodeTask.cancel(true); + if (reverseGeocodeTask != null) { + reverseGeocodeTask.cancel(true); } } @@ -71,13 +71,13 @@ public class LocationPresenter extends Presenter<LocationPresenter.LocationUi> private void updateLocation(Location location, boolean forceUpdate) { LogUtil.i("LocationPresenter.updateLocation", "location: " + location); - if (forceUpdate || !Objects.equals(mLastLocation, location)) { - mLastLocation = location; + if (forceUpdate || !Objects.equals(lastLocation, location)) { + lastLocation = location; int status = LocationHelper.checkLocation(location); LocationUi ui = getUi(); if (status == LocationHelper.LOCATION_STATUS_OK) { - mDownloadMapTask = new DownloadMapImageTask(new WeakReference<>(ui)).execute(location); - mReverseGeocodeTask = new ReverseGeocodeTask(new WeakReference<>(ui)).execute(location); + downloadMapTask = new DownloadMapImageTask(new WeakReference<>(ui)).execute(location); + reverseGeocodeTask = new ReverseGeocodeTask(new WeakReference<>(ui)).execute(location); if (ui != null) { ui.setLocation(location); } else { |