14695 Commits

Author SHA1 Message Date
Tobias Thierer
03c28084d5 Merge "API: Rename Collections.singleton*() type arg E -> T" 2016-11-21 14:33:53 +00:00
Tobias Thierer
be7e5900b2 API: Rename Collections.singleton*() type arg E -> T
This rename is part of the update of Collections.java to OpenJDK8u60.

This is compatible change because generic type argument names affect
neither compile time nor runtime compatibility.

The build system (incorrectly) flags this as a change to a released
API. Removing or changing released public APIs is infeasible on AOSP.
Therefore this change will remain restricted to internal branches
until the API is released.

Bug: 31902309
Test: make
Change-Id: I54bc3d6321429ff18c6057332b469286e8b1d42d
2016-11-21 11:45:27 +00:00
TreeHugger Robot
c58e7899be Merge "Define getLooper() method" 2016-11-18 23:06:15 +00:00
Adam Powell
cd09af7282 Merge "Fix FragmentManager.FragmentLifecycleCallbacks scope" 2016-11-18 22:18:42 +00:00
Julia Reynolds
f22d457eeb Merge "Prioritize channel sound & vibration settings." 2016-11-18 22:12:28 +00:00
Todd Kennedy
63d7a9dd6a Define getLooper() method
The default implementation uses the main looper to handle service
operations. This is generally okay until we have to make network
calls to retrieve resolution data.

Bug: 25119046
Test: manual
Change-Id: I22b0f279e6c1fde21f207578d2930ab4858bbc78
2016-11-18 12:55:41 -08:00
Julia Reynolds
0c299d4d63 Prioritize channel sound & vibration settings.
Unless the app is not targeting O and the user hasn't set
a preference in Settings.

Also apps no longer need the vibration permission to vibrate with
a notification.

Test: runtest systemui-notification
Change-Id: Ia84b1c97d13cb479db07035ca622b1fe52261329
2016-11-18 09:29:26 -05:00
TreeHugger Robot
5bec219934 Merge "Phase-2 API takes a hostname" 2016-11-17 20:39:54 +00:00
Adam Powell
74827260a8 Fix FragmentManager.FragmentLifecycleCallbacks scope
Static class is much more useful here.

Bug: 32938039
Test: n/a
Change-Id: I0010fde25e3b2a4f59b360c0035505c831c07c53
2016-11-17 12:20:26 -08:00
Przemyslaw Szczepaniak
167a519143 Merge "Track libcore change Ib691c81b158ec37419a903bfa4261a12139fbff7" am: caa816451c am: d771b36951 am: 728ce76156
am: ab8c119689

Change-Id: I2cd2184418b790a2ff05ca81cde7e9b373fc3b7a
2016-11-17 19:06:06 +00:00
Todd Kennedy
194e4eeb0e Phase-2 API takes a hostname
For phase-2, instead of taking a hash prefix, we will send the
hostname to the resolver.

Bug: 25119046
Test: build & install the sample resolver and run 'adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://www.tripadvisor.com/Tourism-g33020-San_Jose_California-Vacations.html"'
Change-Id: I6e621139e182f9a9cfcf608c26d4763f1379bdb2
2016-11-17 10:56:37 -08:00
Przemyslaw Szczepaniak
d771b36951 Merge "Track libcore change Ib691c81b158ec37419a903bfa4261a12139fbff7"
am: caa816451c

Change-Id: I43c66260714bb312e270bfbae1c74047e6ef01e4
2016-11-17 15:41:57 +00:00
Przemyslaw Szczepaniak
caa816451c Merge "Track libcore change Ib691c81b158ec37419a903bfa4261a12139fbff7" 2016-11-17 15:28:53 +00:00
TreeHugger Robot
c67b49af3f Merge "Javadoc and un@hide ContentResolver#refresh and ContentProvider#refresh." 2016-11-15 21:11:07 +00:00
Andrii Kulian
53ad29fe53 Merge "Add API to launch activities on secondary displays" 2016-11-15 18:27:39 +00:00
Andrii Kulian
16802aab21 Add API to launch activities on secondary displays
displayId can be specified as a part of ActivityOptions.
We will look for a valid stack on the specified display, starting
from the topmost one. If no valid stack is found, new dynamic stack
can be created on external display.
Launch stack and display id can't be set at the same time, otherwise
exception will be thrown.

