summaryrefslogtreecommitdiff
path: root/java/com/android/voicemail
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2018-06-28 20:13:52 -0700
committerCopybara-Service <copybara-piper@google.com>2018-06-28 20:14:43 -0700
commit60c1e5732085d36bdf5b49055add832222c75839 (patch)
tree4b18ade57cdb2100cbd4acec0a1d42163b3c21ef /java/com/android/voicemail
parente479c7d417573ac142b336c904ce0643e010f7dd (diff)
Remove redundant @TargetApi, @RequiresApi and @SuppressWarnings
Test: Existing tests PiperOrigin-RevId: 202589482 Change-Id: I6982e4069d30032bf46caf3c9984dfc0e7196f6f
Diffstat (limited to 'java/com/android/voicemail')
-rw-r--r--java/com/android/voicemail/impl/CarrierIdentifier.java2
-rw-r--r--java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java2
-rw-r--r--java/com/android/voicemail/impl/PackageReplacedReceiver.java2
-rw-r--r--java/com/android/voicemail/impl/VvmPackageInstallHandler.java2
-rw-r--r--java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java2
-rw-r--r--java/com/android/voicemail/impl/sms/StatusSmsFetcher.java1
-rw-r--r--java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java3
-rw-r--r--java/com/android/voicemail/impl/sync/VvmNetworkRequest.java1
-rw-r--r--java/com/android/voicemail/impl/transcribe/TranscriptionUtils.java2
9 files changed, 3 insertions, 14 deletions
diff --git a/java/com/android/voicemail/impl/CarrierIdentifier.java b/java/com/android/voicemail/impl/CarrierIdentifier.java
index 76576e7ad..7788b7d66 100644
--- a/java/com/android/voicemail/impl/CarrierIdentifier.java
+++ b/java/com/android/voicemail/impl/CarrierIdentifier.java
@@ -28,7 +28,7 @@ import java.util.Optional;
/** Identifies a carrier. */
@AutoValue
@TargetApi(VERSION_CODES.O)
-@SuppressWarnings({"missingpermission", "AndroidApiChecker"})
+@SuppressWarnings({"missingpermission"})
public abstract class CarrierIdentifier {
public abstract String mccMnc();
diff --git a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
index 5185b8fd4..e5263f497 100644
--- a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
+++ b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
@@ -56,7 +56,7 @@ import java.util.Set;
* <p>TODO(twyen): refactor this to an interface.
*/
@TargetApi(VERSION_CODES.O)
-@SuppressWarnings({"missingpermission", "AndroidApiChecker"})
+@SuppressWarnings({"missingpermission"})
public class OmtpVvmCarrierConfigHelper {
private static final String TAG = "OmtpVvmCarrierCfgHlpr";
diff --git a/java/com/android/voicemail/impl/PackageReplacedReceiver.java b/java/com/android/voicemail/impl/PackageReplacedReceiver.java
index 9fa9f75c7..c60fbe722 100644
--- a/java/com/android/voicemail/impl/PackageReplacedReceiver.java
+++ b/java/com/android/voicemail/impl/PackageReplacedReceiver.java
@@ -16,7 +16,6 @@
package com.android.voicemail.impl;
-import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -91,7 +90,6 @@ public class PackageReplacedReceiver extends BroadcastReceiver {
this.context = context;
}
- @TargetApi(android.os.Build.VERSION_CODES.N) // used for try with resources
@Override
public Void doInBackground(Void arg) throws Throwable {
LogUtil.i("PackageReplacedReceiver.ExistingVoicemailCheck.doInBackground", "");
diff --git a/java/com/android/voicemail/impl/VvmPackageInstallHandler.java b/java/com/android/voicemail/impl/VvmPackageInstallHandler.java
index 276b7889a..ee8b722de 100644
--- a/java/com/android/voicemail/impl/VvmPackageInstallHandler.java
+++ b/java/com/android/voicemail/impl/VvmPackageInstallHandler.java
@@ -16,7 +16,6 @@
package com.android.voicemail.impl;
-import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build.VERSION_CODES;
@@ -34,7 +33,6 @@ import com.android.voicemail.impl.settings.VisualVoicemailSettingsUtil;
* when a VVM SMS is received instead, as it can be a result of the carrier VVM app trying to run
* activation.
*/
-@SuppressLint("AndroidApiChecker") // forEach
@TargetApi(VERSION_CODES.O)
public final class VvmPackageInstallHandler {
diff --git a/java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java b/java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java
index aa2886812..66071609c 100644
--- a/java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java
+++ b/java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java
@@ -32,7 +32,7 @@ import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Map;
-@SuppressWarnings("AndroidApiChecker") // Map.getOrDefault() is java8
+/** Utilities for DIGEST-MD5. */
@TargetApi(VERSION_CODES.O)
public class DigestMd5Utils {
diff --git a/java/com/android/voicemail/impl/sms/StatusSmsFetcher.java b/java/com/android/voicemail/impl/sms/StatusSmsFetcher.java
index 73e0c7f3c..7ddf64607 100644
--- a/java/com/android/voicemail/impl/sms/StatusSmsFetcher.java
+++ b/java/com/android/voicemail/impl/sms/StatusSmsFetcher.java
@@ -46,7 +46,6 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
/** Intercepts a incoming STATUS SMS with a blocking call. */
-@SuppressWarnings("AndroidApiChecker") /* CompletableFuture is java8*/
@TargetApi(VERSION_CODES.O)
public class StatusSmsFetcher extends BroadcastReceiver implements Closeable {
diff --git a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
index be11c4453..d0c2ccf47 100644
--- a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
+++ b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
@@ -15,14 +15,12 @@
*/
package com.android.voicemail.impl.sync;
-import android.annotation.TargetApi;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
-import android.os.Build.VERSION_CODES;
import android.provider.VoicemailContract;
import android.provider.VoicemailContract.Voicemails;
import android.support.annotation.NonNull;
@@ -256,7 +254,6 @@ public class VoicemailsQueryHelper {
}
/** Find the oldest voicemails that are on the device, and also on the server. */
- @TargetApi(VERSION_CODES.N) // used for try with resources
public List<Voicemail> oldestVoicemailsOnServer(int numVoicemails) {
if (numVoicemails <= 0) {
Assert.fail("Query for remote voicemails cannot be <= 0");
diff --git a/java/com/android/voicemail/impl/sync/VvmNetworkRequest.java b/java/com/android/voicemail/impl/sync/VvmNetworkRequest.java
index e7517363c..86d645215 100644
--- a/java/com/android/voicemail/impl/sync/VvmNetworkRequest.java
+++ b/java/com/android/voicemail/impl/sync/VvmNetworkRequest.java
@@ -33,7 +33,6 @@ import java.util.concurrent.Future;
* Class to retrieve a {@link Network} synchronously. {@link #getNetwork(OmtpVvmCarrierConfigHelper,
* PhoneAccountHandle)} will block until a suitable network is retrieved or it has failed.
*/
-@SuppressWarnings("AndroidApiChecker") /* CompletableFuture is java8*/
@TargetApi(VERSION_CODES.O)
public class VvmNetworkRequest {
diff --git a/java/com/android/voicemail/impl/transcribe/TranscriptionUtils.java b/java/com/android/voicemail/impl/transcribe/TranscriptionUtils.java
index d8c00ed91..8611e8022 100644
--- a/java/com/android/voicemail/impl/transcribe/TranscriptionUtils.java
+++ b/java/com/android/voicemail/impl/transcribe/TranscriptionUtils.java
@@ -33,8 +33,6 @@ import java.security.NoSuchAlgorithmException;
public class TranscriptionUtils {
static final String AMR_PREFIX = "#!AMR\n";
- // Uses try-with-resource
- @TargetApi(android.os.Build.VERSION_CODES.N)
static ByteString getAudioData(Context context, Uri voicemailUri) {
try (InputStream in = context.getContentResolver().openInputStream(voicemailUri)) {
return ByteString.readFrom(in);