diff options
| author | Roozbeh Pournader <roozbeh@google.com> | 2017-09-21 12:54:55 -0700 |
|---|---|---|
| committer | Roozbeh Pournader <roozbeh@google.com> | 2017-09-21 12:54:55 -0700 |
| commit | 60f555cca8e8eef088bcf4aff066e93f0f8eb4f9 (patch) | |
| tree | 34241372540c2d90f320e67a3dfb0d45007fe1bc /core/java | |
| parent | e21e491f0ec7c80fe9f935485cedfd13565727bd (diff) | |
Switch version gate for fallback linespacing to P
Previously, no version was defined for Android P. Now that
I0a90033239081c583b10021cbc06d032e206beb4 defines it, we can switch
the version gate on the new fallback-based linespacing behavior of
TextView and Switch to it.
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.SwitchTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Id68ea4b26baa8a632d9f516083a73a0b8879513f
Fixes: 64648475
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/widget/Switch.java | 5 | ||||
| -rw-r--r-- | core/java/android/widget/TextView.java | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java index 2e1e96365f2a..604575fae463 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -248,10 +248,7 @@ public class Switch extends CompoundButton { com.android.internal.R.styleable.Switch_switchPadding, 0); mSplitTrack = a.getBoolean(com.android.internal.R.styleable.Switch_splitTrack, false); - // TODO: replace CUR_DEVELOPMENT with P once P is added to android.os.Build.VERSION_CODES. - // STOPSHIP if the above TODO is not done. - mUseFallbackLineSpacing = - context.getApplicationInfo().targetSdkVersion >= VERSION_CODES.CUR_DEVELOPMENT; + mUseFallbackLineSpacing = context.getApplicationInfo().targetSdkVersion >= VERSION_CODES.P; ColorStateList thumbTintList = a.getColorStateList( com.android.internal.R.styleable.Switch_thumbTint); diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index efcc3a2f7a2b..97a666167f9a 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -1256,9 +1256,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final int targetSdkVersion = context.getApplicationInfo().targetSdkVersion; mUseInternationalizedInput = targetSdkVersion >= VERSION_CODES.O; - // TODO: replace CUR_DEVELOPMENT with P once P is added to android.os.Build.VERSION_CODES. - // STOPSHIP if the above TODO is not done. - mUseFallbackLineSpacing = targetSdkVersion >= VERSION_CODES.CUR_DEVELOPMENT; + mUseFallbackLineSpacing = targetSdkVersion >= VERSION_CODES.P; if (inputMethod != null) { Class<?> c; |
