5375 Commits

Author SHA1 Message Date
Yi Jin
f9ed04b3d9 Remove the extra mapping of field types in ProtoOutputStream
It is very unlikely the protobuf changes the value in descriptor.h,
and if defines an extra mapping, there are several places to maintain:
1. java-stream,
2. cpp-stream,
3. ProtoOutputStream.java
4. ProtoOutputStream.cpp
5. Privacy.h (GetFieldId)
6. StatsLog to generate field id (type << 32 + field number)

Therefore use the current value in descriptor.h seems reasonable unless
they change that, very very unlikely, they probably will just add new
types, and deprect the existing ones like Group.

Test: test output of dumpsys proto
Change-Id: I6e150ab427851dd3b5dd55d3b273deeed7a0963c
2017-11-01 17:49:42 +00:00
Tobias Thierer
ae71c4f23c make update-api
This CL almost exactly reverts http://r.android.com/471377 .

current.txt and friends were not reflecting the latest AOSP API,
ie. "make update-api" was not a no-op like it's supposed to be.

Apart from IpSecManager.SecurityParameterIndex.finalize(), this
seems to mostly revert http://r.android.com/471377 which suggests
that the tooling change that necessitated that CL was probably
reverted without "make update-api" being run on AOSP.

No further investigation was made for what CL(s) caused this or
whether any of this API change is undesired.

Test: Treehugger
Test: make update-api

Change-Id: I5b846627e38c47abb534def97f0cab9d28b1288c
2017-11-01 17:21:59 +00:00
jiabin
6e5a628ab6 Add AudioRouting interface in MediaPlayer
Bug: b/64038649
Test: Run cts in RoutingTest
      && switch output device when using MediaPlayer playing music/video

Change-Id: I48dcfd40c3a6ce01c818f6268cc86ed02b7eaa58
2017-11-01 09:53:17 -07:00
Tony Mak
1b708e68b3 Introduce CrossProfileApps API
CTS will be in next CL.
APIs for labels/ icons of profile switching are not implemented yet.

Test: Wrote a test app to play around the APIs
Test: bit FrameworksServicesTests:com.android.server.pm.crossprofile.CrossProfileAppsServiceImplTest
BUG: 67765768

Change-Id: I27714aa4a8d61c6df398cbc5112cb4c35316a3fb
2017-11-01 10:11:51 +00:00
Hall Liu
3ce024a4b2 Add @TestApi for MbmsDownloadReceiver CTS
Also fix a few bugs that were discovered in the download receiver code
as part of testing.

Bug: 68049452
Test: CTS
Change-Id: Ie5ca77af1fc43e4912bd74957d8ca95d347d229c
2017-10-31 18:58:38 -07:00
Hall Liu
63c5fd60ac Add @TestApi for DownloadStateCallback CTS
Bug: 68049452
Test: CTS
Change-Id: I6bcb1abb1adfe100dee4c381717bcc412578f58b
2017-10-31 18:50:44 -07:00
Hall Liu
156b3041a9 Add @TestApi for EMBMS APIs needed for CTS
Bug: 68049452
Test: CTS
Change-Id: I5d132ac4e67deccf41c998822f82cf94d3f2ce7f
2017-10-31 18:49:09 -07:00
TreeHugger Robot
1e189360cb Merge "Make CarrierConfigManager#KEY_CDMA_ROAMING_MODE public." 2017-10-31 20:33:03 +00:00
Christine Franks
1bade5d629 Add DISALLOW_CONFIG_LOCALE user restriction
Bug: 67586452
Test: make cts && cts-tradefed run cts-dev -m DevicePolicyManager \
-t com.android.cts.devicepolicy.UserRestrictionsTest

Change-Id: Icaf78dec5527c57c00e2b9854ba17ec1982bfac4
2017-10-31 20:19:29 +00:00
Chong Zhang
884162b81b Merge "heif: support heif image sequence and dual-function files" 2017-10-31 18:34:51 +00:00
Jeff Davidson
af1d320555 Make CarrierConfigManager#KEY_CDMA_ROAMING_MODE public.
Mode constants have been moved to TelephonyManager.

Change-Id: I8c9091d9e71e1e38ff31e852301981f268b640cd
Fixes: 29163993
Test: TreeHugger only (no functional changes)
2017-10-31 11:08:34 -07:00
Matthew Ng
f59a4132e8 Add support for minimized mode for right dock side for tablets (1/2)
Tablets have the ability to dock to the right side in landscape. This
change supports minimized mode for right dock side.

