284898 Commits

Author SHA1 Message Date
Hugo Benichi
cc9f695ba0 Merge changes Ie762ce75,I611fd791
am: 21a57f263f

Change-Id: Ibb291720f6c257a8ead2c039f584f4b3ecc69be5
2017-05-11 12:43:42 +00:00
Hugo Benichi
21a57f263f Merge changes Ie762ce75,I611fd791
* changes:
  ConnectivityManager: unit test for argument validation
  ConnectivityManager: uses service error codes and exceptions
2017-05-11 12:31:41 +00:00
Nicolas Geoffray
10085b3737 Merge "Remove obsolete DEXOPT_SAFEMODE."
am: 383b2af3ec

Change-Id: I97ccd9f087366d93495e3aeb8b26780039fd417b
2017-05-11 09:59:49 +00:00
Nicolas Geoffray
383b2af3ec Merge "Remove obsolete DEXOPT_SAFEMODE." 2017-05-11 09:42:25 +00:00
Hugo Benichi
6e039a13cc ConnectivityManager: unit test for argument validation
Bug: 36701874, 37107940
Test: new test passes
Change-Id: Ie762ce758b3d94052b7438a67fc55bef4690cbbb
2017-05-11 14:15:20 +09:00
Hugo Benichi
cb88323dd2 ConnectivityManager: uses service error codes and exceptions
This patch introduces between ConnectivityManager and
ConnectivityService a mechanism for propagating back to clients
informative errors in the form of error codes and associated custom
runtime exceptions.

Without error code, the service can only throw a limited number of
different exceptions over Binder. Furthermore the throw site stack
traces are always loss. Although for individual instances of a throw,
the error message can be inspected, aggregations of stack traces from
app crashes sanitize error messages and only leaves the stack traces.

This makes debugging dificult for some service calls such as
requestNetwork that can have a variety of failure modes.

In this patch only one failure mode is codified. More can be added later
at a light cost by: 1) defining an error code, 2) defining an
associated exception, 3) mapping the code to the exception. This patch
can serves as a template for doing so.

Test: $ runtest frameworks-net,
      #testNetworkRequestMaximum() detects the new exception type.
Bug:  36556809, 36701874
Change-Id: I611fd7915575c9e418f7149fcdc8a879d2a3716d
2017-05-11 14:15:15 +09:00
Andre Eisenbach
9413fd9e1f Merge "Bluetooth: HID: Add support for Set Idle and Get Idle Commands (3/4)"
am: 51876abe82

Change-Id: Ia3242c0c2d7111b356c3ad2c70e8b1bea4572e9a
2017-05-11 00:43:49 +00:00
Andre Eisenbach
51876abe82 Merge "Bluetooth: HID: Add support for Set Idle and Get Idle Commands (3/4)" 2017-05-11 00:37:44 +00:00
Brad Ebinger
6d249dc08c Merge "Notify ImsService Status Correctly"
am: 1bb9181380

Change-Id: I694072b5125151cd1db6b88774c09126199e7cc0
2017-05-10 23:48:12 +00:00
Brad Ebinger
1bb9181380 Merge "Notify ImsService Status Correctly" 2017-05-10 23:00:54 +00:00
Stanley Tng
1755a4af45 Merge "Add Save and Restore of BluetoothOn setting"
am: bbcc641317

Change-Id: Ie967141aa0d8f43750f84fdd6071c26e0a26958a
2017-05-10 21:17:44 +00:00
Treehugger Robot
bbcc641317 Merge "Add Save and Restore of BluetoothOn setting" 2017-05-10 20:44:35 +00:00
Hall Liu
22ff1759d2 Merge "Increase limit of locale pairs"
am: aa9a59ab32

Change-Id: I4f9d25169bbd7e53c5396e944613e8c15fe4e308
2017-05-10 17:15:31 +00:00
Robert Greenwalt
a89cacebfb Merge "Update startStreaming to return status code"
am: 6476ceeaee

Change-Id: I92f8fad5bff456b158ba2afd55c3065678b0d5cf
2017-05-10 17:11:12 +00:00
Hall Liu
aa9a59ab32 Merge "Increase limit of locale pairs" 2017-05-10 16:46:19 +00:00
Treehugger Robot
6476ceeaee Merge "Update startStreaming to return status code" 2017-05-10 16:46:14 +00:00
Brad Ebinger
eca799105f Notify ImsService Status Correctly
Modifies ImsService to allow multiple status callbacks in
for one ImsFeature. This better handles one ImsFeature
for normal/emergency calling.

