12860 Commits

Author SHA1 Message Date
Yohei Yukawa
24df931e9e Unhide View#dispatch{Start,Finish}TemporaryDetach()
In order to fix Bug 18920212, we have to track when a View enters
temporarily detached state and when it exits from that state. To do
that, ListView needs to use View#dispatchStartTemporaryDetach() instead
of directly calling View#onStartTemporaryDetach() because there is no
guarantee that existing applications have internally followed Call-Super
pattern.

With this CL, we are going to expose temporary detach state and its
dispatching methods as public APIs.  Major changes are:
  1. ListView's indirect children will start receiving temporary
     dispatch callbacks. Previously only direct children have received
     View#on{Start, Finish}TemporaryDetach() callbacks.
  2. TextView can no longer assume that ListView never calls
     View#View#dispatchStartTemporaryDetach() but directly call
     View#onStartTemporaryDetach() instead. See the commit message
     of [1] for details.

This also enables us to do the following fixes, which will be handled in
subsequent CLs.
  A. ViewCompat support lib is finally able to rely on temporary
     dispatch mechanism without reflection.
  B. InputMethodManager is now able to ignore focus-in events from
     temporarily detached Views. This will be done in the next CL [2].

  [1]: a440b002aa59e1455bdfa2c5a1ca51c74bbc19ac
  [2]: Ia79bbd8468f768d546354382b47b39dd31ef7bb5

Bug: 18920212
Bug: 27905921
Change-Id: If8f780f8b71754f7533a65097304113ae1f5cf12
2016-03-31 17:15:23 -07:00
Makoto Onuki
ca0ee285bb Merge "ShortcutManager: Support secondary text field." into nyc-dev 2016-03-30 15:30:17 +00:00
Philip P. Moltmann
a393be9319 Merge "Add cancelation signal to OnRequestPrinterIcon." into nyc-dev 2016-03-30 15:18:32 +00:00
Andrei Stingaceanu
b70ba1971c Merge "AfW custom lock screen message - API polish" into nyc-dev 2016-03-30 12:23:56 +00:00
Makoto Onuki
e3ae7ec14a ShortcutManager: Support secondary text field.
Bug 27548047

Change-Id: I2d184bab2c26e351b7326945fa0cacf826f16d1e
2016-03-29 16:42:12 -07:00
Adam Powell
679be2d6c4 Add contentInsetStartWithNavigation/EndWithActions
Allow developers to set different content insets on toolbars and
action bars to be used when navigation buttons or menu actions are
present. Set the default values for these according to the material
spec.

Bug 19317855

Change-Id: I13e04e1f19f0982bf551a3027eb70904d6b4674c
2016-03-29 14:24:15 -07:00
Chet Haase
fd48a321c9 Merge "Add setHasOverlappingRendering() method" into nyc-dev 2016-03-29 19:19:14 +00:00
Chet Haase
15b6ba5859 Add setHasOverlappingRendering() method
View.hasOverlappingRendering() is an important performance tweak that
subclasses can override to do the right thing return false when appropriate
to avoid expensive operations when view is translucent).
But this requires subclassing View to get this behavior.

This new API allows the property to be set from outside, enabling
standard views to have this behavior set. When the new method is called,
the behavior will derive from whatever it was set to. Otherwise, it
will default to the old/overriden behavior.

Issue #16561361  Make hasOverlappingRendering settable from outside/XML

Change-Id: If0fbc8667cdb82b1d85e795e782716a07196f3c0
2016-03-29 11:01:27 -07:00
Shubham Ajmera
1f8fb9f95a Merge changes from topics 'list_default_method', 'map_default_methods' into nyc-dev
* changes:
  Add OpenJDK 8 java.util.List Default Methods
  Port OpenJDK8 changes in java.util.Map
2016-03-29 14:59:00 +00:00
Shubham Ajmera
444a51d1c9 Add OpenJDK 8 java.util.List Default Methods
and corresponding tests.

Added replaceAll and sort methods from the upstream except for the
CopyOnWriteArrayList.

Added forEach method along with the above two methods in
CopyOnWriteArrayList.

Bug: 27693350
Bug: 27540008

(cherry-picked from commit 6206c9f2e70d7b63d8a306a46534c21e4f8fe6f7)

