3839 Commits

Author SHA1 Message Date
Alan Viverette
14b3375e43 Merge "Remove unnecessary casts on calls to findViewById" into oc-dev am: 7c8ab2651b
am: efc602c307

Change-Id: Id991d413933d8435a05b129bf13e917941371c01
2017-04-14 18:25:53 +00:00
Hugo Benichi
61bfec0cbd Merge "ConnectivityManager: release all requests mapping to a callback." am: 1a8f04b1b2 am: 4d80366762 am: e505b37ec5
am: 9b7453f3c6

Change-Id: I04d6b51bef76c8937227c038c5825ed486812b71
2017-04-14 18:17:31 +00:00
Alan Viverette
efc602c307 Merge "Remove unnecessary casts on calls to findViewById" into oc-dev
am: 7c8ab2651b

Change-Id: I82826b63a3d6bc527c696158bfab98fe438f9847
2017-04-14 17:04:19 +00:00
TreeHugger Robot
7c8ab2651b Merge "Remove unnecessary casts on calls to findViewById" into oc-dev 2017-04-14 16:56:28 +00:00
Hugo Benichi
9b7453f3c6 Merge "ConnectivityManager: release all requests mapping to a callback." am: 1a8f04b1b2 am: 4d80366762
am: e505b37ec5

Change-Id: I99267e14ab04ce62c5c2385f24f5865e791a24a0
2017-04-14 15:36:10 +00:00
Hugo Benichi
4d80366762 Merge "ConnectivityManager: release all requests mapping to a callback."
am: 1a8f04b1b2

Change-Id: I30d3790822430d250d6005cc165e7fa10f56649e
2017-04-14 15:22:39 +00:00
Alan Viverette
51efddbd3b Remove unnecessary casts on calls to findViewById
Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
2017-04-14 11:15:50 -04:00
Hugo Benichi
dafed3d008 ConnectivityManager: release all requests mapping to a callback.
This patch changes how callback unregistration works in order to be
consistent with undocumented use cases currently de-facto supported
by the API (although in a buggy way):
  - callback recycling: releasing then reregistering a callback again.
  - multiple request registrations with the same callback.

The second use case is not desirable but needs to be taken into account
for now for the purpose of correctly releasing NetworkRequests
registered in ConnectivityService.

In order to support request release in both use cases with minimal
amount of complexity for the time being the following changes are done:
  - request to callback unmapping is done synchronously at callback
    release time.
  - all requests associated to a callback are unmapped at callback
    release time.

This fixes the following issues:
  - a callback stops being triggered as soon as it is released.
    Otherwise when recycling the callback immediately, it is possible
    the previous request associated with it triggers it, confusing the
    app.
  - when a callback is registered multiple times, the requests are not
    leaked.
  - when a callback is registered multiple times and then released, the
    N-1 first registrations do not trigger the callback anymore.

In the future it would be desirable to enforce the intended 1:1 mapping
between callbacks and requests at registration time.

Bug: 35921499, 35955593, 20701525
Test: - added new tests in ConnectivityManagerTest to test releasing,
      recycling, and a disabled test for no multiple regristration.
      - new tests catch regression causing b/35921499, b/35955593.
Change-Id: Ia0917ac322fc049f76adb4743bc745989fed6d26
2017-04-14 22:17:21 +09:00
Jorim Jaggi
27af670d9a Merge "Implement new splash screen API" into oc-dev
am: 46ae660bf2

Change-Id: I2f12289fcf82754a46365d0342997ae7bf59a2f8
2017-04-14 12:02:08 +00:00
TreeHugger Robot
46ae660bf2 Merge "Implement new splash screen API" into oc-dev 2017-04-14 11:54:47 +00:00
Hugo Benichi
ed1e91e4f4 Merge changes Id0d536ff,I4fcd0ad7 into oc-dev
am: 0e8090b10e

Change-Id: I0b432e9d7aa5654a0aeac1d3d0a09e624bcbc9bc
2017-04-14 04:32:17 +00:00
Jorim Jaggi
7d0d102752 Implement new splash screen API
Test: mmm frameworks/base/tests/ActivityTests, launch
CustomSplashscreenActivity
Test: android.server.android.server.cts.SplashscreenTests

Bug: 37252694
Change-Id: Ie2aec4764d958086897296ed0fc3c39c55c4d8aa
Merged-In: I9a5bc19b8f63312e682e536500411e4ff4639f88
2017-04-13 19:43:45 -07:00
Hugo Benichi
5eb9053c4e Connectivity metrics: add transports to connect stats
This patch groups connect() events per netId. It adds netid and
transport information to serialized ConnectStatistics events.