Bug: 38001858
Test: Unit Testing
Merged-In: I70ae6f5349aef75aa86d54fe37a3c32459ea3afa
Change-Id: I70ae6f5349aef75aa86d54fe37a3c32459ea3afa
2017-05-10 16:45:14 +00:00
Stanley Tng
767f05feea Add Save and Restore of BluetoothOn setting
This change will automatically save the Bluetooth On setting when
the user chooses to backup the phone settings into the cloud. This
setting is restored by the Setup Wizard (SUW) when configuring the
phone and this change will enable or disable the Bluetooth based
on this restored setting.

Bug: 35657817
Test: Manual test with Sailfish
Change-Id: Ie4518593af63f96f8c363f98941ca5260a3ec4bb
2017-05-10 16:28:47 +00:00
Hemant Gupta
cef9ce368c Bluetooth: HID: Add support for Set Idle and Get Idle Commands (3/4)
Provides an interface for application to send Set Idle
and Get Idle commands to remote HID Device. Support for these
two commands was missing from existing code, so existing code
design is reused to add support for these two commands.

Without this support following mandatory PTS test cases for HID 1.0
cannot be passed, TC_HOS_HID_BV_05/06.

Test: Executed PTS tests TC_HOS_HID_BV_05/06 and confirmed if they can
pass

Bug: 34344715
Change-Id: I548362cc328498920b2dae740f1a76b2cc2d6a67
2017-05-10 16:23:17 +00:00
Nicolas Geoffray
307a5af2ad Remove obsolete DEXOPT_SAFEMODE.
PackageManager side of the change.

bug:37929796
Test: build

(cherry picked from commit 56123bacff220e6ac77a1179197578d3a62ecdd2)

Change-Id: I3a789d49121ca383f7931f3803b6140be456340f
2017-05-10 16:47:23 +01:00
Paul Duffin
e73cd1f690 Merge "Statically include android.test.runner classes in legacy-android-test"
am: 9588b607f0

Change-Id: I17d3c541190c3301b27ee09806681615d97a6240
2017-05-10 11:30:14 +00:00
Paul Duffin
9588b607f0 Merge "Statically include android.test.runner classes in legacy-android-test" 2017-05-10 11:18:43 +00:00
Hugo Benichi
cd6537edb5 Merge "NetworkStatsFactory: no double looping on stats + stacked interfaces"
am: 1683224416

Change-Id: Id4987bc7f3cd486d0a0eeb1c2e5069076377de0a
2017-05-10 09:00:39 +00:00
Hugo Benichi
1683224416 Merge "NetworkStatsFactory: no double looping on stats + stacked interfaces" 2017-05-10 08:19:33 +00:00
Jakub Pawlowski
5bd173cd93 Merge "Bluetooth: Fix Periodic Adv interval check"
am: cb70647418

Change-Id: I2bd2aec1b09401ea66d8e3df5654248d676d2fb7
2017-05-10 07:34:24 +00:00
Jakub Pawlowski
cb70647418 Merge "Bluetooth: Fix Periodic Adv interval check" 2017-05-10 07:23:17 +00:00
Sunny Kapdi
037d3513e0 Bluetooth: Fix Periodic Adv interval check
The MIN and MAX values need to be swapped else
the parameter check in setInterval would always
fail

Bug: 37579882
Change-Id: I48538c2a61be88caaf04abd94074b3d9eb6dde96
2017-05-10 07:23:06 +00:00
Hall Liu
244912f414 Merge "Changes to MbmsStreamingManager for test app"
am: df57734354

Change-Id: I661e2cb4609f556d31e464d1cadff459b9b80354
2017-05-10 01:05:26 +00:00
Hugo Benichi
49bc06d0f9 Merge "NsdService: more cleanups"
am: 903d64634a

Change-Id: Id61e1e2e240134c44e06bc9d78075ffcff8b5ff6
2017-05-10 00:53:24 +00:00
Hall Liu
df57734354 Merge "Changes to MbmsStreamingManager for test app" 2017-05-10 00:50:49 +00:00
Hugo Benichi
903d64634a Merge "NsdService: more cleanups" 2017-05-10 00:37:11 +00:00
Hugo Benichi
76dc14ec88 Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks"
am: ba666e0621

Change-Id: I6c25c2f5f95ac2ffefe263b34e95009b9823c254
2017-05-10 00:23:06 +00:00
Hugo Benichi
00a16e077a NetworkStatsFactory: no double looping on stats + stacked interfaces
This patch uses the associative structure of the stacked/base interface
collection to avoid the two nested for loops over stacked/base
interfaces and all stats entries when correcting 464xlat traffic stats.

Consequently the list of stats entries is iterated only once.

