summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTa-wei Yen <twyen@google.com>2016-06-17 11:39:10 -0700
committerTa-wei Yen <twyen@google.com>2016-06-17 19:03:06 +0000
commitd0ce6136feb2037008550c3d43a78871a2882ddc (patch)
treec52cd4d6bf455457419dc9ce584f02b58b958d76
parent6544228382736f5ff296b4f839234729ee79653c (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
-rw-r--r--src/com/android/dialer/settings/DialerSettingsActivity.java3
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);