16319 Commits

Author SHA1 Message Date
Tao Bai
a5717331d1 Override View.autofill() method and call into ViewDelegate
BUG: 36787841

Test: this just forwards api call.
Change-Id: Ie2c9675e5a7ee2ed2a7997d1270cf388571a855b
2017-03-30 15:02:53 -07:00
Felipe Leme
25bf787ffb Created an HtmlInfo object on ViewStructure.
The ViewStructure typically represents a View, but it it can also be a virtual
view; in particular, WebView uses virtual views to represent HTML elements.

Although most of the properties of the HTML element maps to properties of
Android Views, some properties (such as 'name' and 'id' on <INPUT> fields)
don't, and those are crucial for autofilling web pages.

Rather than trying to artificially map these properties, it's better to create
a generic representation, for the following reasons:

1. Web standards move in a different velocity than Android APIs
2. Android APIs cannot be changed easily. Deprecated APIs continue to work,
   and new added APIs don't work in older versions
3. The data used for autofill is opaque to the Framework - it's only relevant
   to the node producers (like WebView) and consumers (Autofill services).

Also removed the setIdEntry() that was used for the same purpose.

Fixes: 36696757
Bug: 36718508
Test: VirtualContainerActivityTest with new checks pass

Change-Id: Ia626bd1f640b0b5861e81a5915504b95029874c9
2017-03-30 14:24:05 -07:00
TreeHugger Robot
60e0c19505 Merge "API refactor: context.startForegroundService()" into oc-dev 2017-03-30 20:54:24 +00:00
TreeHugger Robot
dada7c0e71 Merge "TextClassificationManager API updates." into oc-dev 2017-03-30 19:17:24 +00:00
TreeHugger Robot
7600925263 Merge "Hide TextClassifier.EntityType from the public API." into oc-dev 2017-03-30 19:15:17 +00:00
Christopher Tate
08992ac57e API refactor: context.startForegroundService()
Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state.  Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds.  If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.

We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.

Bug 36130212
Test: CTS

Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
(cherry picked from commit 79047c62b58fb0a0ddf28e2b90fe4d17e05bc528)
2017-03-30 18:31:24 +00:00
Maurice Lam
257047b24b Merge "Make Notification.EXTRA_ALLOW_DURING_SETUP system API" into oc-dev 2017-03-30 18:04:24 +00:00
TreeHugger Robot
3030442b89 Merge "Simplified autofill() methods by returning void instead of boolean." into oc-dev 2017-03-30 17:21:33 +00:00
Abodunrinwa Toki
45cb3e6c1f Hide TextClassifier.EntityType from the public API.
Test: current.txt and friends updated correctly.
Bug: 35959173
Change-Id: I74011020a4e509bad98b94738d2e929fc068d9ae
2017-03-30 16:56:18 +01:00
Julia Reynolds
612beb2f2f Rename badge icon method
Test: make
Change-Id: Ic7f7dc3319ba4ffa67e1e02acd1828ca46975baf
2017-03-30 11:42:35 -04:00
Abodunrinwa Toki
df61b0328e TextClassificationManager API updates.
- Changes getDefaultTextClassifier to getTextClassifier
- Adds a setTextClassifier API

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

Change-Id: I24e86272cf58bf6864505bee3b06978c1c0d46e5
2017-03-30 14:15:44 +01:00
TreeHugger Robot
ce3cf36652 Merge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev 2017-03-30 01:26:13 +00:00
Felipe Leme
955e252a95 Simplified autofill() methods by returning void instead of boolean.
Test: CtsAutoFillServiceTestCases pass

Change-Id: Ic94e6686e291fed60ef6715bd160f9b568bf0ea6
2017-03-29 18:16:40 -07:00
Aaron Whyte
f830652e97 Split scroll factor into a 2d float.
Test: Existing unit tests, manual sanity check.
BUG=35764483