Test: runtest -x frameworks/base/../NetworkStatsFactoryTest.java
Bug: 33681750
Change-Id: I84ae997fb693b909f431764697627b9957131732
2017-05-10 09:14:14 +09:00
Hugo Benichi
ba666e0621 Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" 2017-05-10 00:07:29 +00:00
Andre Eisenbach
0771cb13a2 Merge "Bluetooth: Fix interval low/min values"
am: 66deee2bd4

Change-Id: I42d9a56ca85715dae2093bada1ecadd0a4c0c74e
2017-05-09 23:49:19 +00:00
Andre Eisenbach
66deee2bd4 Merge "Bluetooth: Fix interval low/min values" 2017-05-09 23:26:15 +00:00
Jakub Pawlowski
6b1f39502c Bluetooth: Fix interval low/min values
Bug: 38175945
Test: none
Change-Id: Idf487c7aafc518f2c57be78a1fa979b2c4a383d6
2017-05-09 22:59:18 +00:00
Alex Klyubin
44eb369c83 Merge "Switch from libcrypto_static to libcrypto target"
am: 4ad5256547

Change-Id: Iba529dac6e8c3fc62e0f6a700604299fa9e1f629
2017-05-09 19:26:13 +00:00
Alex Klyubin
4ad5256547 Merge "Switch from libcrypto_static to libcrypto target" 2017-05-09 19:13:53 +00:00
Android Build Merger (Role)
7e93a915a6 Merge "Merge "Bluetooth: Move Bluetooth battery stats tracking (1/2)" am: 7df4093371" into stage-aosp-master 2017-05-09 18:54:21 +00:00
Ajay Panicker
f9dfd7d20c Merge "Bluetooth: Move Bluetooth battery stats tracking (1/2)"
am: 7df4093371

Change-Id: I6f3fa3a9f48113c20a8dc4912b782eab2c4ef39a
2017-05-09 18:50:12 +00:00
Ajay Panicker
a3fe28806e Merge "Bluetooth: Move Bluetooth battery stats tracking (1/2)"
am: 7df4093371

Change-Id: Ie6a4af6f5ac48e529aaeee34d92f893e710d8278
2017-05-09 18:05:55 +00:00
Treehugger Robot
7df4093371 Merge "Bluetooth: Move Bluetooth battery stats tracking (1/2)" 2017-05-09 17:53:20 +00:00
Ajay Panicker
a43bd01bd1 Bluetooth: Move Bluetooth battery stats tracking (1/2)
Move Bluetooth battery stats tracking to AppScanStats for a more
unified tracking system.

Bug: 37720787
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testBleScans
      Perform BLE scan and check battery stats
Change-Id: Ie6c682374e6e258c291d3a11eede649c7747ef40
2017-05-09 17:52:36 +00:00
Paul Duffin
4e0c19048d Statically include android.test.runner classes in legacy-android-test
In preparation for removing junit and android.test classes from
the Android API this change adds the android.test classes that are in
the android.test.runner library into legacy-android-test so that they
can be statically included into the application.

The junit.... classes from android.test.runner can already be
statically included from the junit library.

Bug: 30188076
Test: make checkbuild
Change-Id: Id8d32da9e46f0d9142b60ef28998b40e8d237b32
2017-05-09 15:10:03 +01:00
Hugo Benichi
e1bb3a14d1 NetworkStatsFactory: fix double accounting on IPv6 only networks
For 464xlat scenarios on IPv6 networks, the clatd interface setup
introduces double counting of apps ipv4 traffic. NetworkStatsFactory was
accounting for this on the tx path, but not on the rx path. Also it did
not accounted for the 20 bytes added by the IPv6 header.

This patch subtract correctly the rx and tx traffic from the root uid on
the underlying interface, and also adds correctly the 20 bytes cost per
packet on the stacked interface for 464xlat traffic.

Test: added several new unit tests, based on synthetic data and real
      data also.
Bug: 33681750
Change-Id: I2675643b220acbc6110179fa937d4c313b6f5e32
2017-05-09 22:46:14 +09:00
Erik Kline
8af8235bca Merge "Refactor and improve logging."
am: c3d41d5093

Change-Id: I8ef193a9ee0f5bf04ae18620c1a68228ed7ed929
2017-05-09 10:40:29 +00:00
Treehugger Robot
c3d41d5093 Merge "Refactor and improve logging." 2017-05-09 10:33:51 +00:00
Paul Duffin
edefe593e3 Merge "Prepare for removal of junit and android.test classes from Android API (step 1)"
am: b2ac85e76d

Change-Id: I2c06dbace44b4578a6cd94cb62a3ae67e558aaaa
2017-05-09 10:29:59 +00:00
Paul Duffin
b2ac85e76d Merge "Prepare for removal of junit and android.test classes from Android API (step 1)" 2017-05-09 10:23:17 +00:00