Change-Id: I9efbd66b65c06b50fc20f63d477c25a05a8fae02
2016-03-29 15:50:38 +01:00
Shubham Ajmera
338dd5b6c9 Port OpenJDK8 changes in java.util.Map
& add tests.

The CL add tests for map default methods added in Java 8 - getOrDefault,
putIfAbsent, remove(K, V), replace(K, V, V), replace(K, V), forEach,
replaceAll, compute, computeIfAbsent, computeIfPresent, putIfAbsent,
merge.

Methods have been made synchronzed in Hashtable. They are using the
default map methods instead of taking the upstream changes.

Replace(K, V, V) in LinkedHashMap has been  overridden as it doesn't
record access when the replace method doesn't make any replacement.

Bug: 27426743

(cherry-picked from commit 6206c9f2e70d7b63d8a306a46534c21e4f8fe6f7)

Change-Id: Ie27ea5bd42ddbfa751b89f9eacfb290a3d69f4bb
2016-03-29 15:25:21 +01:00
Andrei Stingaceanu
16187903b4 AfW custom lock screen message - API polish
DevicePolicyManager:
* getDeviceOwnerLockScreenInfo now returns CharSequence as it returns a string
  for display to a user
* setDeviceOwnerLockScreenInfo
** accepts CharSequence, not String as this is a string displayed to the user
** Returns void; throws an appropriate runtime exception on failure

Bug: 27531295
Change-Id: I30528569cfa66ee76f857fbee1c3196f821718fd
2016-03-29 13:04:29 +00:00
Gustav Sennton
79f1216eb1 Remove the system api method WebViewFactory.getWebViewPackageName
We no longer user this method and it doesn't return any useful
information.

Bug: 27719581

Change-Id: Id282f1501cde9a7d7cc1fe66016cfb54956686c5
2016-03-29 13:36:02 +01:00
Philip P. Moltmann
e54d79c4cd Add cancelation signal to OnRequestPrinterIcon.
Change-Id: I072d2c15e8df104a8b902c10d14d9f02040ace5f
2016-03-28 17:13:34 -07:00
Tao Bao
9971d02c38 Merge "UpdateEngine: Add resetStatus() as system API." into nyc-dev 2016-03-28 19:51:36 +00:00
Andrii Kulian
162c9d0425 Merge "Fix API numbering issues" into nyc-dev 2016-03-28 19:28:23 +00:00
Brad Ebinger
900f1635c0 Merge "Add VIA number column to CallLog Database" into nyc-dev 2016-03-28 19:27:20 +00:00
Lifu Tang
a89a392aef Merge "Added missing constants to GnssMeasurement" into nyc-dev 2016-03-28 18:22:28 +00:00
Andrii Kulian
ad462701a8 Fix API numbering issues
This fixes issues with API numbering introduced in
2e751b8c778fd991fcdcec3bc2d1f32a722f436b.

Original commit replaced 'minimalSize' resource with 'minimalWidth' and
'minimalHeight' and 'make update-api' shifted the numbering of other resources.
This change reverts the shift, reuses number of 'minimalSize' and adds
another one new.

Bug: 27528326
Change-Id: I7d327f00043c2bd2aab7285e03223a042e8c97a3
2016-03-28 11:16:31 -07:00
Shubham Ajmera
47f542fc04 Merge "Add OpenJDK Arrays parallelSetAll methods" into nyc-dev 2016-03-28 10:57:31 +00:00
Shubham Ajmera
88c2c90a12 Add OpenJDK Arrays parallelSetAll methods
Adds parallelSetAll(int[], java.util.function.IntUnaryOperator),
parallelSetAll(long[], java.util.function.IntToLongFunction),
parallelSetAll(double[], java.util.function.IntToDoubleFunction),
parallelSetAll(T[], java.util.function.IntFunction<? extends T>)
from the upstream along with the corresponding tests.