Test: ActivityManagerDisplayTests
Test: #testLaunchActivityOnSecondaryDisplay
Test: #testConsequentLaunchActivity
Test: #testConsequentLaunchActivityFromSecondaryDisplay
Test: #testLaunchActivityFromAppToSecondaryDisplay
Change-Id: I8a202bc076319e23948d81b99a2c68d7b733b5e4
2016-11-15 17:18:32 +00:00
Garfield Tan
368d703d7d Merge "Add internal support to convert a file system path to document URI." 2016-11-14 23:37:12 +00:00
Ben Lin
2b64a88274 Javadoc and un@hide ContentResolver#refresh and ContentProvider#refresh.
Test: CTS Tests part of same topic.

Bug: 31647485
Change-Id: Iad7f19b6b54f72736fbb7e477f67cf541d838903
2016-11-14 14:30:59 -08:00
TreeHugger Robot
0305eb6201 Merge "Bind AutoFillService on demand." 2016-11-14 19:23:23 +00:00
Tyler Gunn
8b58e73c48 Merge "Add CAPABILITY_SUPPORTS_VIDEO_CALLING to PhoneAccount."
am: 8223dc1ae9

Change-Id: Id8c6077d099f9ef943c09242acb22173b6628c1a
2016-11-14 18:08:11 +00:00
TreeHugger Robot
18fe8f6359 Merge "Added a callback for AutoFillService." 2016-11-14 17:56:59 +00:00
Tyler Gunn
8223dc1ae9 Merge "Add CAPABILITY_SUPPORTS_VIDEO_CALLING to PhoneAccount." 2016-11-14 16:23:43 +00:00
Tony Mak
46aabe5ef4 Allow cross profile call between DO and PO
Allow DO to bind service of PO in managed profile and vice versa.
DO and PO must be the same package.

Bug: 31895999

Change-Id: I3ce2943aebd1249401d5814757a0ce25b9f85279
Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.CorpOwnedManagedProfileTest
2016-11-14 14:20:11 +00:00
Yohei Yukawa
f1ce47bdea Merge changes Ibf5ac3d2,Ie4b216db
* changes:
  Introduce EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING
  Add comments for some int fields in EditorInfo
2016-11-12 01:41:32 +00:00
Felipe Leme
dfa7fbc870 Bind AutoFillService on demand.
BUG: 31001899
Test: manually built and ran it

Change-Id: Ied7028e41c273f5e30f88fc92f919249046877eb
2016-11-11 16:13:09 -08:00
Felipe Leme
29a5b0d0f1 Added a callback for AutoFillService.
So far AutoFillService only received the assist data from framework; in
this CL, it also offers a method where the auto-fill provider can send
the auto-fill data back to framework.

The workflow is:

- AFMSI calls a new AM method (requestAutoFillData(), instead
  of requestAssistContextExtras()).
- The assist receiver is located in the app, not on system service.
- AM uses a new request type (ASSIST_CONTEXT_AUTOFILL) to request the
  assist data to the activity.
- ViewStructure has a new setAutoFillId() method which is used to set an
  unique id for the view.
- View uses the accessibility id to implement the auto-fill id.
- When the activity fullfills the request, it creates an IAutoFillCallback
  remote object - that will be used to set the auto-fill fields - and
  returns it in the assist bundle (using the
  VoiceInteractionSession.KEY_AUTO_FILL_CALLBACK key).
- The app-visible AutoFillService class offers an onFillRequest() method,
  which contains the assist data and a FillCallback used to handle it.

BUG: 31001899
Test: manually built and ran it

Change-Id: I3d208c14e81022dc96dd03f38bbe25a778b24a67
2016-11-11 16:02:55 -08:00
Jack Yu
cb48c48599 Merge "Expose getters for RSRP, RSRQ, RSSNR, and CQI in CellSignalStrengthLte. Regenerate api accordingly. BUG: 32609966 Test: CTS Testing new API" am: 4469e48d5c am: 3cfa510779 am: d517ea753f
am: 9b968a1644