Change-Id: If6ac121452698747e1f8bc9d4ec0111bb881d4d4
(cherry picked from commit e9956c5c65ecd3aaf7390c10d135749e5adfb344)
2017-03-29 23:34:56 +00:00
Maurice Lam
96c1003e1a Make Notification.EXTRA_ALLOW_DURING_SETUP system API
Test: Manually tested setup wizard notifications continue to work
Bug: 34705874
Change-Id: If2bff20a74caeac5041d97f1656138676c93f554
2017-03-29 16:19:54 -07:00
Felipe Leme
7320ca9f99 Adds FillResponse extra to passed to authentication intent.
Test: CtsAutoFillServiceTestCases (with new test) pass
Fixes: 36603378

Change-Id: I3d04a656e50b2b3665405f6c1891ad0379a54ea6
2017-03-29 15:20:29 -07:00
George Mount
c7146beabe Make public getFragments() and onGetLayoutInflater() methods
Bug 34703669
Test: I846ef668e3dd7d664cfb56d2b9400467ba9b79f4
Change-Id: Ie202960ada86b25e964f98a639b5f5740c8fdb79
2017-03-29 14:58:42 -07:00
Dongwon Kang
c871434468 TIF: Remove redundant modifiers in TvContract
Test: build
Bug: 36138179
Change-Id: I313bdf421bc2af956a8b08933e5a86141a90a52f
2017-03-29 13:35:20 -07:00
Etan Cohen
2ce80c839e Merge "[AWARE] Remove Publish/Subscribe Count configuration" into oc-dev 2017-03-29 20:15:03 +00:00
TreeHugger Robot
5301d9e6d3 Merge "Do not use many FDs in FontManagerService." into oc-dev 2017-03-29 19:11:41 +00:00
Tima Vaisburd
e4776416d4 Merge "TextClassifier: add API to WebView" into oc-dev 2017-03-29 18:50:07 +00:00
TreeHugger Robot
bf6b4efa6d Merge "AudioAttributes: make getVolumeControlStream() non static" into oc-dev 2017-03-29 17:40:01 +00:00
TreeHugger Robot
ddb280b1ac Merge "Reserve space for preference icon." into oc-dev 2017-03-29 17:34:08 +00:00
Etan Cohen
f6d243b6be [AWARE] Remove Publish/Subscribe Count configuration
Simplify API: semantics of publish/subscribe count restrictions
aren't clear at the app level. They depend on DW configuration as
well as discovery session type - number of packets transmitted over
the air.

There's already an app-facing discovery session lifetime configuration -
the TTL. That has clearer semantics and is sufficient (for now).

(cherry-pick of commit 2cbaf22bba4da1b60c551112a97ccc7f2e7157fa)

Bug: 36446307
Test: unit tests and integration (sl4a) tests.
Merged-In: I9129975bd2e1a61b3d23a4b6acaae703b42216c7
Change-Id: I9129975bd2e1a61b3d23a4b6acaae703b42216c7
2017-03-29 10:05:19 -07:00
Seigo Nonaka
c0cf4f09f4 Do not use many FDs in FontManagerService.
Currently there are over 170 font files are installed in system directory.
Opening 170+ files and keep them is not unacceptable. Pass URI instead.

At the same time, this CL hides full font path from FontConfig since
/system/fonts directory will be deprecated in future.

Bug: 36660849
Test: android.text.cts.FontManagerTest passed
Change-Id: I1d216dc9c6dec702a4ce3b946bfda6dcbe12b7fe
(cherry picked from commit 455f1bfc05bf972ee4fe8cd5fa135ed232126bb7)
2017-03-29 17:01:16 +00:00
TreeHugger Robot
76c32a35a9 Merge "Allow apps to process ProxyFDCallback asynchrnously." into oc-dev 2017-03-29 04:41:44 +00:00
Jeff Tinker
79a973f643 Revert "Make public getFragments() and onGetLayoutInflater() methods"
This reverts commit 599be3d01ed1811ae365085e67a15d082170b583.

This change is being reverted because it broke git_master build.

