Commit Graph

74249 Commits

Author SHA1 Message Date
Seigo Nonaka
917748ef50 Improve TextView.onMeasure() for multiline text.
Previously, measures all paragraph for deciding view width.
However, in case AT_MOST measurment, we can stop calculating measure if
the measured paragraph already exceeds the upper limit.

Bug: 64389125
Test: bit CtsWidgetTestCases:*
Test: CorePerfTest. Here is a result before and after this patch.

Before:
INSTRUMENTATION_STATUS: measure_AtMost_median=50332114
INSTRUMENTATION_STATUS: measure_Exactly_median=28276317
INSTRUMENTATION_STATUS: measure_Unspecified_median=50193036

After:
INSTRUMENTATION_STATUS: measure_AtMost_median=28475187
INSTRUMENTATION_STATUS: measure_Exactly_median=26944710
INSTRUMENTATION_STATUS: measure_Unspecified_median=50880088

Change-Id: I2a39eb39817a8f845c4fa2e174a905a2d057096e
2017-08-04 17:21:06 +00:00
Dianne Hackborn
84e328c9f8 Merge "Improve docs about exceptions through Binder." into oc-mr1-dev am: 6e3af279ab
am: 5a0d703564

Change-Id: I45a971a83f6431e3d9b00c83a2abfd734d3f547f
2017-08-02 18:14:26 +00:00
Chad Brubaker
de629850cc Merge "Add owners for the network security config" am: 8773730cd9 am: e9d50c793a am: 531f1af615 am: 5813bc2b22
am: 13c192f9a1

Change-Id: I6d27a5b1e90333e0db5e94f68f273e758031f9c6
2017-08-02 18:12:02 +00:00
Dianne Hackborn
5a0d703564 Merge "Improve docs about exceptions through Binder." into oc-mr1-dev
am: 6e3af279ab

Change-Id: Ia69e8ed7db5210284fbfea95be2a2b0a7c6e3052
2017-08-02 17:59:17 +00:00
Chad Brubaker
13c192f9a1 Merge "Add owners for the network security config" am: 8773730cd9 am: e9d50c793a am: 531f1af615
am: 5813bc2b22

Change-Id: I649c914986c16b5594219425a391c03e0a9b4390
2017-08-02 17:51:46 +00:00
Dianne Hackborn
6e3af279ab Merge "Improve docs about exceptions through Binder." into oc-mr1-dev 2017-08-02 17:51:01 +00:00
Sundong Ahn
bae17bc4e5 Merge "Merge "Merge "Add hwbinder library" am: 49e2a9a612 am: 811027ede7 am: 2785be7572" into oc-dr1-dev-plus-aosp am: a4fb234a4c" into oc-mr1-dev-plus-aosp
am: 577653628b

Change-Id: Iea878b7dd7873e5c818afd34b0a035b38cc44db9
2017-08-02 17:43:02 +00:00
Chad Brubaker
5813bc2b22 Merge "Add owners for the network security config" am: 8773730cd9 am: e9d50c793a
am: 531f1af615

Change-Id: I77240a60f796c63acd640b8a43cb7054ad2a8bee
2017-08-02 17:41:21 +00:00
Dake Gu
06b1283394 Merge "View: fix setTransientState" into oc-mr1-dev am: 8eb3a3979f
am: 8701a3231b

Change-Id: Id7c933c23d472184ff7d8b91d1587bcb0853207e
2017-08-02 17:34:16 +00:00
Android Build Merger (Role)
577653628b Merge "Merge "Merge "Add hwbinder library" am: 49e2a9a612 am: 811027ede7 am: 2785be7572" into oc-dr1-dev-plus-aosp am: a4fb234a4c" into oc-mr1-dev-plus-aosp 2017-08-02 17:32:08 +00:00
Dake Gu
8701a3231b Merge "View: fix setTransientState" into oc-mr1-dev
am: 8eb3a3979f

Change-Id: I85950ec6275c2d10bd0e9b7f030fa5ce2c66130c
2017-08-02 17:27:53 +00:00
Chad Brubaker
531f1af615 Merge "Add owners for the network security config" am: 8773730cd9
am: e9d50c793a

Change-Id: Id183ac68171c94d082c992bd3e986c136d6c7764
2017-08-02 17:27:51 +00:00
Sundong Ahn
014ca608c7 Merge "Merge "Add hwbinder library" am: 49e2a9a612 am: 811027ede7 am: 2785be7572" into oc-dr1-dev-plus-aosp
am: a4fb234a4c

Change-Id: I026ca8c33ef2fce7d40e2daec8db970d6b578f25
2017-08-02 17:27:38 +00:00
Chad Brubaker
e9d50c793a Merge "Add owners for the network security config"
am: 8773730cd9

Change-Id: I18b8aac4c1ac85bde3e6735e1afe6375f5c0e177
2017-08-02 17:20:16 +00:00
Dake Gu
8eb3a3979f Merge "View: fix setTransientState" into oc-mr1-dev 2017-08-02 17:18:00 +00:00
Sundong Ahn
30538850f2 Merge "Add hwbinder library" am: 49e2a9a612 am: 811027ede7
am: 2785be7572

