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/voicemail/impl/fetch/VoicemailFetchedCallback.java | |
parent | fc81a030a7b4f6d4a497f71aed593d398795e7da (diff) | |
parent | 183cb71663320f16149d83eeebaff7795a4b55f2 (diff) |
Merge "Remove field prefixes."
Diffstat (limited to 'java/com/android/voicemail/impl/fetch/VoicemailFetchedCallback.java')
-rw-r--r-- | java/com/android/voicemail/impl/fetch/VoicemailFetchedCallback.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/java/com/android/voicemail/impl/fetch/VoicemailFetchedCallback.java b/java/com/android/voicemail/impl/fetch/VoicemailFetchedCallback.java index e8e14bedb..78dbdc06f 100644 --- a/java/com/android/voicemail/impl/fetch/VoicemailFetchedCallback.java +++ b/java/com/android/voicemail/impl/fetch/VoicemailFetchedCallback.java @@ -40,16 +40,16 @@ import org.apache.commons.io.IOUtils; public class VoicemailFetchedCallback { private static final String TAG = "VoicemailFetchedCallback"; - private final Context mContext; - private final ContentResolver mContentResolver; - private final Uri mUri; - private final PhoneAccountHandle mPhoneAccountHandle; + private final Context context; + private final ContentResolver contentResolver; + private final Uri uri; + private final PhoneAccountHandle phoneAccountHandle; public VoicemailFetchedCallback(Context context, Uri uri, PhoneAccountHandle phoneAccountHandle) { - mContext = context; - mContentResolver = context.getContentResolver(); - mUri = uri; - mPhoneAccountHandle = phoneAccountHandle; + this.context = context; + contentResolver = context.getContentResolver(); + this.uri = uri; + this.phoneAccountHandle = phoneAccountHandle; } /** @@ -65,26 +65,26 @@ public class VoicemailFetchedCallback { ContentValues values = new ContentValues(); values.put( Voicemails.TRANSCRIPTION, - mContext.getString( + context.getString( R.string.vvm_unsupported_message_format, - mContext + context .getSystemService(TelecomManager.class) - .getVoiceMailNumber(mPhoneAccountHandle))); + .getVoiceMailNumber(phoneAccountHandle))); updateVoicemail(values); return; } - VvmLog.d(TAG, String.format("Writing new voicemail content: %s", mUri)); + VvmLog.d(TAG, String.format("Writing new voicemail content: %s", uri)); OutputStream outputStream = null; try { - outputStream = mContentResolver.openOutputStream(mUri); + outputStream = contentResolver.openOutputStream(uri); byte[] inputBytes = voicemailPayload.getBytes(); if (inputBytes != null) { outputStream.write(inputBytes); } } catch (IOException e) { - VvmLog.w(TAG, String.format("File not found for %s", mUri)); + VvmLog.w(TAG, String.format("File not found for %s", uri)); return; } finally { IOUtils.closeQuietly(outputStream); @@ -98,15 +98,15 @@ public class VoicemailFetchedCallback { ThreadUtil.postOnUiThread( () -> { if (!TranscriptionService.scheduleNewVoicemailTranscriptionJob( - mContext, mUri, mPhoneAccountHandle, true)) { - VvmLog.w(TAG, String.format("Failed to schedule transcription for %s", mUri)); + context, uri, phoneAccountHandle, true)) { + VvmLog.w(TAG, String.format("Failed to schedule transcription for %s", uri)); } }); } } private boolean updateVoicemail(ContentValues values) { - int updatedCount = mContentResolver.update(mUri, values, null, null); + int updatedCount = contentResolver.update(uri, values, null, null); if (updatedCount != 1) { VvmLog.e(TAG, "Updating voicemail should have updated 1 row, was: " + updatedCount); return false; |