Test: updated NetdEventListenerServiceTest
      updated IpConnectivityMetricsTest
      $ runtest frameworks-net passes
Bug: 34901696
Change-Id: Id0d536ff723ded5c26eafe0bb138ba75ba2856c5
Merged-In: I4769496383943e714a1d350c298e093c2ed57477

(cherry picked from commit dfc2cc5857199345e08f07977b79b20292f964a2)
2017-04-14 01:44:52 +00:00
Hugo Benichi
2a5cfb9738 Connectivity metrics: log DnsEvents in-band
This patch changes how DnsEvents are logged in IpConnectivityMetrics.
The following changes are made:
 - DnsEventBatch are not logged after 100 queries on the same network
    - this allows to merge DnsEvent and DnsEventBatch into one class
 - DnsEventBatch are not logged after a network disconnect
    - this allows to remove the NetworkCallback
 - DnsEvent are now logged similarly to ConnectStats when statistics are
   flushed, in a direct call from IpConnectivityMetrics into
   NetdEventListenerService, in a direct call from IpConnectivityMetrics
   into NetdEventListenerService.
    - this allows to remove the Parcelable implementation of DnsEvent
 - transports information is added to DnsEvent.

Test: - simplified NetdEventListenerServiceTest covering dns logging
      - updated IpConnectivityEventBuilderTest
      - updated IpConnectivityMetricsTest
      - $ runtest frameworks-net passes
      - manually verified $ adb shell dumpsys connmetrics list proto
Bug: 34901696
Change-Id: I4fcd0ad7a7b85d587647f471a90c1e53a18fc95a
Merged-In: Ia4b33fd4212741152662a2adbb0533bd1b4902ee

(cherry picked from commit 0699cf98042a64e41ee076c464eb115a6579be08)
2017-04-14 01:41:48 +00:00
Jorim Jaggi
4b84606c21 Implement new splash screen API
Test: mmm frameworks/base/tests/ActivityTests, launch
CustomSplashscreenActivity
Test: android.server.android.server.cts.SplashscreenTests

Bug: 37252694
Change-Id: I9a5bc19b8f63312e682e536500411e4ff4639f88
2017-04-13 16:39:44 -07:00
Hugo Benichi
dfc2cc5857 Connectivity metrics: add transports to connect stats
This patch groups connect() events per netId. It adds netid and
transport information to serialized ConnectStatistics events.

Test: updated NetdEventListenerServiceTest
      updated IpConnectivityMetricsTest
      $ runtest frameworks-net passes
Bug: 34901696

Change-Id: I4769496383943e714a1d350c298e093c2ed57477
2017-04-13 23:08:28 +09:00
Hugo Benichi
0699cf9804 Connectivity metrics: log DnsEvents in-band
This patch changes how DnsEvents are logged in IpConnectivityMetrics.
The following changes are made:
 - DnsEventBatch are not logged after 100 queries on the same network
    - this allows to merge DnsEvent and DnsEventBatch into one class
 - DnsEventBatch are not logged after a network disconnect
    - this allows to remove the NetworkCallback
 - DnsEvent are now logged similarly to ConnectStats when statistics are
   flushed, in a direct call from IpConnectivityMetrics into
   NetdEventListenerService, in a direct call from IpConnectivityMetrics
   into NetdEventListenerService.
    - this allows to remove the Parcelable implementation of DnsEvent
 - transports information is added to DnsEvent.

Test: - simplified NetdEventListenerServiceTest covering dns logging
      - updated IpConnectivityEventBuilderTest
      - updated IpConnectivityMetricsTest
      - $ runtest frameworks-net passes
      - manually verified $ adb shell dumpsys connmetrics list proto
Bug: 34901696

Change-Id: Ia4b33fd4212741152662a2adbb0533bd1b4902ee
2017-04-13 23:08:20 +09:00
Erik Kline
896a43c4a3 Merge "Extract SimChangeListener to its own file" am: 0ef8df6d52 am: 85f5725fb5 am: 270ab2fa7e
am: 152c9cf703

Change-Id: I8fa851793f50a4b4d8cd003790febeb3f2902d06
2017-04-13 08:50:05 +00:00
Erik Kline
152c9cf703 Merge "Extract SimChangeListener to its own file" am: 0ef8df6d52 am: 85f5725fb5
am: 270ab2fa7e