Change-Id: Ia545b163166465cafa3d4ecbb0a5d0d911224b22
2017-08-02 17:14:55 +00:00
Treehugger Robot
8773730cd9 Merge "Add owners for the network security config" 2017-08-02 17:10:11 +00:00
Sundong Ahn
2785be7572 Merge "Add hwbinder library" am: 49e2a9a612
am: 811027ede7

Change-Id: Idec0d080a65d96ff866969f47e9902e40e800fdf
2017-08-02 17:05:56 +00:00
Sundong Ahn
811027ede7 Merge "Add hwbinder library"
am: 49e2a9a612

Change-Id: I3c7528dcf98bf3b92843594172531fd30a5f29d4
2017-08-02 16:57:50 +00:00
Treehugger Robot
49e2a9a612 Merge "Add hwbinder library" 2017-08-02 16:46:42 +00:00
Felipe Leme
c56a6dd144 Merge "Clarifies how the autofill service should check for signature hashes." into oc-dev am: c8f0fd7076 am: 32d4e30778 am: d25050e2a4
am: 7b6cdb061a

Change-Id: I6d63b4c98d1da0ca03aab3efde14d3ebba8ecf0c
2017-08-02 16:27:30 +00:00
Garry Boyer
3edc04d32b Merge "Revert multi-package APK flag to off." 2017-08-02 16:25:34 +00:00
TreeHugger Robot
6f88195085 Merge "Make ellipsize retry if text doesn't fit" 2017-08-02 16:24:55 +00:00
Felipe Leme
7b6cdb061a Merge "Clarifies how the autofill service should check for signature hashes." into oc-dev am: c8f0fd7076 am: 32d4e30778
am: d25050e2a4

Change-Id: I46463fe043ce8e008a4587bba80c2a48c029fed9
2017-08-02 16:17:39 +00:00
Felipe Leme
23123ece60 Merge "Clarifies how the autofill service should check for signature hashes." into oc-dev am: c8f0fd7076
am: 32d4e30778

Change-Id: I5e3eff32fe5224d69bb41c4c4c48b880bc701c4b
2017-08-02 16:09:20 +00:00
Felipe Leme
d25050e2a4 Merge "Clarifies how the autofill service should check for signature hashes." into oc-dev am: c8f0fd7076
am: 32d4e30778

Change-Id: I8de50b81273e89298a6276d8b17100c90361380e
2017-08-02 16:09:13 +00:00
Felipe Leme
32d4e30778 Merge "Clarifies how the autofill service should check for signature hashes." into oc-dev
am: c8f0fd7076

Change-Id: Ida9652bb511ea0aa180e649992a9e5fa6409b2be
2017-08-02 16:00:41 +00:00
Felipe Leme
6f9f17475d Merge "Clarifies how the autofill service should check for signature hashes." into oc-dev
am: c8f0fd7076

Change-Id: I3a2419aa6244f01a54211ab60558cc729c29249e
2017-08-02 16:00:39 +00:00
Felipe Leme
c8f0fd7076 Merge "Clarifies how the autofill service should check for signature hashes." into oc-dev 2017-08-02 15:52:05 +00:00
Todd Kennedy
0681d29966 Merge "Add new API to retrieve app names in a batch" into oc-mr1-dev am: 5e049eb884
am: a1cb029caf

Change-Id: I9454b85835e0deb8264f7371748aad90cf04a42d
2017-08-02 14:43:36 +00:00
Todd Kennedy
a1cb029caf Merge "Add new API to retrieve app names in a batch" into oc-mr1-dev
am: 5e049eb884

Change-Id: I27542404b197a9d11d611d95f271660856271d40
2017-08-02 14:33:09 +00:00
Todd Kennedy
5e049eb884 Merge "Add new API to retrieve app names in a batch" into oc-mr1-dev 2017-08-02 14:23:16 +00:00
Roozbeh Pournader
1051bbe325 Make ellipsize retry if text doesn't fit
This fixes the cases where the replacement of parts of text with
ellipsis may result in more-than-expected width of text due to
contextual width changes in the font, such as kerning or Arabic
shaping.

The calculations in TextUtils.ellipsize() and StaticLayout are fixed
to recalculate the new width and reduce it further until the text
actuall fits. BoringLayout and DynamicLayout get fixed too since
they use the other two implementations indirectly.

Also reverse a recently-introduced incorrect check for
multi-character ellipsis in Layout.java.

Fixes: 31537595
Fixes: 64156587
Test: Manual (Arabic edge cases ellipsize correctly)
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.AutoCompleteTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.MultiAutoCompleteTextViewTest
Test: bit FrameworksCoreTests:android.text.
Test: adb shell am instrument -w com.android.documentsui.tests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I74fdaa9bf32dc2064eeb702f7f9b78b2bb856c26
2017-08-01 17:58:30 -07:00
Dianne Hackborn
18482aef9e Improve docs about exceptions through Binder.
Test: built