Bug: 27540010
(cherry-picked from commit 4293e554dbdc7aae8f965b8da96be03219584a17)
Change-Id: Iaa4a0749d8bb95ea8a0072a43bfbd6d6f459ff28
2016-03-28 11:53:20 +01:00
Jeff Sharkey
4d9b6e4f57 Merge "Include "invisible" volumes in new storage API." into nyc-dev 2016-03-28 05:18:40 +00:00
Andrii Kulian
47869bd446 Merge "Update ActivityInfo#WindowLayout apis (1/3)" into nyc-dev 2016-03-28 00:25:01 +00:00
Andrii Kulian
2e751b8c77 Update ActivityInfo#WindowLayout apis (1/3)
Adds documentation, renames Layout to WindowLayout and
splits #minimalSize to #minimalWidth and #minimalHeight.

Bug: 27528326
Change-Id: Idb440cb081a14ccdc83309284e906454633c4504
2016-03-27 15:35:33 -07:00
Jeff Sharkey
c02bfae73e Include "invisible" volumes in new storage API.
The purpose of the new StorageVolume API is to grant access to
volumes that aren't typically "visible" to a developer, so include
them in the returned results.

Also return the real mounted state instead of augmenting based on
the caller's storage permissions.  Clean up API naming slightly and
return as List.

Bug: 27615770
Change-Id: Ida921a4b91e5af81e418e76f672d9108f45a9781
2016-03-27 15:06:57 -06:00
Jeff Sharkey
c9a40cd844 Add methods to probe current storage state.
Bug: 27811575
Change-Id: I2586fe3ec4d5c98c5b956f4b4a4cec425c81b0b1
2016-03-27 12:10:38 -06:00
Chad Brubaker
e4c5c161dd Merge "Add handleTrustStorageUpdate" into nyc-dev 2016-03-26 16:36:31 +00:00
Edward Cunningham
d0ee17d926 Merge "DO NOT MERGE Revert "Revert "DO NOT MERGE Extend the DownloadManager.addCompletedDownload() method to support origin details.""" into nyc-dev 2016-03-25 22:01:07 +00:00
Chad Brubaker
bf9a82a643 Add handleTrustStorageUpdate
This pruns all the stored trusted issuers so that changes to the system
or user CA store are detected. Currently this is only exposed as a
TestApi, but it can be hooked up to the trusted storage change event
in a future commit.

Bug: 27526668
Change-Id: Ic426254babab9a3177c968bc05b45e95eaac1fdd
2016-03-25 14:48:44 -07:00
Edward Cunningham
abb2c5af8e DO NOT MERGE Revert "Revert "DO NOT MERGE Extend the DownloadManager.addCompletedDownload() method to support origin details.""
This reverts commit c6f5738d3c8621d2e682026e35e57f540750d117.

Change-Id: Ibb330f44c3910b3fc124ee8c718a508cdf3b32b4
2016-03-25 20:56:31 +00:00
Lifu Tang
047b05ea6e Added missing constants to GnssMeasurement
Bug: 27816668
Change-Id: Ib1638f5ac3941c4b6d9babca0acdc80df498e0af
2016-03-25 12:56:32 -07:00
Philip P. Moltmann
ebf397625e Merge "Change hasCustomPrintIcon and setStatus as requested by API council." into nyc-dev 2016-03-25 16:50:36 +00:00
Narayan Kamath
700c7f80c1 Merge "Track libcore change df3cf7e4cf590086d1cdd09b6e0d3104de167e61." into nyc-dev 2016-03-25 10:20:51 +00:00
Sungsoo Lim
21c03f0c61 Merge "MediaBrowser: Applying API Review" into nyc-dev 2016-03-25 04:29:56 +00:00
Tyler Gunn
720c664401 Add connection properties to Connections.
- Per suggestion of API council, moving properties of a Connection from
CAPABILITIES_* to PROPERTIES_*.

Bug: 27458894
Change-Id: Icce921b03cda514a991646ed39a26559c7e91230
2016-03-24 20:20:11 -07:00
Jiabin Huang
2dc6cc9aa4 Merge "TIF: Unhide TvRecordingClient.tune(String, Uri, Bundle)" into nyc-dev 2016-03-25 02:26:04 +00:00
Philip P. Moltmann
d74d1e5491 Change hasCustomPrintIcon and setStatus as requested by API council.
Bonus: null advanced keys produced a exception deep in the print
       spooler. Hence prevent null keys on the surface from now on.

