diff options
author | Ta-wei Yen <twyen@google.com> | 2016-06-17 11:39:10 -0700 |
---|---|---|
committer | Ta-wei Yen <twyen@google.com> | 2016-06-17 19:03:06 +0000 |
commit | d0ce6136feb2037008550c3d43a78871a2882ddc (patch) | |
tree | c52cd4d6bf455457419dc9ce584f02b58b958d76 /src/com/android | |
parent | 6544228382736f5ff296b4f839234729ee79653c (diff) |
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
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/dialer/settings/DialerSettingsActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
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); |