Test: run-test CtsActivityManagerDeviceTestCases
android.server.am.ActivityManagerDockedStackTests#
testMinimizedFromEachDockedSide
Change-Id: Ie879bdf7bf74226c0ceda9295f9de2004fd6a9b5
Fixes: 68017311
2017-10-31 11:03:48 -07:00
Chris Phoenix
10a4a64bcc SidekickService (base)
Test: builds; Sidekick watch face animates in Ambient
Change-Id: I5946dbf7194653ac4707b6c186b0a9197d125d5f
2017-10-31 16:02:41 +00:00
Alex Chau
6badae676c Unhide MAKE_USER_EPHEMERAL
- Added javadoc to explain what is ephemeral user

Bug: 64381943
Test: Create ephemeral user with createAndManageUser and verify user is removed after switching or reboot
Test: CTS is covered in ag/2789603
Change-Id: Ia69459520b39de0903433cfa5431529957bb4d82
2017-10-31 10:51:29 +00:00
Chong Zhang
4342f08fab heif: support heif image sequence and dual-function files
- Add a few methods to MediaMetadataRetriever to get still
  images and frames by index.

- Declare keys in MediaFormat related to heif still images.

bug: 63633199

test:
cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice

Change-Id: I9556b27f7395a163aadd01e979930061878994d0
2017-10-30 19:59:43 +00:00
Xi Han
e020c0077d Merge "Migrate flag config_telephony_use_own_number_for_voicemail to Carrier Config." 2017-10-30 17:11:13 +00:00
TreeHugger Robot
34d4130fd4 Merge "Enable variation settings for fonts in XMLs" 2017-10-30 14:29:45 +00:00
Mihai Popa
690e62bb68 Enable variation settings for fonts in XMLs
Bug: 37853920
Test: bit FrameworksCoreTests:android.content.res.FontResourcesParserTest

Change-Id: I1acf9767fb1cecc5f4982b79405f92280b31bfa7
2017-10-30 11:48:54 +00:00
TreeHugger Robot
99981920a3 Merge "Provide a way for jobs to estimate network traffic." 2017-10-28 00:41:53 +00:00
Hall Liu
9cc350e9f6 Merge "EMBMS - Add TestApi and provide service override" am: 1fab41e771 am: dfc37f77c9
am: e90908371a

Change-Id: Icdcffd62883657879c9d80ba703260f36217d286
2017-10-28 00:17:50 +00:00
Hall Liu
e90908371a Merge "EMBMS - Add TestApi and provide service override" am: 1fab41e771
am: dfc37f77c9

Change-Id: I3ecc9c267fa7f107a11bc9e1a4fbdb6c2772ec20
2017-10-27 23:49:37 +00:00
Hall Liu
1fab41e771 Merge "EMBMS - Add TestApi and provide service override" 2017-10-27 23:19:29 +00:00
Mady Mellor
dedcab0bac Merge "Unhide slice view APIs" 2017-10-27 22:28:47 +00:00
TreeHugger Robot
2991cb9944 Merge "Add a carrier config indicating whether user can edit a voicemail number" 2017-10-27 22:16:14 +00:00
Yueming Wang
5593322a2e Merge "Add DISALLOW_CONFIG_DATE_TIME user restriction." 2017-10-27 21:15:47 +00:00
Mady Mellor
800ba36336 Unhide slice view APIs
Test: to be added
Change-Id: I10e6c3259a3cde6f02c968b24f891b1215e12b1b
2017-10-27 13:33:56 -07:00
Cassie
4c6f72cc1b Migrate flag config_telephony_use_own_number_for_voicemail to Carrier Config.
Bug: 65683508
Test: Basic telephony sanity
Change-Id: I3ff7d5726193a554a8154bd13bbfd347c89b6a99
2017-10-27 13:00:18 -07:00
TreeHugger Robot
599ef4698b Merge "New Autofill API: FillResponse.disableAutofill(duration)" 2017-10-27 19:38:32 +00:00
Cassie Han
57b4c6b721 Merge "Add the operator name and MCC/MNC in string format into the CellIdentity." am: 1565803cd2 am: e64d907a49
am: a738702e15

Change-Id: I34d445c50be6f40e00df5a776208e12ceef49f4e
2017-10-27 18:10:02 +00:00
Cassie Han
a738702e15 Merge "Add the operator name and MCC/MNC in string format into the CellIdentity." am: 1565803cd2
am: e64d907a49

