summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/calllocation
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2017-12-27 17:02:37 -0800
committerCopybara-Service <copybara-piper@google.com>2017-12-27 17:03:47 -0800
commit183cb71663320f16149d83eeebaff7795a4b55f2 (patch)
treebc8bfcce809257b3ddbb423a9808082292b9f6a3 /java/com/android/incallui/calllocation
parentfc81a030a7b4f6d4a497f71aed593d398795e7da (diff)
Remove field prefixes.
Test: Existing tests PiperOrigin-RevId: 180230450 Change-Id: I0b2589cfeeaef81e42a04efa48af24b4e4d0e95f
Diffstat (limited to 'java/com/android/incallui/calllocation')
-rw-r--r--java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java8
-rw-r--r--java/com/android/incallui/calllocation/impl/HttpFetcher.java12
-rw-r--r--java/com/android/incallui/calllocation/impl/LocationPresenter.java24
-rw-r--r--java/com/android/incallui/calllocation/impl/ReverseGeocodeTask.java8
4 files changed, 25 insertions, 27 deletions
diff --git a/java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java b/java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java
index 035f5cdac..c7249e0fa 100644
--- a/java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java
+++ b/java/com/android/incallui/calllocation/impl/DownloadMapImageTask.java
@@ -31,15 +31,15 @@ class DownloadMapImageTask extends AsyncTask<Location, Void, Drawable> {
private static final String STATIC_MAP_SRC_NAME = "src";
- private final WeakReference<LocationUi> mUiReference;
+ private final WeakReference<LocationUi> uiReference;
public DownloadMapImageTask(WeakReference<LocationUi> uiReference) {
- mUiReference = uiReference;
+ this.uiReference = uiReference;
}
@Override
protected Drawable doInBackground(Location... locations) {
- LocationUi ui = mUiReference.get();
+ LocationUi ui = uiReference.get();
if (ui == null) {
return null;
}
@@ -64,7 +64,7 @@ class DownloadMapImageTask extends AsyncTask<Location, Void, Drawable> {
@Override
protected void onPostExecute(Drawable mapImage) {
- LocationUi ui = mUiReference.get();
+ LocationUi ui = uiReference.get();
if (ui == null) {
return;
}
diff --git a/java/com/android/incallui/calllocation/impl/HttpFetcher.java b/java/com/android/incallui/calllocation/impl/HttpFetcher.java
index 10cc34d25..c182fa156 100644
--- a/java/com/android/incallui/calllocation/impl/HttpFetcher.java
+++ b/java/com/android/incallui/calllocation/impl/HttpFetcher.java
@@ -222,8 +222,6 @@ public class HttpFetcher {
/**
* Lookup up url re-write rules from gServices and apply to the given url.
*
-
- *
* @return The new url.
*/
private static URL reWriteUrl(Context context, String url) {
@@ -267,21 +265,21 @@ public class HttpFetcher {
/** Disconnect {@link HttpURLConnection} when InputStream is closed */
private static class HttpInputStreamWrapper extends FilterInputStream {
- final HttpURLConnection mHttpUrlConnection;
- final long mStartMillis = SystemClock.uptimeMillis();
+ final HttpURLConnection httpUrlConnection;
+ final long startMillis = SystemClock.uptimeMillis();
public HttpInputStreamWrapper(HttpURLConnection conn, InputStream in) {
super(in);
- mHttpUrlConnection = conn;
+ httpUrlConnection = conn;
}
@Override
public void close() throws IOException {
super.close();
- mHttpUrlConnection.disconnect();
+ httpUrlConnection.disconnect();
if (LogUtil.isDebugEnabled()) {
long endMillis = SystemClock.uptimeMillis();
- LogUtil.i("HttpFetcher.close", "fetch took " + (endMillis - mStartMillis) + " ms");
+ LogUtil.i("HttpFetcher.close", "fetch took " + (endMillis - startMillis) + " ms");
}
}
}
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 {
diff --git a/java/com/android/incallui/calllocation/impl/ReverseGeocodeTask.java b/java/com/android/incallui/calllocation/impl/ReverseGeocodeTask.java
index 060ec0b4f..f4592d4c8 100644
--- a/java/com/android/incallui/calllocation/impl/ReverseGeocodeTask.java
+++ b/java/com/android/incallui/calllocation/impl/ReverseGeocodeTask.java
@@ -39,15 +39,15 @@ class ReverseGeocodeTask extends AsyncTask<Location, Void, String> {
private static final String JSON_KEY_LONG_NAME = "long_name";
private static final String JSON_KEY_SHORT_NAME = "short_name";
- private WeakReference<LocationUi> mUiReference;
+ private WeakReference<LocationUi> uiReference;
public ReverseGeocodeTask(WeakReference<LocationUi> uiReference) {
- mUiReference = uiReference;
+ this.uiReference = uiReference;
}
@Override
protected String doInBackground(Location... locations) {
- LocationUi ui = mUiReference.get();
+ LocationUi ui = uiReference.get();
if (ui == null) {
return null;
}
@@ -131,7 +131,7 @@ class ReverseGeocodeTask extends AsyncTask<Location, Void, String> {
@Override
protected void onPostExecute(String address) {
- LocationUi ui = mUiReference.get();
+ LocationUi ui = uiReference.get();
if (ui == null) {
return;
}