Change-Id: Iaba6209cd6ac5914fb798cbf7003fa1037e2f91f
2016-11-11 20:24:57 +00:00
TreeHugger Robot
3a7c696fc5 Merge "Make getter & setting names consistent." 2016-11-11 20:19:49 +00:00
Jack Yu
3cfa510779 Merge "Expose getters for RSRP, RSRQ, RSSNR, and CQI in CellSignalStrengthLte. Regenerate api accordingly. BUG: 32609966 Test: CTS Testing new API"
am: 4469e48d5c

Change-Id: Id92b8eaeec12885af3748d1e839da1a5560e2619
2016-11-11 19:51:23 +00:00
Tyler Gunn
58cbd7a9c7 Add CAPABILITY_SUPPORTS_VIDEO_CALLING to PhoneAccount.
Adding companion PhoneAccount capability which is used to indicate when a
PhoneAccount supports video calling.  That is, whether it can potentially
make video calls, but not necessarily at the current time.

This is an often requested OEM enhancement which is used to drive UX (e.g.
imagine a video calling icon showing up if the device supports video, but
only being enabled when the device is in range of a VT capable tower).

See bug for reference to design doc.

Merged-Id: I38379a3a1cf1be04c6136b89b93ee95193ee7b6f
Bug: 27328615
Test: Manual
Change-Id: I08fc18950e6d35a8a7df47ce37aa2326624b9fd3
2016-11-11 19:43:57 +00:00
Jack Yu
4469e48d5c Merge "Expose getters for RSRP, RSRQ, RSSNR, and CQI in CellSignalStrengthLte. Regenerate api accordingly. BUG: 32609966 Test: CTS Testing new API" 2016-11-11 19:41:46 +00:00
Tyler Gunn
7519e16698 Merge "Add CAPABILITY_SUPPORTS_VIDEO_CALLING to PhoneAccount." 2016-11-11 18:01:25 +00:00
Julia Reynolds
3785605a44 Make getter & setting names consistent.
Test: runtest systemui-notification
Change-Id: Iff746f0ae149d1b09792e240503db9d008fe267c
2016-11-11 09:36:52 -05:00
Yohei Yukawa
5959af13d0 Introduce EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING
In some situations it would be useful if the application can give a
hint that the user is not likely to want the IME to update
personalized data such as typing history and personalized language
model based on what the user typed the input area.

Typical use cases are:
 * When the application is in a special mode, where user's activities
   are expected to be not recorded in the application's history.
   Some web browsers and chat applications may have this kind of
   modes.
 * When storing typing history does not make much sense. Specifying
   this flag in typing games may help to avoid typing history from
   being filled up with words that the user is less likely to type
   in their daily life. Another example is that when the application
   already knows that the expected input is not a valid word (e.g.
   a promotion code that is not a valid word in any natural language).

Applications need to be aware that the flag is not a guarantee, and
some IMEs may not respect it.

Since this is basically about the general behavior that can be
combined with any of type of input types, this CL uses
EditorInfo.imeOptions instead of EditorInfo.inputType.

Also so far it look OK to do nothing in EditorInfo#makeCompatible()
regarding this flag because 1) this bit (0x1000000) has never been
used and 2) it is less likely that just passing that bit to an IME
that do not know about this bit causes any issue.

Bug: 28157942
Test: compile only as this is just a hint and OS does nothing
Change-Id: Ibf5ac3d2b8f39542baf2635c0cadbe242b059f81
2016-11-10 20:18:30 -08:00
Romain Guy
972fad90d4 Merge "Improve support for half floats and expose as public API" 2016-11-10 23:55:18 +00:00
Garfield Tan
92b96ba8fc Add internal support to convert a file system path to document URI.
Test: Manual tested with a new sample app in development/samples.

Bug: 30261615
Change-Id: I498a22b248fbc55b33d3efb4aa3183207cfb7bab
2016-11-10 15:51:39 -08:00
Tyler Gunn
5d682ce725 Merge "Perform camera permission and app ops check when setting camera for VT." 2016-11-10 23:32:32 +00:00
Winson Chung
7075d79cab Merge "Adding API for apps to specify their aspect ratio when entering PIP." 2016-11-10 23:08:54 +00:00
Ta-wei Yen
fc0f68ca51 Merge "Add createForPhoneAccountHandle() and getServicetate() Respect TelephonyManager's subId when listening to phone state" am: 0a3b6b70dd am: 969a6eb2b8 am: c9698a5cff
am: e1ae654041