Change-Id: I0f145a458bff20dd9e6484120331bcc59b2dd8d3
2017-10-27 17:54:36 +00:00
Cassie Han
1565803cd2 Merge "Add the operator name and MCC/MNC in string format into the CellIdentity." 2017-10-27 17:17:54 +00:00
Felipe Leme
17292d1a25 New Autofill API: FillResponse.disableAutofill(duration)
This API is useful to improve the autofill performance for the scenarios where
the service knows it cannot autofill an app or activity.

Bug: 67867469

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthWhenAppCallsCancel

Change-Id: I58e3eb5714db840104e699d614e750c03e26e8ca
2017-10-27 09:40:59 -07:00
yuemingw
a9772f3602 Add DISALLOW_CONFIG_DATE_TIME user restriction.
Test: cts test for bug 67627542 in following cl
Bug: 67497909

Follow design doc: https://docs.google.com/document/d/1NV93mr2CT157S_haru1QbKo9HLeP9iPM9eMiGfVmfCM/edit#
Change-Id: Iee3c2fbf88b4958dde81330c2e4d60dfce09197f
2017-10-27 10:50:49 +01:00
Charles He
ab57e18da1 Merge "DPM: introduce setLockTaskFeatures()." 2017-10-27 07:57:06 +00:00
manabu, shimoda
1de99d1b4f Add a carrier config indicating whether user can edit a voicemail number
Some carriers require to make it possible to prevent user editing
voicemail number. This carrier config is used to disable voicemail
number setting in Settings.

Test: manual - Checked that the voice mail number editing could be
controlled by carrier config.
Bug: 67872671

Change-Id: Ibbc3e0aa9d3d15abbb44477acd6d3546593a21bf
2017-10-26 17:23:58 -07:00
Hall Liu
64e22af32e EMBMS - Add TestApi and provide service override
Add @TestApi annotations to methods that CTS needs
Add a manifest meta-data key that allows client apps to specify the
exact component name of the MBMS service to bind to.

Bug: 68049452
Test: CTS
Change-Id: I50654c41da38696a25fad93d0a5e0b0c11fa0b42
2017-10-26 15:46:42 -07:00
Jeff Sharkey
caa3f8dc23 Provide a way for jobs to estimate network traffic.
The system would like better insight into the shape/size of network
traffic that jobs will be performing.  For example, the system may
choose to delay jobs with large network usage estimates when the
device has a poor network connection, in order to save battery.

This also paves the way for more interesting optimizations, such as
allowing small jobs to use surplus metered network quota to improve
the overall user experience.

For now, we use these estimates to perform a simple sanity check to
skip jobs that have no possible chance of finishing within the
10-minute job timeout on a given network.  (For example, a job
trying to upload 10MB over a 128Kbps EDGE network is a terrible
idea.)

Test: verified via DownloadManager
Bug: 67040695, 64133169
Change-Id: I9210168b6bda0f0364975a5c7ea25d953a096767
2017-10-26 13:12:14 -06:00
Kurt Nelson
9bcd7e9c5d Move violation extra messages into throwable
Some violations have a separate string from the throwable. Prepending
the string to the throwable's message or using it as the message sets us
up for all violations to extend Throwable.

Bug: 62458734
Test: cts-tradefed run cts-dev --module CtsOsTestCases --test
android.os.cts.StrictModeTest
Change-Id: I6a97ee69a90fb975dc453ca37fe53ea78ebfe974
2017-10-25 17:14:38 -07:00
goneil
dcf5c04e94 Expose SmsManager#sendTextMessageWithoutPersisting as a public API
This API is useful for carrier-privileged apps that wish to use SMS to
transmit carrier system messages without affecting the user-visible
message database.

Change-Id: Ie4f765f3f42a942f5d6d9c85513dc9abaaf32962
Fixes: 25563895
Test: No functional changes.  CTS test
SmsManagerTest#testSmsNotPersisted_failsWithoutCarrierPermissions added
that asserts a failure because CTS does not have carrier permissions
2017-10-25 14:20:06 -07:00
Jeff Sharkey
0d5f5e2b97 Merge "Provide explicit Network via JobParameters." 2017-10-25 20:08:40 +00:00
Jeff Sharkey
76a0241eff Provide explicit Network via JobParameters.
On devices with multiple active networks, or rapidly switching
between networks, we need an API to tell jobs explicitly which
network to use.  (For example, the default route could meet all
job criteria, but we could have changed the default network by the
time we spun up the JobService.)

This also paves the way for us choosing to run jobs over
non-default networks.

