From 088b0e716a98841e8530288bf38041eccad18082 Mon Sep 17 00:00:00 2001 From: twyen Date: Mon, 10 Jul 2017 14:13:59 -0700 Subject: Remove Assert(isAtLeastO) in LegacyVoicemailNotificaitonReceiver OC preview devices are hitting the assert and skewing crash rate numbers. Bug: 62338925 Test: LegacyVoicemailNotificaitonReceiverTest PiperOrigin-RevId: 161438516 Change-Id: Ib533947d2cd9e9a87ffd9fb629f09f877f683026 --- .../app/voicemail/LegacyVoicemailNotificationReceiver.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'java/com/android/dialer/app') diff --git a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java index b86ce8229..4100521ab 100644 --- a/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java +++ b/java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java @@ -21,6 +21,7 @@ import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; +import android.os.Build; import android.os.Build.VERSION_CODES; import android.preference.PreferenceManager; import android.support.v4.os.BuildCompat; @@ -56,7 +57,17 @@ public class LegacyVoicemailNotificationReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { LogUtil.i( "LegacyVoicemailNotificationReceiver.onReceive", "received legacy voicemail notification"); - Assert.checkArgument(BuildCompat.isAtLeastO()); + if (!BuildCompat.isAtLeastO()) { + LogUtil.e( + "LegacyVoicemailNotificationReceiver.onReceive", + "SDK not finalized: SDK_INT=" + + Build.VERSION.SDK_INT + + ", PREVIEW_SDK_INT=" + + Build.VERSION.PREVIEW_SDK_INT + + ", RELEASE=" + + Build.VERSION.RELEASE); + return; + } PhoneAccountHandle phoneAccountHandle = Assert.isNotNull(intent.getParcelableExtra(TelephonyManager.EXTRA_PHONE_ACCOUNT_HANDLE)); -- cgit v1.2.3