Change-Id: Ic39902fe33258dad0315a82b46f37582ba968085
2017-04-13 08:44:51 +00:00
Erik Kline
85f5725fb5 Merge "Extract SimChangeListener to its own file"
am: 0ef8df6d52

Change-Id: Ib83aa0acc1cf19c04ed94a198bb8333c7e3a60b8
2017-04-13 08:33:12 +00:00
Treehugger Robot
0ef8df6d52 Merge "Extract SimChangeListener to its own file" 2017-04-13 08:19:07 +00:00
Lorenzo Colitti
7586a5e4bc Merge "Move some NetworkStats tests to tests/net." am: ab3901dc8b am: 67401e25c2 am: 997e6b085a
am: 42f7ca684c

Change-Id: I94265917ea58b78c3ee56ee89f99c0af307b7fe2
2017-04-13 05:54:27 +00:00
Lorenzo Colitti
42f7ca684c Merge "Move some NetworkStats tests to tests/net." am: ab3901dc8b am: 67401e25c2
am: 997e6b085a

Change-Id: I37c1d362d891ec3b09b00df44aaf233adf355077
2017-04-13 05:48:37 +00:00
Lorenzo Colitti
67401e25c2 Merge "Move some NetworkStats tests to tests/net."
am: ab3901dc8b

Change-Id: I68214c14658afbb5c92facb018988d2ed27bc351
2017-04-13 05:29:58 +00:00
Lorenzo Colitti
ab3901dc8b Merge "Move some NetworkStats tests to tests/net." 2017-04-13 05:18:47 +00:00
Lorenzo Colitti
23cbbe1c73 Merge "Merge changes from topic 'network_specifier' am: d0f476bdae am: 362bef45d1 am: cfd729093f" into oc-dev-plus-aosp
am: a7e30062c9

Change-Id: I6500639ae839ee9ad5af34d1292d1539c943e2ad
2017-04-12 23:45:57 +00:00
Lorenzo Colitti
c34f0f7520 Merge changes from topic 'network_specifier' am: d0f476bdae am: 362bef45d1
am: cfd729093f

Change-Id: I7535495681da8f168c46d6d95e13925cffecc99b
2017-04-12 22:58:42 +00:00
Lorenzo Colitti
362bef45d1 Merge changes from topic 'network_specifier'
am: d0f476bdae

Change-Id: I783b2d06f3a5e8b9cd7940f1f1ef0dd951c734f1
2017-04-12 22:43:03 +00:00
Lorenzo Colitti
d0f476bdae Merge changes from topic 'network_specifier'
* changes:
  [CM] Unhide the NetworkSpecifier as object API
  Make the NetworkSpecifier a class instead of a string.
2017-04-12 22:27:37 +00:00
Lorenzo Colitti
c86013be93 Move some NetworkStats tests to tests/net.
This groups them together with the rest of the networking unit
tests. It also speeds up compile/test cycles ("runtest -x" of one
file goes from 1m15s to 30s).

Test: runtest frameworks-net passes on internal tree
Change-Id: I53cb0c51355fe4b4b30e451fa09fbbf58da39efd
2017-04-13 02:38:11 +09:00
Tomasz Wasilczyk
5fccceb2c5 Merge "Initial implementation of Java-based broadcast radio service." 2017-04-12 14:58:41 +00:00
Erik Kline
227648f336 Extract SimChangeListener to its own file
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - runtest -x full/path/to/SimChangeListenerTest.java passes
Bug: 32163131
Change-Id: If90539fe9a5dc07c7c24ed0b70b920d94065a623
2017-04-12 15:57:49 +09:00
Tomasz Wasilczyk
347192e0da Initial implementation of Java-based broadcast radio service.
It provides only limited amount of service, without actual interaction
with HAL.

Added config.enable_java_radio switch to use Java-based service instead
of native. Added FEATURE_RADIO to PackageManager.

Bug: b/36863239
Test: Instrumentation, manual (Kitchen Sink)

Change-Id: I01139d326893c0a437c60cc35d6e5b005da35231
2017-04-10 15:20:50 -07:00
Erik Kline
5f2b7992cf Tethering: support Local-only Hotspot mode for downstreams
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 31466854

Change-Id: Ia50e28c8ce0af8cdd7ac63217d921aff213668e7
2017-04-10 21:42:16 +09:00
Erik Kline
2e444fcb84 Merge "Tethering: support Local-only Hotspot mode for downstreams" am: d3128d4b55 am: 908ce167eb am: f6626e812c
am: f700d5cad7