Test: verified via DownloadManager
Bug: 64133169
Change-Id: Ic8d654707e39236c8da85a5e172161ac39e5f0b3
2017-10-25 11:23:22 -06:00
Cassie
933b78d977 Add the operator name and MCC/MNC in string format into the CellIdentity.
Bug: 63984327
Test: Basic telephony sanity
Change-Id: Ia5e7f5b980efbde647f95f3e83a62d56132b90da
2017-10-25 10:04:31 -07:00
Kurt Nelson
1efd46211f Merge "Plumb real stack traces through StrictMode" 2017-10-24 22:19:44 +00:00
Jeff Davidson
beb90fda29 Expose SmsMessage#FORMAT_ constants as public APIs.
These constants are intended to be arguments for
SmsManager#injectSmsPdu which is already public, and they are
referenced from CTS as well. Therefore, they should also be public.

Also add a @StringDef for these values and clean up the Javadoc while
we're here to use properly-linked references to other APIs.

Change-Id: I4e513f49f18350b93cccdc0d8a5847d31eefe7e2
Fixes: 67751433
Test: TreeHugger (no functional changes)
2017-10-24 18:25:26 +00:00
Charles He
e078db7539 DPM: introduce setLockTaskFeatures().
Add new DPM APIs to control which SystemUI features are enabled during
LockTask mode:
* setLockTaskFeatures()
* getLockTaskFeatures()
* int flags representing various configurable SystemUI features

Bug: 65813398
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Test: bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
Test: cts-tradefed run cts-dev --module DevicePolicyManager -t com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Change-Id: I0ee3cf6dbe2234ec29d1384195dadc0f290aa73b
2017-10-24 18:13:19 +01:00
Yueming Wang
302318bc9b Merge "Add setTime and setTimeZone API." 2017-10-23 17:29:09 +00:00
Kurt Nelson
0918c93a3f Plumb real stack traces through StrictMode
Currently StrictMode uses a string representation of the entire stack
trace throughout. Switching to passing Throwables will allow callback
consumers to traverse an array.

It does not regress the performance test added in ag/3083879.

Test: adb shell am instrument -w -e class android.os.StrictModeTest \
    com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

timeThreadViolation_mean=332071
timeThreadViolation_median=328184
timeThreadViolation_min=311253
timeThreadViolation_standardDeviation=16106

timeCrossBinderThreadViolationNoStrictMode_mean=1843599
timeCrossBinderThreadViolationNoStrictMode_median=1824457
timeCrossBinderThreadViolationNoStrictMode_min=1810186
timeCrossBinderThreadViolationNoStrictMode_standardDeviation=43539

timeCrossBinderThreadViolation_mean=2300256
timeCrossBinderThreadViolation_median=2148796
timeCrossBinderThreadViolation_min=1792660
timeCrossBinderThreadViolation_standardDeviation=472271

timeVmViolationNoStrictMode_mean=27794864
timeVmViolationNoStrictMode_median=26617027
timeVmViolationNoStrictMode_min=23994153
timeVmViolationNoStrictMode_standardDeviation=3384362

timeVmViolation_mean=32878535
timeVmViolation_median=34775241
timeVmViolation_min=28373537
timeVmViolation_standardDeviation=3462046

timeThreadViolationNoStrictMode_mean=373863
timeThreadViolationNoStrictMode_median=388998
timeThreadViolationNoStrictMode_min=333664
timeThreadViolationNoStrictMode_standardDeviation=33219

Bug: 62458734
Change-Id: I6b3924be91f19654c502e0ec2f44cc07d6e86e3f
Test: cts-tradefed run cts-dev --module CtsOsTestCases --test
android.os.cts.StrictModeTest
2017-10-23 10:04:19 -07:00
yuemingw
e43cdf7509 Add setTime and setTimeZone API.
Fix: 67497358
Test: wait for cts test in the following cl. For unitest:
 runtest -x services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java

Add setTime and setTimeZone API in devicepolicymanager.
Add unitest for each API.
Following design doc: https://docs.google.com/document/d/1NV93mr2CT157S_haru1QbKo9HLeP9iPM9eMiGfVmfCM/edit

Change-Id: I188c27b0b99137b6f01e42ae1ad49356ce0a81b2
2017-10-23 10:53:15 +01:00
TreeHugger Robot
f5699224e9 Merge "Add FingerprintEnroll API" 2017-10-20 21:41:01 +00:00
Felipe Leme
24604a3a62 Merge "New Autofill API: TYPE_CONTEXT_COMMITTED events." 2017-10-20 16:38:21 +00:00