Commit Graph

7130 Commits

Author SHA1 Message Date
TreeHugger Robot
47ca22e361 Merge "docs: Update ScrollView JavaDoc comments" into oc-dev 2017-04-27 04:29:14 +00:00
TreeHugger Robot
b312d38868 Merge "docs: Update RelativeLayout.LayoutParams JavaDoc comments" into oc-dev 2017-04-27 04:28:36 +00:00
TreeHugger Robot
01d51288df Merge "Handle package changes in autofill manager service" into oc-dev 2017-04-27 04:22:24 +00:00
TreeHugger Robot
ca105f6c29 Merge "docs: Update LinearLayout JavaDoc comments" into oc-dev 2017-04-27 04:21:15 +00:00
TreeHugger Robot
80fe019f6b Merge "docs: Update ProgressBar JavaDoc comments" into oc-dev 2017-04-27 04:12:48 +00:00
Svet Ganov
48f10a2ab5 Handle package changes in autofill manager service
Autofill manager service was not observing package changes thus
we did not properly handle the cases of the service being updated,
added, and removed. Handling, additions is needed to properly
support restore from a backup. Fixed a few missing locks.

Test: all autofill CTS tests pass and manually tested update, add,
      and remove of autofill services.

bug:36638606
bug:36978445

Change-Id: Idd47891774ba2a4e562a1952cbb5a048211fd4e3
2017-04-26 19:22:05 -07:00
Felipe Leme
5f7979222d Merge "Provide a way to set AutofillId on ViewStructure." into oc-dev 2017-04-26 18:38:21 +00:00
Joe Fernandez
1ef22a5a65 docs: Update ScrollView JavaDoc comments
- reworded introduction for clarity
- crosslink to nestedscrollview
- simplify language around the “don’ts”
- crosslink to the material design guidelines for scrolling techniques

Test: docs only change. Tested with doc build
Change-Id: Ia6d1e5ce0f9abd3db2c1988537bd42013851596f
2017-04-26 00:23:49 -07:00
Joe Fernandez
d9ffaa5eb8 docs: Update LinearLayout JavaDoc comments
Updated top-level description to:

