History log of /frameworks/base/core/java/android/widget/Switch.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b8c50e8e44bb757d18fc7f069332c186099aca77 14-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Text layout in switch may be null when accessibility events are fired.

1. The layout containing the text of a Switch is initialized on measure
and if an accessibility event is fired before that then a NPE happens.

bug:7169419

Change-Id: Iee3c01ca9157d14d228c4ff33c0810507e0e25a7
/frameworks/base/core/java/android/widget/Switch.java
be06e3292b295324b3b47d13f9a40787b666309f 12-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7148393 Switch can crash when hierarchyviewer is connected

Change-Id: I1713138a60358cc76f6cf373082a94199e85c717
/frameworks/base/core/java/android/widget/Switch.java
acbbd1142db522b15d06d6a1e076463e5c55c8b3 20-Aug-2012 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 4ea6a8eb to jb-mr1-dev

Change-Id: I51b1732011f31ea07087ef0898b47de8977074de
4ea6a8eb9fdf83f5327e6c8b65a3d5dac8075f8f 20-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am f515c6f4: Merge "Switch widget: Fix ON/OFF option update error"

* commit 'f515c6f4fe4457de1d5c49f78f9dcf6e4379e335':
Switch widget: Fix ON/OFF option update error
75bea2e8d35044233ba892bedf102ed08406d653 26-Jul-2012 Scott Main <smain@google.com> am 7c00f816: am 2f5b61a7: Merge "docs: fix a bunch of links from javadocs to api guides and add some attributes to Spinner and Switch" into jb-dev

* commit '7c00f81606de1880c3f28e54cea064c3b90da3e7':
docs: fix a bunch of links from javadocs to api guides and add some attributes to Spinner and Switch
4c359b76f9a030f92a302ba74a528faa170bad4e 25-Jul-2012 Scott Main <smain@google.com> docs: fix a bunch of links from javadocs to api guides
and add some attributes to Spinner and Switch

Change-Id: If015ad000c1a36e19904c132e98ebff1ceaf718b
/frameworks/base/core/java/android/widget/Switch.java
ca13b1562cedafb17a4f116fb521ed5388423755 11-Jul-2012 Yu Haonong <yuhaonong@gmail.com> Switch widget: Fix ON/OFF option update error

When calling setChecked() from a listener which is invoked by
the Switch toggle, setChecked() will be called recursively,
causing the value of mThumbPosition overridden by the outer
setChecked(). This make the nested setChecked() unable to update
the "Thumb" position correctly.

Set mThumbPosition to sync up with the exact checked state of
the Switch to avoid update error.

Issue 34748

Change-Id: Id4aa389114dcc590430b11626c80d29c9c6016a0
Signed-off-by: Yu Haonong <yuhaonong@gmail.com>
/frameworks/base/core/java/android/widget/Switch.java
49ccb116e9f2f3cf1233738c931f3e620287afc4 12-Jun-2012 Victoria Lease <violets@google.com> am 1b15102f: am 72b8fc7e: Merge "Revert "Fix fake bold for fallback fonts in frameworks."" into jb-dev

* commit '1b15102fc040f59c72c6453dee15b791f54c9f06':
Revert "Fix fake bold for fallback fonts in frameworks."
aa0980afab57a6aebb06e70f60e92511708fa5af 11-Jun-2012 Victoria Lease <violets@google.com> Revert "Fix fake bold for fallback fonts in frameworks."

This reverts commit b26fa0ce68d3311b2fdffb930b27d897e481dd5a
/frameworks/base/core/java/android/widget/Switch.java
c3672a4e19d3a0063c6d467453e9d7e03b2c1d2f 09-Jun-2012 Victoria Lease <violets@google.com> am 2203fab2: am 2e6f9be5: Merge "Fix fake bold for fallback fonts in frameworks." into jb-dev

* commit '2203fab24966c80af5c37f0a58263218dbbcd610':
Fix fake bold for fallback fonts in frameworks.
b26fa0ce68d3311b2fdffb930b27d897e481dd5a 08-Jun-2012 Victoria Lease <violets@google.com> Fix fake bold for fallback fonts in frameworks.

This change is analogous to Ic0e9f1bbd8cae9fdd3a6d1d015bb9224c8be545c
in WebView, and depends upon the same Skia change that that CL makes
use of.

This flips the "fake bold" flag on for bold fonts in
TextView.setTypeface(), with the expectation that Skia will ignore
the flag if the final typeface used to render the glyphs is already
bold. It also does the same for StyleSpans, TextAppearanceSpans,
TypefaceSpans, and the Switch widget.

With this, fake bold should work uniformly across all scripts - if
fake bold works for a primary typeface, it should also work for all
fallback typefaces.

