From d0ce6136feb2037008550c3d43a78871a2882ddc Mon Sep 17 00:00:00 2001 From: Ta-wei Yen Date: Fri, 17 Jun 2016 11:39:10 -0700 Subject: Fix N checking Cherry pick to reflect code changes. The dialer in system image is using //vendor/unbundled_google/packages/PrebuiltGoogleDialer This was missed because it was not using ContactCommon compat library but directly using Build.VERSION.CODENAME. No other instances of Build.VERSION.CODENAME are found. Bug: 29420691 Change-Id: Ia01a0aa1d95014da4abc2873a67cc0905fe8eb5f --- src/com/android/dialer/settings/DialerSettingsActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com/android/dialer/settings') diff --git a/src/com/android/dialer/settings/DialerSettingsActivity.java b/src/com/android/dialer/settings/DialerSettingsActivity.java index 9db3e0564..fbdb4f9f5 100644 --- a/src/com/android/dialer/settings/DialerSettingsActivity.java +++ b/src/com/android/dialer/settings/DialerSettingsActivity.java @@ -22,6 +22,7 @@ import android.os.Bundle; import android.os.UserManager; import android.preference.PreferenceManager; import android.provider.Settings; +import android.support.v4.os.BuildCompat; import android.telecom.TelecomManager; import android.telephony.TelephonyManager; import android.view.MenuItem; @@ -97,7 +98,7 @@ public class DialerSettingsActivity extends AppCompatPreferenceActivity { callSettingsHeader.titleRes = R.string.call_settings_label; callSettingsHeader.intent = callSettingsIntent; target.add(callSettingsHeader); - } else if (android.os.Build.VERSION.CODENAME.startsWith("N") || isPrimaryUser) { + } else if (BuildCompat.isAtLeastN() || isPrimaryUser) { Header phoneAccountSettingsHeader = new Header(); Intent phoneAccountSettingsIntent = new Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS); -- cgit v1.2.3