Change-Id: I9818021440930765c797b9720bdfe4230ca09b78
2017-04-10 12:31:26 +00:00
Erik Kline
f700d5cad7 Merge "Tethering: support Local-only Hotspot mode for downstreams" am: d3128d4b55 am: 908ce167eb
am: f6626e812c

Change-Id: I79677f7e8e7ae5abec2a13b5e5391b8f07857a36
2017-04-10 12:21:57 +00:00
Erik Kline
908ce167eb Merge "Tethering: support Local-only Hotspot mode for downstreams"
am: d3128d4b55

Change-Id: Ic7d5e3e23f9ccc0f094ba5991e2fdefa82865b01
2017-04-10 12:02:49 +00:00
Erik Kline
ea9cc488eb Tethering: support Local-only Hotspot mode for downstreams
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 31466854

Change-Id: Ia50e28c8ce0af8cdd7ac63217d921aff213668e7
2017-04-10 19:11:08 +09:00
Lorenzo Colitti
0ad718aab1 Merge "Add an API hint for metered multipath traffic."
am: 7a12f7efc7

Change-Id: Ie0d289460f93d3b93d91545eb3dfa925f0bdee5f
2017-04-10 05:48:34 +00:00
Treehugger Robot
7a12f7efc7 Merge "Add an API hint for metered multipath traffic." 2017-04-10 05:40:10 +00:00
Hugo Benichi
fa0dadc540 DO NOT MERGE IP connectivity metrics: fix tests.
This patch fixes mismatch between current proto compiler and what is
expected in several IP connectivity metrics unit tests.

Test: built, flashed, $ runtest frameworks-net
Bug: 37126521
Change-Id: I1476c923d61f748ecac1146423127f54ba117502
2017-04-10 13:19:23 +09:00
Lorenzo Colitti
46aa9c022e Add an API hint for metered multipath traffic.
This allows an application that knows how to provide seamless
network connectivity (e.g., using QUIC multipath) to find out if
doing so is desired.

(cherry picked from commit 2de4925f5cc64aeb92e02a8f740d3ff20f36dddd)

Test: builds, boots, runtest frameworks-net passes.
Bug: 34630278
Change-Id: Ic7fd0b9e1cd879fdfaf84009d7125391895e9087
2017-04-06 16:50:06 +09:00
Etan Cohen
a743427896 Make the NetworkSpecifier a class instead of a string.
Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: connectivity, wifi, telephony unit tests
Change-Id: Idd9b10a8418c53c8cf386d9ff8252226b076bbf9
2017-04-05 14:18:20 -07:00
Alan Viverette
3709761c9f Merge "Automatic casts for more findViewById implementations" into oc-dev am: 7458ea3827
am: ee4b52afd8

Change-Id: Ie5ebcf1156e31da0b76d8f053a3c23f91e8ea7b9
2017-04-05 14:05:08 +00:00
Alan Viverette
ee4b52afd8 Merge "Automatic casts for more findViewById implementations" into oc-dev
am: 7458ea3827

Change-Id: I7c77634f1a5b2551830796118e1fe69d389d6884
2017-04-05 13:58:51 +00:00
Alan Viverette
db7423cd8d Automatic casts for more findViewById implementations
Bug: 24137209
Test: make -j32
Change-Id: I423297a78e63d74eb44fd14747fc3890a9c42937
2017-04-04 14:07:20 -04:00
Jorim Jaggi
47e090c391 Boost thread priority when holding the WM lock am: 36db127e47
am: b72e651fbe

Change-Id: Ib3ddb7622a3412ca71c5cb20dbcd844697f895c3
2017-04-04 13:27:47 +00:00
Jorim Jaggi
b72e651fbe Boost thread priority when holding the WM lock
am: 36db127e47

Change-Id: I3c98498137581ec39555b0283b1cb59d7639a7e2
2017-04-04 13:18:42 +00:00
Narayan Kamath
1163568d7c Merge "Properly guard access to CloseGuard in finalizers." 2017-04-04 12:27:02 +00:00
Jorim Jaggi
36db127e47 Boost thread priority when holding the WM lock
Test: Take systrace of open app, make sure thead is boosted while
doing stuff in WM
Test: Run WmSlam with and without boosting. Observe an
improvement.
Bug: 36631902
Change-Id: Iadb036f8d12bbf59091466500e82207cf6fa85d5
2017-04-04 12:54:09 +02:00