Change-Id: Ic28680327d916e3650b3c11fb253353955373922
2016-11-10 22:28:13 +00:00
Ta-wei Yen
969a6eb2b8 Merge "Add createForPhoneAccountHandle() and getServicetate() Respect TelephonyManager's subId when listening to phone state"
am: 0a3b6b70dd

Change-Id: I512e68bccda115ad7c58ec1f1fbfbb2c69c86578
2016-11-10 22:02:17 +00:00
Julia Reynolds
05675c80c1 Merge "Expose dismiss reasons to notification listeners." 2016-11-10 20:46:07 +00:00
Ta-wei Yen
05f9112d15 Add createForPhoneAccountHandle() and getServicetate()
Respect TelephonyManager's subId when listening to phone state

TelecomManager perfers to use a PhoneAccountHandle to represent a
account but TelephonyManager prefers subscription IDs.

This CL added createForPhoneAccountHandle() in TelephonyManager so
telephony values can be queried from it.

Currently the ServiceState can be retrieved through registering a
PhoneStatelistener, but it is a callback which the handler cannot be
specified.

getServiceState() is added to allow the ServiceState to be polled.

While TelphonyManager has createForSubscriptionId(), listen() does not
respect the subId on the manager created from it, and will always use
the hidden subId on the listener, which is always the default subId
through public API.

After this CL, the default subId on the listener will null.
TelephonyManager use its' own subId if the listener does not set the
subId to something else.

Bug: 32637799
Bug: 32414216
Test: cts-tradefed run cts-dev --module CtsTelephonyTestCases
Change-Id: I9995e4da1573cf1f6b6e4acf2daf7a538fb60d5f
2016-11-10 12:11:56 -08:00
Winson Chung
84a3834a0c Adding API for apps to specify their aspect ratio when entering PIP.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testEnterPipAspectRatio
Test: #testEnterPipExtremeAspectRatios

Change-Id: I9efba942b9a6451dec07428fe1e428ef4a896867
2016-11-10 09:19:52 -08:00
Kevin Su
211c1c2ca8 Expose getters for RSRP, RSRQ, RSSNR, and CQI in CellSignalStrengthLte.
Regenerate api accordingly.
BUG: 32609966
Test: CTS Testing new API

Change-Id: I2603fc0001f31ff23f02f4fdf2a72b33f2750a4c
2016-11-09 13:27:20 -08:00
Julia Reynolds
3aa5f1eec0 Expose dismiss reasons to notification listeners.
Test: see cts tests on same topic
Change-Id: Ibae45e125ebc2aa394fbdb41c00341bf0ac101e5
2016-11-09 15:43:49 -05:00
Julia Reynolds
3775a39e39 Merge "Move notification channel from record to sbn." 2016-11-09 20:40:41 +00:00
Julia Reynolds
67c8e1e61f Merge "Ranker --> Assistant." 2016-11-09 20:38:47 +00:00
TreeHugger Robot
00f42c3b28 Merge "Initial implementation of the Auto-Fill Framework classes." 2016-11-09 19:19:32 +00:00
Tyler Gunn
b88b311463 Perform camera permission and app ops check when setting camera for VT.
When a calling InCallService attempts to use the setCamera API on the
VideoCall, Telecom will perform a permission check to ensure that the
caller has the correct camera permission and passes the app-ops camera
check.  A failure to set the camera will result in a callback via the
call session event API.

This got a little messy as the app ops package name needs to come from the
InCallService, and handler usage in the VideoProvider API means we had to
pass around the uid/pid of the caller, obtained before we trampoline onto
the handler.

Test: Unit tests added, manual testing performed.
Bug: 32747443
Change-Id: I555a04f9c3fb45e60bb811f64ba855ccf2e3b0e2
2016-11-09 10:19:23 -08:00
Julia Reynolds
423b9fc83d Move notification channel from record to sbn.
So notificationlisteners know about it.

Test: runtest systemui-notification
Change-Id: I28fc86730d3f7ad246a0164f44157594f57430c0
2016-11-09 09:51:08 -05:00