Bug: 6629786
Change-Id: Id3b8639ab0df83052ffd82809cb12adaacc1d46b
/frameworks/base/core/java/android/widget/Switch.java
8dbf3b006dd806213f18ce32d8222856a80cbf01 06-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Remove dead code in Switch

Change-Id: I91b47866be6f370feef67b1aa4df3aa0d09cc6fb
/frameworks/base/core/java/android/widget/Switch.java
28efba38c07c78f4a349d599b7ad3d7b517c5e97 02-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Make Switch widget aware of layout direction

- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: I40e77e54ccee2e596ebc4649871debfd35ed95fa
/frameworks/base/core/java/android/widget/Switch.java
4c3308de7d51b16b1450c21787b442d84ace3984 19-Apr-2012 Daniel Sandler <dsandler@android.com> Fix text transformations in Switches.

In particular, we now honor android:textAllCaps in the
TextAppearance specified for the switch widget itself.
(Now you no longer need to create a separate capitalized
version of your strings to get them to look like the
platform switches.)

Change-Id: Ia48222a6dddd0d0f9115e554dffb621f4d6a2b94
/frameworks/base/core/java/android/widget/Switch.java
78bcc15b6c5959cc3eb9bbe2459af93451b74a22 13-Apr-2012 Svetoslav Ganov <svetoslavganov@google.com> Switch does not append its state text to accessibility node infos.

1. Switch was not populating the state on/off test in accessibility
node infos. It apparently has two texts, the state one and the
one it inherits from TextView.

bug:6213278

Change-Id: I9c6b1798a8b3230cfb6755cc5b088c320d991642
/frameworks/base/core/java/android/widget/Switch.java
977c9a5d3cb9ecd9190c37da25d1e7476a1dd0bb 09-Mar-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Removing checked state description text for accessibility from some widgets."
55249c8601e04928d4e8afb17233596a3ed4e0ce 09-Mar-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing checked state description text for accessibility from some widgets.

1. The framework was appending some text to convey the state of a
a CheckedTextView or a RadioButton or a ToggleButton or a Switch
but the checked property already conveys that information. It is
responsibility of the screen reader developer to append the state
text based on the checked property. This change is requested by a
few screen reader developers.

bug:5951683

Change-Id: Ieba6797770201155c48e37147ae375dfcb5238aa
/frameworks/base/core/java/android/widget/Switch.java
dca510e026e3e75759bac84c3860dc84b83a608f 09-Mar-2012 Adam Powell <adamp@google.com> Fix docs

Change-Id: Idea902ec3b6e540972650a070e8d224603a55c94
/frameworks/base/core/java/android/widget/Switch.java
d9c7be6cc7d18f11731e6d7a1037cc294fde3a4b 09-Mar-2012 Adam Powell <adamp@google.com> Public API for android.widget.Spinner properties

Bug 6104467

Add properties that can be set/retrieved programmatically to match the
XML attributes available.

Also add resource ID versions of Drawable setters for Switch.

Change-Id: I198cfd9701189ab200c3190f61d18c459b7e4591
/frameworks/base/core/java/android/widget/Switch.java
6c86e1ba41b56ccb3668dbb044fa348cd4b47d55 09-Mar-2012 Adam Powell <adamp@google.com> Public API for android.widget.Switch properties

Bug 6104562

Add properties that can be set/retrieved programmatically to match the
XML attributes available.

Change-Id: Ief28e5cad9ec3e6c2d12dd11ff9fa24f22eecec3
/frameworks/base/core/java/android/widget/Switch.java
8a78fd4d9572dff95432fcc4ba0e87563415b728 17-Jan-2012 Svetoslav Ganov <svetoslavganov@google.com> AccessibilityEvent/AccessibilityNodeInfo class name property should be set to only framework classes.

AccessibilityEvent and AccessibilityNodeInfo have a property className which is set to the source
Java class. This is problematic since leads to leaking private classes which would allow an
accessibility service to load classes from other packages. This is strongly undesirable since
not trusted code can be loaded, and hence executed, in the accessibility service. To address
that the class name is set to the most concrete framework class extended by the info/event
source.

bug:5878943

Change-Id: I7b3114ece8772ea2773f5151e21b8a6f2006882a
/frameworks/base/core/java/android/widget/Switch.java
e724ee4b04d121556e9764f72f9b921a0e16392a 31-Aug-2011 Gilles Debunne <debunne@google.com> Fix for NPE in Switch

Happens when the checked state is set in XML in the CompoundButton
constructor. The drawable are not yet loaded at that point.

This still work since the Switch constructor calls setChecked, which
will invalidate.