Change-Id: I5b6af61daa373c92f7d7b3b341a20fbd9e691da9
2017-08-01 17:46:23 -07:00
Felipe Leme
4e051d9da9 Merge "Cherry-picked some Autofill Javadoc improvements from master." into oc-dev am: 6829a1dace
am: 27eb322ed2

Change-Id: Ib78f7d5d690eff9a7b6c424600e1f0a300417b16
2017-08-02 00:35:44 +00:00
Felipe Leme
e971d933be Merge "Cherry-picked some Autofill Javadoc improvements from master." into oc-dev
am: 6829a1dace

Change-Id: I00eed7ae9679f117296ad1f7162e057720e69aab
2017-08-02 00:26:39 +00:00
Felipe Leme
27eb322ed2 Merge "Cherry-picked some Autofill Javadoc improvements from master." into oc-dev
am: 6829a1dace

Change-Id: I41dec3cb31e6b523927717950f827f45dadabd8b
2017-08-02 00:26:37 +00:00
TreeHugger Robot
6829a1dace Merge "Cherry-picked some Autofill Javadoc improvements from master." into oc-dev 2017-08-02 00:08:15 +00:00
Chad Brubaker
1ec48fc770 Add owners for the network security config
Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I9bb8f5ceaae4a1af8c93f5416a6a5cea42915c62
2017-08-01 15:50:22 -07:00
Siyamed Sinir
8b7053dd45 Merge "Fix EditText cursor when line spacing is set" 2017-08-01 22:37:55 +00:00
Andrew Solovay
7d266520b9 Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev am: d71cc3b72e am: 9e1b7759dc am: 6ff61dbc51
am: 49f6afe2f8

Change-Id: I0fd57ed371ae915ee33aa77e198b17eb9e9c8df9
2017-08-01 21:48:14 +00:00
Andrew Solovay
49f6afe2f8 Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev am: d71cc3b72e am: 9e1b7759dc
am: 6ff61dbc51

Change-Id: I641281f7430fe2d9c168bf2eddbdcba6803dff96
2017-08-01 21:39:26 +00:00
Andrew Solovay
6ff61dbc51 Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev am: d71cc3b72e
am: 9e1b7759dc

Change-Id: I9b6e9c02f2237c48fdac4fd6f0c4afc4eb8b03cd
2017-08-01 21:31:59 +00:00
Andrew Solovay
517927fa1a Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev am: d71cc3b72e
am: d4b1a0985b

Change-Id: I18839e2c5c1f64639a7920d64f3271cd2d6dc1a4
2017-08-01 21:31:58 +00:00
Andrew Solovay
9e1b7759dc Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev
am: d71cc3b72e

Change-Id: I8130d71136078d17196e198db6ff36f7f8489a5c
2017-08-01 21:21:58 +00:00
Andrew Solovay
d4b1a0985b Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev
am: d71cc3b72e

Change-Id: Ifc47ddab2329814e39022b51510f4264937a3c04
2017-08-01 21:21:01 +00:00
Garrett Boyer
17041530bf Revert multi-package APK flag to off.
Disable tests when multi-package APK is disabled.

Test: Ran framework tests with flag both on and off.
Change-Id: I0aae693816af06eebe1bc6cdeebf8dad4c179260
2017-08-01 14:17:49 -07:00
Dake Gu
43ad57e548 View: fix setTransientState
Following four steps with RecyclerView - CardView - ImageView:
a. fade in imageview in onBind:
calling imageView.setTransientState(true)
b. RecyclerView animate the item: calling
cardView.setTransientState(true)
c. fade-in finishes, calling imageView.setTransientState(false)
d. RecyclerView animation finishes: calling
cardView.setTransientState(false)

After these four steps, RecyclerView unexpectedly has transient
state.

The problem is in step b, when calling cardView.setTransientState()
it incorrectly calls parent.childHasTransientStateChanged(this, true)
which causes RecyclerView's mChildCountWithTransientState increased
to 2. And it's decreased to 1 in step d and stay as 1 forever.

The child should only call childHasTransientStateChanged() when
actual hasTransientState() changed.

Bug: 64235615
Test: ViewTransientStateTest
Change-Id: I99ed35cc9c49e54d36590d8f1d206501fd3288f2
2017-08-01 14:17:39 -07:00
Dianne Hackborn
fe05f9e390 Merge "Fix issue #64224738: Document return value of IBinder.transact()" into oc-mr1-dev am: 47e6cc34bb
am: e4a04e87d1

Change-Id: I16ef18b31ad25254dd2009a04ffc7e532d5e2694
2017-08-01 20:58:43 +00:00
Ruchi Kandoi
e6a08439b6 Merge "Set default value for T3T_PMM." am: 7770adf755
am: 1decea7847

Change-Id: Ic1548d625c7a3e025af95cd329dd9d4e5f69caef
2017-08-01 20:51:30 +00:00