Change-Id: I54ab9cd3d9e08dcf870f472fda08cc44e57986d0
bug: 34703669
2017-03-29 01:25:06 +00:00
Conrad Chen
438be2af18 Merge "TIF: open transient columns to public" into oc-dev 2017-03-29 00:46:08 +00:00
Daichi Hirono
812c95d37d Allow apps to process ProxyFDCallback asynchrnously.
Previously callback methods of ProxyFileDescriptorCallback were invoked
on a background thread prepared in the framework. So all methods were
invoked and processed synchronously. This was problem because if it took
time to fetch bytes of one file, operations for other files were also
blocked.

The CL changes ProxyFileDescriptorCallback methods to be invoked on
Handler passed by apps. Now application can prepare a Handler per file
so that one file does not block others.

Bug: 35229514
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest#testOpenProxyFileDescriptor_async
Change-Id: Ibadc4aad4c0373a3da586459a8f775e40288c895
(cherry picked from commit 4f156065c860d916b649e2b464e9405cafc732e9)
2017-03-29 00:14:16 +00:00
TreeHugger Robot
c8d8c27c68 Merge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev 2017-03-28 23:43:23 +00:00
Doris Ling
9ed53e35ed Reserve space for preference icon.
Add an attribute to Preference to specify whether the space of the icon
view should be reserved when no preference icon is provided.

Bug: 36448695
Test: manual
Change-Id: I03b49fe93d54bb9106cf167a677a9ea544a3e3a1
2017-03-28 22:47:18 +00:00
Jean-Michel Trivi
e67bc4d484 AudioAttributes: make getVolumeControlStream() non static
In AudioAttributes class:
 - deprecate static getVolumeControlStream(AudioAttributes) method,
 - add non-static getVolumeControlStream() method.

Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioAttributesTest
Change-Id: Ic2276cb7367e0bcb0c07e1fe63de68dafddbccb5
2017-03-28 21:37:35 +00:00
TreeHugger Robot
36e2483663 Merge "Add Configuration param to onMovedToDisplay" into oc-dev 2017-03-28 21:36:40 +00:00
Tima Vaisburd
cf49a23b3c TextClassifier: add API to WebView
Delegate the actions to WebViewProvider, by default they are no-ops.

Bug: 34780392
Test: Existing tests should be enough
Change-Id: Iefb1045b44a6e8cee5d1cc2c9b194b392d33f36d
2017-03-28 14:24:16 -07:00
TreeHugger Robot
1b782bffdf Merge "make MATCH_FACTORY_ONLY @SystemAPI" into oc-dev 2017-03-28 20:46:44 +00:00
Todd Kennedy
ea2529df19 make MATCH_FACTORY_ONLY @SystemAPI
cherry-picked from I9e2046b62cb20c5b6651e91f833aff04d45d9800

Bug: 35946061
Test: None; just added an annotation
Change-Id: I604f962b9826700c335eeda9682d3354f6260c40
2017-03-28 13:42:00 -07:00
Chad Brubaker
336ae5b616 Add ACTION_EPHEMERAL_RESOLVER_SETTINGS
This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
(cherry picked from commit aa49cb86e6d5f23d82c97db32c848bc4ea2b81bc)
2017-03-28 20:34:55 +00:00
Conrad Chen
e710843fc7 TIF: open transient columns to public
Test: build
Bug: 36557756
Change-Id: Ieb45ee5e6bd27fb33d84799ec1510a410ff7b027
2017-03-28 18:41:45 +00:00
Romain Guy
026a558ab0 Update Color API
Make the class final because its instances are immutable and
it contained only static methods prior to O. Fix a couple of
typos/issues reported by external developers. Add a new variant
of getComponents() to avoid allocations, as requested by
external dev.

Test: Color_ColorLongTest
Bug: 32984164
Change-Id: I3c22e124c9fdf66142d530afa4beb05fe0669359
(cherry picked from commit 48f38f18385e8aed0df48524d8ea3d20eba9199f)
2017-03-28 18:33:47 +00:00
Andrii Kulian
e5c58eefb1 Add Configuration param to onMovedToDisplay
To be consistent with other multi-window callbacks adding
Configuration param to the onMovedToDisplay, so that app
developer can handle configuration change at the same time
when it receives a notification about move.

