14678 Commits

Author SHA1 Message Date
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
TreeHugger Robot
18fe8f6359 Merge "Added a callback for AutoFillService." 2016-11-14 17:56:59 +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
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
Julia Reynolds
77b2cc920f Ranker --> Assistant.
Rename ranker to assistant and make some of the methods public.
Delete the ext services ranker and restore the listener-type
lifecycle to the assistant.

Test: manual. add a notification assistant and verify it gets
assistant and listener callbacks.

Change-Id: Ia3406c8c14d923426c1b8a6d8b5187efe64c31c3
2016-11-09 09:04:16 -05:00
Romain Guy
12ae9a0736 Improve support for half floats and expose as public API
Half floats (often called fp16) are commonly used to store floating
point data efficiently without having to use lossy compression schemes.

Half floats are commonly used in the following cases:
- Wide gamut colors
- Meshes (OpenGL and Vulkan)
- HDR images/textures
- Lookup tables as textures (OpenGL and Vulkan), particularly
  in physically-based renderers
- Maching learning/compute

OpenGL and Renderscript both provide Java language APIs that accept
half floats but the platform offers no support to create fp16 values
from fp32 data. The Half class is an IEEE 754 compliant implementation
of half floats that can be used to feed OpenGL and Renderscript properly
encoded values. A comprehensive series of test is also added to CTS.

Test: cts-tradefed run singleCommand cts-dev --module CtsUtilTestCases --test android.util.cts.HalfTest
Bug: 29940137

Change-Id: I908bde7b3c6f65f7a24e0ab5652be4d16cc0358d
2016-11-08 17:58:54 -08:00
TreeHugger Robot
1183883b2e Merge "Implement new API" 2016-11-09 00:30:44 +00:00
Adam Lesinski
f96789d37c Merge "Add font type to AAPT2" 2016-11-08 23:03:58 +00:00
Dianne Hackborn
80361c9ea7 Merge "Move code for handling uid obs "cutoff" to activity manager" 2016-11-08 23:03:21 +00:00
Felipe Leme
5381aa4b58 Initial implementation of the Auto-Fill Framework classes.
This CL provides the initial, skeleton implementation of the Auto-Fill
Framework classes:

- Defines the system service and app-based
  AIDL (IAutoFillManagerService.aidl and IAutoFillService.aidl respectively).
- Defines the 'adb shell cmd' interface.
- Defines the permission required to access the service.
- Registers the service on SystemServer.
- Adds the code to bind the app-specified service to system_server.
- Defines the service class (AutoFillService) required by providers.
- Implements the initial startSession() method.

This is still a very early, "work-in-progress" change:
- It has many TODOs.
- It does not have unit or CTS tests yet.
- It does not provide a callback method to auto-fill the fields.
- In fact, it has a lot of TODOs.

Despite these adversities, it can be tested by following the steps
below:

1.Create an app with a service extending AutoFillService

2.Implement the onNewSession() method

3.In the manifest:
 - Listen to android.service.autofill.AutoFillService intents.
 - Require the android.permission.BIND_AUTO_FILL permission.

4.Explicitly set the app as an autofill-service by running:
  adb shell settings put secure auto_fill_service MY_APP/.MY_SERVICE

5.Start a session against the top activity:
  adb shell cmd autofill start session

BUG: 31001899
Test: manually built and ran it

Change-Id: I00f4822159b31ddddba8f513e57c4474bc74eb89
2016-11-08 14:40:56 -08:00
Todd Kennedy
e5195dd17c Implement new API
This is the first swack at the new, 2-phase API. Adds the new methods
to the resolver service and makes the split name explicit on the
installer intent.

The 2nd phase will not yet be invoked; that's coming in a follow-on
change.

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: I2df6fa64d46f17a86a2e32b19417632c594fb10f
2016-11-08 13:47:28 -08:00
TreeHugger Robot
00c2ed26f6 Merge "Add an extra to pass initial location URI for file choosers." 2016-11-08 21:24:55 +00:00
Dianne Hackborn
5614bf5a1a Move code for handling uid obs "cutoff" to activity manager
To do this, I had to fix the PROCESS_STATE_NONEXISTENT constant
to be the last value (instead of the special magical -1 value)
so it semantically matches the public importance constants.  I
think this is better anyway.

Also this fixes a big problem in the implementation, where we
weren't keeping track of the last proc state per uid...!  Duh.

Test: manually ran testUidImportanceListener
Change-Id: Ie3008f824446089840f896885e6033472abb065e
2016-11-08 11:38:04 -08:00
Pankaj Kanwar
f57b084f3b Merge "Provide an API to make USSD calls and read the responses." 2016-11-08 16:30:37 +00:00
Garfield Tan
b44ae61e01 Add an extra to pass initial location URI for file choosers.
Test: It builds.

Bug: 30031881
Change-Id: I64e9392b0aec75baee13039642316f7e50494567
2016-11-07 17:22:57 -08:00
pkanwar
d570f63b72 Provide an API to make USSD calls and read the responses.
Test: will be added in a subsequent CL.
Bug: 30973910
Change-Id: Ibf622e154f3f987be547f4f85e15891d4e382118
2016-11-07 13:59:48 -08:00
Dianne Hackborn
058f1e4468 Implement system API for monitoring uid importance changes.
Changed the permission for registerUidObserver to be
PACKAGE_USAGE_STATS, which better matches the semantics of this
API and is accessible to system apps.

Test: Added testUidImportanceListener()

Change-Id: Ib47d02bd654fbe399a9c92550c89ecbd38f928dc
2016-11-04 17:05:27 -07:00
Garfield Tan
0b3cf666d0 Unhide findPath() API. Add JavaDoc to related features.
Also remove comments that disallow folders in search results.

Test: It builds.

Bug: 30948740
Bug: 32512923
Change-Id: I72706b69163aa98ee9568939e09e5048b6e8f9f8
2016-11-03 15:42:18 -07:00
Tyler Gunn
ee669d2774 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.

Bug: 27328615
Change-Id: I08fc18950e6d35a8a7df47ce37aa2326624b9fd3
2016-11-03 18:02:41 +00:00
TreeHugger Robot
9c1202be95 Merge "Add VERSION_CODES.O" 2016-11-02 20:27:15 +00:00