diff options
author | twyen <twyen@google.com> | 2017-07-10 14:13:59 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-07-11 07:58:32 -0700 |
commit | 088b0e716a98841e8530288bf38041eccad18082 (patch) | |
tree | 9276aed99e6e1390dba33deaf76239b4ea5aea9a | |
parent | 9ef68bd518def395a5b9cbc8b8d4646c9d27e8d6 (diff) |
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
-rw-r--r-- | java/com/android/dialer/app/voicemail/LegacyVoicemailNotificationReceiver.java | 13 |
1 files changed, 12 insertions, 1 deletions
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)); |