Bug: 27716355
Change-Id: I3c064956f4e670cd7091437ade06605aa8d797b0
2016-03-24 16:53:36 -07:00
Robin Lee
363e70dd00 Merge "Declare provider.Settings intent for VPN fragment" into nyc-dev 2016-03-24 18:32:52 +00:00
Abhijith Shastry
d1ceef09a7 Merge "Add an unblock API to BlockedNumberContract." into nyc-dev 2016-03-24 17:33:58 +00:00
Robin Lee
a249aee10b Declare provider.Settings intent for VPN fragment
Currently used for a number of tests. May also be useful for 3rd-party
apps using VPN in some manner or another.

Bug: 27700919
Bug: 26887434
Change-Id: I4d269954265a2590499e20150f009fe437c8078f
2016-03-24 17:25:06 +00:00
Narayan Kamath
13cdc371a2 Track libcore change df3cf7e4cf590086d1cdd09b6e0d3104de167e61.
bug: 27464570
Change-Id: I83d0b410ae7f928ba4545127ed7035772b21e12b
2016-03-24 16:38:20 +00:00
Clara Bayarri
3e5bf786b7 Merge "Keyboard Shortcuts: plumb deviceId through" into nyc-dev 2016-03-24 13:30:48 +00:00
Clara Bayarri
bfd996f5cd Merge "Keyboard Shortcuts: Add Keycodes for shortcut representation" into nyc-dev 2016-03-24 11:49:05 +00:00
Clara Bayarri
fcd7e80b21 Keyboard Shortcuts: plumb deviceId through
Bug: 27673736
Change-Id: Ie72807aa8c2bfd142b081a6a915e101c16d31473
2016-03-24 11:47:32 +00:00
Clara Bayarri
4e850ffaa7 Keyboard Shortcuts: Add Keycodes for shortcut representation
This changes the current API given app feedback received. In order to use
keycodes as well as chars we also must implement a mapping of Keycodes to
Display labels as only keys with a single char representation are provided
by KeyCharacterMap.

Bug: 27409783
Change-Id: I3da653adc4b8cbc66a4d1aa24a5f9181f71e83c3
2016-03-24 11:47:23 +00:00
Abhijith Shastry
cdc2a4c737 Add an unblock API to BlockedNumberContract.
The delete API need not unblock a number if there are multiple copies of a single number.

BUG: 27790536

Change-Id: I6391b0c095827afe85f2ee5d1756741e144c8c26
2016-03-23 19:29:59 -07:00
Jiabin
d48d029da4 TIF: Unhide TvRecordingClient.tune(String, Uri, Bundle)
Bug: 27762945
Change-Id: I7f9757f8ca1eb92f892fb2961717125c8b909663
2016-03-24 09:57:27 +09:00
Tyler Gunn
dee56a8a79 Expand call/connection extras API.
Currently, connection extras are propagated up to Telecom as an
entire bundle.  This is not ideal, as any time a change is made to
the extras, the bundle needs to be fetched, changed, and then re-set on
the connection, where it is parceled to Telecom as a whole.

Using how extras on an Intent as inspiration, this CL adds separate
putExtras, putExtra, and removeExtra methods to allow manipulation of
the extras bundle without operating on it in its entirety.

This Cl also adds support for Calls modifying the extras bundle, with
changes propagated back down to ConnectionServices.

Bug: 27458894
Change-Id: I152340a3bca2dc03f170b06b172a6823410fb961
2016-03-23 16:06:34 -07:00
Brad Ebinger
b3e934ba3e Add VIA number column to CallLog Database
Add a column to the CallLog Database that records the secondary line
number that an incoming call has been received on. More specifically, a
call is assumed to be considered a "VIA number" if the call's incoming
line number does not match the number registered with the SIM card.

BUG: 25594198
Change-Id: Idc7ea7b3539c859031a6911ec6b211fd2d8dd085
2016-03-23 13:18:10 -07:00
Peng Xu
370985d00a [Sensor] Add a constant to match native header
This CL add private sensor type base constant to java file to match
C header file.

It is defined that all vendor sensor types have to be >= 0x10000.
There is a constant in sensor.h for reference. However, there is
no such constant defined in Sensor.java before. This CL adds it.

Change-Id: Ia8f8c06583c62879e51779815051c346f1a9cd14
(cherry picked from commit 1795e14dab0367fdd77f2c1eee6b4fd39d1c5902)
2016-03-23 17:51:02 +00:00