- favor explanations of using XML for setting attributes (instead of using
methods like setGravity()
- add code example
- clarify what "child view" means
- add context around cross-link to layout params
- add context around cross-link Linear Layout guide (this guide focuses on
layout_weight)

Test: docs change only. Tested with doc build
Change-Id: Ifc1fa4cf24e2afa229f1c20b3f725073aff162d7
2017-04-25 23:39:17 -07:00
Joe Fernandez
72a9d591f0 docs: Update ProgressBar JavaDoc comments
- link to material design guidelines for a visual example of
determinate/indeterminate patterns
- reword introduction for clarity
- remove confusing code example, in favor of a concise explanation of
determinate/indeterminate uses
- adds a note about not using progress bar in a dialog

Test: docs change only. Tested with a docs build
Change-Id: I872f7a647eafa6d0f1652549ad2d9d2db4fc81e3
2017-04-25 23:14:09 -07:00
Joe Fernandez
a1bd1712d5 docs: Update RelativeLayout.LayoutParams JavaDoc comments
Added changes to make purpose/usage of RelativeLayout.LayoutParams more
clear:

- clarify the attributes are set on a view contained in a relative layout
- clarify that relative layout uses these values to position the view
- add note that these values are ignored if view is not contained in a
relative layout
- cross-link code sample in Relative Layout guide
- cross-link guide Layout guide to clarify layout params vs regular
attributes

Test: docs change only. Tested with a docs test build.
Change-Id: I4fe1088594c998cee4ff0b2f6295579956c19d6f
2017-04-25 22:38:45 -07:00
Joe Fernandez
bc6c82c20d Merge "docs: Update ListView JavaDoc comments" into oc-dev 2017-04-26 04:56:11 +00:00
Joe Fernandez
0de19fcf6a Merge "docs: Update ArrayAdapter JavaDoc comments" into oc-dev 2017-04-26 04:55:38 +00:00
Felipe Leme
e4f30650ac Provide a way to set AutofillId on ViewStructure.
So far that was done indirectly by public methods that could
be overridden in away that does not set the proper id in the structure,
which would crash apps.

Bug: 36171235
Test: modified VirtualContainerActivityTest#testAutofillOverrideDispatchprovideAutofillStructure

Change-Id: I3f1c64020125cbb8349971a0bc52ccd1e0c81e62
2017-04-25 14:12:03 -07:00
Joe Fernandez
a3aa879166 docs: Update ListView JavaDoc comments
- Use more active and descriptive terms in first-line description
 - Recommend using RecyclerView
 - Add XML example code
 - Direct reader to set an adapter to populate list with views
 - Add pre tags to XML code snippet
 - Give example of displaying more complex views in list
 - Add aside about using convertView if provided
 - Link to guide on handling click events
 - Add cross-link to contextual action mode guide
 - Reframe link to list view guide
 - Advise reader to favor alternative approach to using ListActivity
 - Add paragraph tags
 - Escape @ symbol
 - Fix sentence fragment and change modern -> advanced
 - Fix title of cross-reference to layout guide
 - Remove reference to filename
 - Remove cross-link to contextual action mode
 - Fix malformed link tag
 - Add connecting word
 - Clean up links

Test: Docs change only. Tested with docs build.

Change-Id: Ideb5cc517a7bc08056bb2fe8025c7acea388128b
2017-04-25 11:51:17 -07:00
Adrian Roos
4554332475 Merge "Perf: Fix RemoteViews memory leak" into oc-dev 2017-04-25 17:09:24 +00:00
Adrian Roos
83fad0a35c Perf: Fix RemoteViews memory leak
Fixes an issue where the context wrapper created in
RemoteViews leaks the RemoteViews instance through the
implicit this pointer of anonymous inner classes.

Fixed by replacing with a static inner class.

Bug: 37630958
Test: m droid (this change is not testable)
Change-Id: Ia149b3d91f134f0c308200b46880e7f87542a338
2017-04-24 17:00:27 -07:00
Felipe Leme
85d1c2d290 Minor fixes on Autofill Framework:
- Removed default implementation of onProvideAutofillVirtualStructure() that
  was using accessibility API (it's useless because without the View calling
  AutofillManager.notifyViewEntered(), it would never be triggered).
- Fixed obsolete TODOs.
- Removed obsolete service class name constant.
- Removed unused debug constant.

Fixes: 37078783
Fixes: 33197203
Bug: 33802548
Bug: 35956626

Test: CtsAutoFillServiceTestCases pass
Merged-In: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
Change-Id: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
2017-04-24 16:01:12 -07:00
Joe Fernandez
d7ef95af60 docs: Update ArrayAdapter JavaDoc comments
update the introduction to:

- streamline wording by focusing on practical uses in introduction
- include crosslinks to relevant guides & examples
- a note about RecyclerView given it is mentioned in this context
- favor a p element with a note class applied
- incorporate reword via joe’s input on connecting topics

Test: Docs change only. Tested with doc build run.
Change-Id: I66511db5a978bff4e46d3d6080b00c2b7e6dfa64
2017-04-24 13:50:13 -07:00
TreeHugger Robot
31eeb08bdb Merge "Introduce TextView attribute for control justification." into oc-dev 2017-04-21 21:31:20 +00:00
Seigo Nonaka
4cbb441425 Introduce TextView attribute for control justification.
Bug: 37447278
Test: am instrument -w -e class android.widget.cts.TextViewTest
      android.widget.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: I7946f460ad8a6c2423b464c27225411d155d4d8d
2017-04-21 21:17:58 +00:00
TreeHugger Robot
62a24e9493 Merge "docs: Update Imageview JavaDoc comments" into oc-dev 2017-04-21 18:36:51 +00:00
TreeHugger Robot
28973b3817 Merge "docs: Update TextView JavaDoc comments" into oc-dev 2017-04-21 18:34:14 +00:00
TreeHugger Robot
6a60322157 Merge "Fix a11y text location in clipped views" into oc-dev 2017-04-21 01:11:12 +00:00
TreeHugger Robot
82629345c8 Merge "Renaming setAsyncExecutor to setExecutor" into oc-dev 2017-04-21 00:31:11 +00:00
Sunny Goyal
0ddf6aa0a4 Renaming setAsyncExecutor to setExecutor
Bug: 37534990
Test: Tests updated
Change-Id: I9ea467d05b4ac4d96c23d53750727096a511686d
2017-04-20 15:27:08 -07:00
Phil Weaver
cdc74590c3 Fix a11y text location in clipped views
Bug: 37482849
Test: Run Select to Speak, open apps, scroll so top row is
partially visible, have it read the screen.

Change-Id: Ibbd51221f8e93372ccff6d5fb57cdc2a09f2c19f
2017-04-20 12:11:15 -07:00
TreeHugger Robot
f4af35a5fe Merge "Moved getAutofillOptions() logic from SpinnerAbs to AdapterView and Adapter." into oc-dev 2017-04-20 17:25:19 +00:00
Andrei Stingaceanu
635d9dd864 Merge "AutoSize TextView - API polish - no RuntimeException in signature" into oc-dev 2017-04-20 13:14:06 +00:00
Abodunrinwa Toki
fa9d889d3e Merge "TRON: Log "textAssist" actions." into oc-dev 2017-04-20 13:08:52 +00:00
Andrei Stingaceanu
1b59a21c5c AutoSize TextView - API polish - no RuntimeException in signature
Do not mention RuntimeException subclasses in throws clauses in
method signatures.

Bug: 37514926
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t \
      android.widget.cts.TextViewTest

Change-Id: Ia5bf4cd64e12c53dd7c409b6e44efec4983ae62e
2017-04-20 12:09:11 +01:00
TreeHugger Robot
4f3ba1aeed Merge "Move expensive TextClock operations to onAttach" into oc-dev 2017-04-20 00:26:52 +00:00
Abodunrinwa Toki
54486c16ba TRON: Log "textAssist" actions.
- Logs when the assist menu item appears in the text selection menu.
- Logs when the assist menu item is selected.
- Logs the the type of the assist menu item that was presented.

Test: Manually tested by looking at the logs. See: go/tron-howto
Bug: 32572232
Change-Id: Ibbbf59423b3f510ab6f2f072962a556c3d6e2f65
2017-04-19 22:10:51 +01:00
Felipe Leme
7e4c205d8f Moved getAutofillOptions() logic from SpinnerAbs to AdapterView and Adapter.
Fixes: 37330022
Test: CtsAutoFillServiceTestCases pass
Test: manual verification using app from bug 37327881

Change-Id: I66260131c7ef0d5b3c2b20514f29efd5eb10057e
2017-04-18 15:36:04 -07:00
Ian Lake
851957cbf9 Move expensive TextClock operations to onAttach
Registering and unregistering are expensive operations
that should not be done when the visibility of the
TextClock changes. However, we want to ensure that a
non-visible TextClock does not consume extra resources
or cause layout/redraw passes. By keeping the TextClock
registered but avoiding the side effects of onTimeChanged,
we can get the best of both worlds.

Test: manual testing

BUG: 33960344
Change-Id: I80771524a09ca57488834bafd97b570f2a8235db
2017-04-18 15:33:38 -07:00
Joe Fernandez
23fd176813 docs: Update TextView JavaDoc comments
- fix typographic errors (misspellings)
- Simplified the overview to essential info
- included a code example for common TextView usecase
- adds missing javadoc description and param for setScroller method

From BNR vendor, Project 01, android-developer-documentation/pull/1
Test: docs-only change. Tested with a check build

Change-Id: Id853c5587722c7125a33e25002e2bde73e397c0d
2017-04-18 14:35:43 -07:00
Ian Lake
95b193fdca Remove scale up animation for startActivity from RemoteViews
The scale up animation used by default for all startActivity calls coming from
RemoteViews overrides all custom animations set on the activity's theme. By
switching to ActivityOptions.makeBasic(), we allow custom animations on an
activity by activity basis.

This also fixes issues where activities would scale up from a click position in the
notification tray even after the notification tray collapses (which happens
concurrently with the startActivity call).

Test: visual inspection

BUG: 34235073
Change-Id: I922beee39d9fde9c00d41d07d8a8204421e7faa7
2017-04-18 13:20:34 -07:00
Joe Fernandez
704d43bfb6 docs: Update Imageview JavaDoc comments
- fix typographic errors (misspellings)
- Simplified the overview to essential info
- included a code example for common TextView usecase
- adds missing javadoc description and param for setScroller method
- standardize “text view” as TextView to promote consistency

Change-Id: I7d614430599537c3ff5999f9c139cc896f142cde
From: BNR vendor, Project 01, android-developer-documentation/pull/1

Test: docs-only change. Tested with a check build
2017-04-18 10:41:07 -07:00
Andrei Stingaceanu
2ed861d560 Merge "AutoSize TextView - take horizontalScrolling into account" into oc-dev 2017-04-18 14:20:33 +00:00
Abodunrinwa Toki
6d149bc953 Merge "FloatingToolbar: Rules for ordering menu items." into oc-dev 2017-04-18 12:58:33 +00:00
Andrei Stingaceanu
f730651a22 AutoSize TextView - take horizontalScrolling into account
When passing the characteristics of the current TextView
to the StaticLayout for auto-size measurements also take
the horizontallyScrolling into account similarly with how
the actual measurements are done (@ TextView#onMeasure).

Bug: 37254477
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t\
      android.widget.cts.TextViewTest

Change-Id: I44b85e77d9b1770f188a0f59f103e3fda284e97a
2017-04-18 09:49:48 +00:00
Aurimas Liutikas
ba590a694b Enhance Chronometer to better support Swedish countdowns.
Adds a method isTheFinalCountDown that allows to correctly
determine whether it is the final countdown.

Test: None
Change-Id: I786ae3455479bac25ccf25efba1c3dce18185117
2017-04-17 09:27:09 -07:00
Abodunrinwa Toki
6eecdc934c FloatingToolbar: Rules for ordering menu items.
- The assist menu item should always appear first
- Only the assist menu item should have an icon + text label

The description above enforces the expected UX without breaking
existing apps. Previously, apps couldn't have icons + text for a
menu item (we only rendered text for such items). If we don't
enforce that the assist menu item (android.R.id.textAssist) appears
first, then this item could potentially be rendered in a different
position for apps that specify an order number lower than that
specified for the assist menu item.

Test: Included in this cl.

Bug: 35989798

Change-Id: I56c71450c850e1d8cd80d54d4e17a6390823485f
2017-04-16 23:07:14 +01:00
TreeHugger Robot
7c8ab2651b Merge "Remove unnecessary casts on calls to findViewById" into oc-dev 2017-04-14 16:56:28 +00:00
Alan Viverette
51efddbd3b Remove unnecessary casts on calls to findViewById
Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
2017-04-14 11:15:50 -04:00
Alan Viverette
04fd470ce0 Update more implementations of findViewById()
Bug: 24137209
Test: make checkbuild -j32
Change-Id: I104969fc74d6dc1d159e3d1ff5926640b124a540
2017-04-13 16:50:32 -04:00
TreeHugger Robot
da97b66f41 Merge "Switch i18n listeners to use IME hint locales" into oc-dev 2017-04-13 18:23:05 +00:00
Roozbeh Pournader
d39388219f Merge "Revert "Make selection end handle stick to selection at line end."" into oc-dev 2017-04-12 23:22:40 +00:00
Roozbeh Pournader
e740fd8d7b Switch i18n listeners to use IME hint locales
Previously, the i18n listeners were keyed off the text locales of the
TextView. This could create some unanticipated backward
compatibility headaches. The IME hint locales seems to be a better
match, since they are supposed to be used for input.

Fixes: 37249649
Fixes: 37133729
Fixes: 37222714
Bug: https://code.google.com/p/android/issues/detail?id=2626
Bug: 8319249
Bug: 33276673
Bug: 34394455
Bug: 37160895
Test: Updated and added CTS tests pass
Change-Id: If8a115f3e30ff1601dee426a504984e2ce24a776
2017-04-12 14:19:02 -07:00
Roozbeh Pournader
7557a5a090 Revert "Make selection end handle stick to selection at line end."
This reverts commit 7c263ddd58.

Fixes: 35944608
Bug: 21305922
Test: Manual
Test: Updated CTS and core tests pass.
Change-Id: Ic840f8771c3d5850f4f6f44ea199b144cac740c0
2017-04-11 18:40:44 -07:00