Bug: 36649499
Test: android.server.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I80c765473bfc09ea1fb7aa4e2e77baf3b21606b8
(cherry picked from commit 2c32a11a71e2a1602b188b710b1916d919d99edb)
2017-03-28 17:28:17 +00:00
George Mount
599be3d01e Make public getFragments() and onGetLayoutInflater() methods
Bug 34703669

Test: I71856306a7bb67aacb84be17165e7e095653c20a
Change-Id: I41999d0f5e6d75afebbbf67ad5bf49fa0cca509e
2017-03-28 16:38:08 +00:00
TreeHugger Robot
9a8eb3db62 Merge "Add honored args when auto-paging." 2017-03-28 03:26:01 +00:00
TreeHugger Robot
15e3d0dba8 Merge "Remove ACTION_CONFIGURE_WIFI_SETTINGS and ACTION_WIFI_SAVED_NETWORK_SETTINGS." 2017-03-28 02:14:37 +00:00
TreeHugger Robot
a2bd52aca3 Merge "Fix issue with task overlay activities not finishing." 2017-03-28 02:02:34 +00:00
TreeHugger Robot
84d7e77ace Merge "Provide deprecated API to avoid build breakage" 2017-03-28 01:29:56 +00:00
TreeHugger Robot
31417b3ebf Merge "Deprecate Setting that is no longer used." 2017-03-28 00:45:34 +00:00
Jaewan Kim
92dea33bfe Simplify the media button handling logic
Here's the new media handling logic.

1. If the foreground app consumes the media key event
  (Activity.onKeyDown/Up() or Activity.setMediaController()),
  we stop here.
2. Find the media app whose AudioPlaybackConfiguration becomes
  PLAYER_STATE_STARTED lastly across the boot. The media app is the app
  with the media session.
  - If its session is still alive, send the media key event
    to the media session.
  - If its session has been released but the session set the media
    button receiver, send the media key event through the media button
    receiver.
  - If it has multiple media sessions, pick the media session whose
    PlaybackState matches with the AudioPlaybackConfiguration's player
    state.
3. Stop here. Don't try revive any other app.

This approach has two limitations.
1. If an app has multiple AudioPlaybackConfigurations and/or
   media sessions, the MediaSessionService may pick the wrong media
   session to send media key events.
2. If an app with a media session plays sound effects differently from
   the SoundPool class, the MediaSessionService would consider the app
   as the lastly played media app.

Bug: 33032080
Test: Manual tests as follows
  1. Checked that the lastly played app receives the media key events
     although the app's media session doesn't report its playback state.
  2. Checked that the lastly played app receives the media key events
     although the app's media session is released.
  3. Checked that the lastly played app doesn't receive the media key
     events if its playback is remote.
Change-Id: I1fd6f9eee0750da4dea9fcc7401fdb1c3f249a72
2017-03-27 14:58:43 -07:00
Amith Yamasani
53e100c468 Provide deprecated API to avoid build breakage
Restored onUtteranceRangeStart() temporarily as a deprecated API.

Bug: 36646809
Test: N/A
Change-Id: I7da927aca4f4ad1f5cc76564e8fdc4261849898b
2017-03-27 14:36:37 -07:00
Winson Chung
6954fc9a7e Fix issue with task overlay activities not finishing.
- The task overlay activity should only exist when there are activities
  present in the task.  When the last such activity is finished, we should
  remove the whole task entirely including the task overlay.
- Exposing the task overlay apis to CTS

Bug: 36507456
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testFinishPipActivityWithTaskOverlay
Change-Id: I1dabe7782fb6769a90d832664e8052be158041e1
2017-03-27 13:34:53 -07:00
Stephen Chen
31484af101 Remove ACTION_CONFIGURE_WIFI_SETTINGS and ACTION_WIFI_SAVED_NETWORK_SETTINGS.
ConfigureWifiSettings page will instead use WIFI_IP_SETTINGS intent.
Intent for SavedAccessPointsSettingsActivity is unused and can be
removed.

Bug: 34392691
Bug: 36516068
Test: make
Change-Id: I86547df387b41241d531e361014581d0763008ee
2017-03-27 13:18:27 -07:00