Change-Id: I76459307e77596ce0f2759e9449eb42287c6bad7
/frameworks/base/core/java/android/widget/Switch.java
150176d83023e3c486dba10edebb72af36b4099a 26-Aug-2011 Chet Haase <chet@google.com> Made the Switch class public.

Tweaked the API of Switch slightly and made the class public (it was
hidden before).

Change-Id: I4a099e8afd18a11a5850252025ae3bbbb866830d
/frameworks/base/core/java/android/widget/Switch.java
01d11edc1ea2c495ba4bd6bbea8ba7bb7f597678 10-Aug-2011 Adam Powell <adamp@google.com> Flingable switches

Change-Id: I640656358cf28569242d900d41493a69845f7305
/frameworks/base/core/java/android/widget/Switch.java
ec1d60369f751c2d9b60237077ceb9c03e4c0aed 08-Aug-2011 Adam Powell <adamp@google.com> Fix bug 5112702 - switches should have "ON" on the right

Make Switches obey the Grand Unified Theory of Button Ordering.
This also matches their behavior with volume/brightness sliders.

Change-Id: I4e72801e81b10002542a05f61c99a57991f130ff
/frameworks/base/core/java/android/widget/Switch.java
7650259a597dd24137420d32acc35efc44db381e 29-Jul-2011 Svetoslav Ganov <svetoslavganov@google.com> Improving accessibility feedback for two state widgets.

1. Added population of sensible text for the state of the
two state controls such as CheckBox, Switch, etc. This
is important since if they are in a layout manager which
fires an accessibility event there should be a description
of the widget.

bug:5092552

Change-Id: Ie3ca955653563496b84db379ae23a23fe88089a8
/frameworks/base/core/java/android/widget/Switch.java
63bce03cc69be4a45230aa8bbd89dbde60681067 24-Jul-2011 Svetoslav Ganov <svetoslavganov@google.com> Switch state text not added to accessibility events.

1. Adding the text to the events now.

bug:5071053

Change-Id: If36afb1f5327720fc002b8c49e5d7b00c5f189f7
/frameworks/base/core/java/android/widget/Switch.java
c2ab0d665c9d1c332fbd726abf582a27cf7a6701 13-Jun-2011 Gilles Debunne <debunne@google.com> Switch is not affected by touch when disabled

Also unchanged at the end of a drag/fling if the switch has been
disabled in the mean time.

Change-Id: Ie471a7fcf57fa633ee8eeefdfaa2939883ccfef0
/frameworks/base/core/java/android/widget/Switch.java
be0a4535053bbfdebd215e244b154ac810fd8edc 30-Nov-2010 Adam Powell <adamp@google.com> Add SwitchPreference

Change-Id: I073e9bfba8c4e1a625c27f976f71ea56a81ba20f
/frameworks/base/core/java/android/widget/Switch.java
c3eabb9b6ce7f556313c8e3870d76c5b443f1c51 08-Jan-2011 Joe Onorato <joeo@google.com> The switch widget didn't work properly until after onMeasure had run.

Change-Id: I3259193ca60392ffc133f2ff6479feb8e4ad536e
/frameworks/base/core/java/android/widget/Switch.java
96e6b8bfc82e04d06923c372657768b4866e4fb9 14-Dec-2010 Gilles Debunne <debunne@google.com> Remove line height attribute from TextView.

This attribute was introduced in HC and is only partially supported. It should
actually also be used by the layout to be meaningful.

Bug 3223987

Change-Id: Idb47be319a236326f7624fd865466356c19bc342
/frameworks/base/core/java/android/widget/Switch.java
189ee18d6c6483ad63cc864267328259e2e00b95 03-Dec-2010 Dianne Hackborn <hackbod@google.com> Implement smarter sizing of WRAP_CONTENT windows.

This extends the view hierarchy's measure pass to allow view to
propagate up to their parent additional information besides just
their measured size. They can now report that their measured width
and/or height should be larger than the size their parent is
limiting them to (even though by definition they need to contrain
their reported measurements to the limits imposed by the parent).

ViewRoot uses this information to determine if it should remeasure
the window with a larger size limit to try to make it fit.

Change-Id: I90af3b7a8ec45d0a5c003fb009857025209d83eb
/frameworks/base/core/java/android/widget/Switch.java
12190b36a9da88f8db7dbd9ce16d127d76a904b7 29-Nov-2010 Adam Powell <adamp@google.com> Add the Switch widget

Switch is hidden currently; it will be used in SystemUI and preferences.

Change-Id: I2cd8458783f938f00f5ee5e7a67fb5a90404797d
/frameworks/base/core/java/android/widget/Switch.java