summaryrefslogtreecommitdiff
path: root/java/com/android/voicemail/impl/protocol
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/voicemail/impl/protocol
parentfc81a030a7b4f6d4a497f71aed593d398795e7da (diff)
Remove field prefixes.
Test: Existing tests PiperOrigin-RevId: 180230450 Change-Id: I0b2589cfeeaef81e42a04efa48af24b4e4d0e95f
Diffstat (limited to 'java/com/android/voicemail/impl/protocol')
-rw-r--r--java/com/android/voicemail/impl/protocol/Vvm3Subscriber.java68
1 files changed, 34 insertions, 34 deletions
diff --git a/java/com/android/voicemail/impl/protocol/Vvm3Subscriber.java b/java/com/android/voicemail/impl/protocol/Vvm3Subscriber.java
index d9a06494e..ce5094f1a 100644
--- a/java/com/android/voicemail/impl/protocol/Vvm3Subscriber.java
+++ b/java/com/android/voicemail/impl/protocol/Vvm3Subscriber.java
@@ -131,15 +131,15 @@ public class Vvm3Subscriber {
private static final int REQUEST_TIMEOUT_SECONDS = 30;
- private final ActivationTask mTask;
- private final PhoneAccountHandle mHandle;
- private final OmtpVvmCarrierConfigHelper mHelper;
- private final VoicemailStatus.Editor mStatus;
- private final Bundle mData;
+ private final ActivationTask task;
+ private final PhoneAccountHandle handle;
+ private final OmtpVvmCarrierConfigHelper helper;
+ private final VoicemailStatus.Editor status;
+ private final Bundle data;
- private final String mNumber;
+ private final String number;
- private RequestQueue mRequestQueue;
+ private RequestQueue requestQueue;
@VisibleForTesting
static class ProvisioningException extends Exception {
@@ -166,19 +166,19 @@ public class Vvm3Subscriber {
VoicemailStatus.Editor status,
Bundle data) {
Assert.isNotMainThread();
- mTask = task;
- mHandle = handle;
- mHelper = helper;
- mStatus = status;
- mData = data;
+ this.task = task;
+ this.handle = handle;
+ this.helper = helper;
+ this.status = status;
+ this.data = data;
// Assuming getLine1Number() will work with VVM3. For unprovisioned users the IMAP username
// is not included in the status SMS, thus no other way to get the current phone number.
- mNumber =
- mHelper
+ number =
+ this.helper
.getContext()
.getSystemService(TelephonyManager.class)
- .createForPhoneAccountHandle(mHandle)
+ .createForPhoneAccountHandle(this.handle)
.getLine1Number();
}
@@ -189,15 +189,15 @@ public class Vvm3Subscriber {
// processSubscription() is called after network is available.
VvmLog.i(TAG, "Subscribing");
- try (NetworkWrapper wrapper = VvmNetworkRequest.getNetwork(mHelper, mHandle, mStatus)) {
+ try (NetworkWrapper wrapper = VvmNetworkRequest.getNetwork(helper, handle, status)) {
Network network = wrapper.get();
VvmLog.d(TAG, "provisioning: network available");
- mRequestQueue =
- Volley.newRequestQueue(mHelper.getContext(), new NetworkSpecifiedHurlStack(network));
+ requestQueue =
+ Volley.newRequestQueue(helper.getContext(), new NetworkSpecifiedHurlStack(network));
processSubscription();
} catch (RequestFailedException e) {
- mHelper.handleEvent(mStatus, OmtpEvents.VVM3_VMG_CONNECTION_FAILED);
- mTask.fail();
+ helper.handleEvent(status, OmtpEvents.VVM3_VMG_CONNECTION_FAILED);
+ task.fail();
}
}
@@ -206,11 +206,11 @@ public class Vvm3Subscriber {
String gatewayUrl = getSelfProvisioningGateway();
String selfProvisionResponse = getSelfProvisionResponse(gatewayUrl);
String subscribeLink =
- findSubscribeLink(getSubscribeLinkPatterns(mHelper.getContext()), selfProvisionResponse);
+ findSubscribeLink(getSubscribeLinkPatterns(helper.getContext()), selfProvisionResponse);
clickSubscribeLink(subscribeLink);
} catch (ProvisioningException e) {
VvmLog.e(TAG, e.toString());
- mTask.fail();
+ task.fail();
}
}
@@ -236,7 +236,7 @@ public class Vvm3Subscriber {
@Override
protected Map<String, String> getParams() {
Map<String, String> params = new ArrayMap<>();
- params.put(SPG_VZW_MDN_PARAM, mNumber);
+ params.put(SPG_VZW_MDN_PARAM, number);
params.put(SPG_VZW_SERVICE_PARAM, SPG_VZW_SERVICE_BASIC);
params.put(SPG_DEVICE_MODEL_PARAM, SPG_DEVICE_MODEL_ANDROID);
params.put(SPG_APP_TOKEN_PARAM, SPG_APP_TOKEN);
@@ -247,11 +247,11 @@ public class Vvm3Subscriber {
}
};
- mRequestQueue.add(stringRequest);
+ requestQueue.add(stringRequest);
try {
return future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
} catch (InterruptedException | ExecutionException | TimeoutException e) {
- mHelper.handleEvent(mStatus, OmtpEvents.VVM3_SPG_CONNECTION_FAILED);
+ helper.handleEvent(status, OmtpEvents.VVM3_SPG_CONNECTION_FAILED);
throw new ProvisioningException(e.toString());
}
}
@@ -262,12 +262,12 @@ public class Vvm3Subscriber {
StringRequest stringRequest =
new StringRequest(Request.Method.POST, subscribeLink, future, future);
- mRequestQueue.add(stringRequest);
+ requestQueue.add(stringRequest);
try {
// A new STATUS SMS will be sent after this request.
future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
} catch (TimeoutException | ExecutionException | InterruptedException e) {
- mHelper.handleEvent(mStatus, OmtpEvents.VVM3_SPG_CONNECTION_FAILED);
+ helper.handleEvent(status, OmtpEvents.VVM3_SPG_CONNECTION_FAILED);
throw new ProvisioningException(e.toString());
}
// It could take very long for the STATUS SMS to return. Waiting for it is unreliable.
@@ -277,7 +277,7 @@ public class Vvm3Subscriber {
private String vvm3XmlRequest(String operation) throws ProvisioningException {
VvmLog.d(TAG, "Sending vvm3XmlRequest for " + operation);
- String voicemailManagementGateway = mData.getString(VMG_URL_KEY);
+ String voicemailManagementGateway = data.getString(VMG_URL_KEY);
if (voicemailManagementGateway == null) {
VvmLog.e(TAG, "voicemailManagementGateway url unknown");
return null;
@@ -285,7 +285,7 @@ public class Vvm3Subscriber {
String transactionId = createTransactionId();
String body =
String.format(
- Locale.US, VMG_XML_REQUEST_FORMAT, transactionId, mNumber, operation, Build.MODEL);
+ Locale.US, VMG_XML_REQUEST_FORMAT, transactionId, number, operation, Build.MODEL);
RequestFuture<String> future = RequestFuture.newFuture();
StringRequest stringRequest =
@@ -295,7 +295,7 @@ public class Vvm3Subscriber {
return body.getBytes();
}
};
- mRequestQueue.add(stringRequest);
+ requestQueue.add(stringRequest);
try {
String response = future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS);
@@ -304,7 +304,7 @@ public class Vvm3Subscriber {
}
return response;
} catch (InterruptedException | ExecutionException | TimeoutException e) {
- mHelper.handleEvent(mStatus, OmtpEvents.VVM3_VMG_CONNECTION_FAILED);
+ helper.handleEvent(status, OmtpEvents.VVM3_VMG_CONNECTION_FAILED);
throw new ProvisioningException(e.toString());
}
}
@@ -364,15 +364,15 @@ public class Vvm3Subscriber {
private static class NetworkSpecifiedHurlStack extends HurlStack {
- private final Network mNetwork;
+ private final Network network;
public NetworkSpecifiedHurlStack(Network network) {
- mNetwork = network;
+ this.network = network;
}
@Override
protected HttpURLConnection createConnection(URL url) throws IOException {
- return (HttpURLConnection) mNetwork.openConnection(url);
+ return (HttpURLConnection) network.openConnection(url);
}
}
}