OSDN Git Service

android-x86/frameworks-base.git
7 years agoRemove unnecessary TODOs
Neil Fuller [Mon, 17 Jul 2017 17:02:29 +0000 (18:02 +0100)]
Remove unnecessary TODOs

The classes under test are not part of a public
API so they are not tested via CTS.

Bug: 31008728
Test: make droid
Change-Id: If10db42b6e79728a6625708d35a04c5002164866

7 years agoRemove TODOs that are not needed
Neil Fuller [Mon, 3 Jul 2017 13:38:50 +0000 (14:38 +0100)]
Remove TODOs that are not needed

Remove TODOs to add classes to the system API that are not needed
(since they are used by a platform-only app).

Bug: 31008728
Test: make droid
Change-Id: I0d75686ddeae929e9d87c5ca8703a609a1450d76
Merged-In: I600e7b08853b86b27463193411cf85207ae09ce8

7 years agoMerge "Address further API review comments"
Treehugger Robot [Wed, 12 Jul 2017 15:37:40 +0000 (15:37 +0000)]
Merge "Address further API review comments"

7 years agoMerge "Add OffloadHardwareInterface.getForwardedStats() wrapper"
Treehugger Robot [Wed, 12 Jul 2017 15:36:18 +0000 (15:36 +0000)]
Merge "Add OffloadHardwareInterface.getForwardedStats() wrapper"

7 years agoAdd OffloadHardwareInterface.getForwardedStats() wrapper
Erik Kline [Wed, 12 Jul 2017 06:46:54 +0000 (15:46 +0900)]
Add OffloadHardwareInterface.getForwardedStats() wrapper

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 29337859
Bug: 32163131

Merged-In: I41f837e16eff9a4cd763d65155bd9b5d5d980acd
Merged-In: Id9766983a3bbd885ef0f0d3ba9e33de903939f2d
Merged-In: Id831bc99cadbd59d280b026866707dbbe3b0e542
(cherry picked from commit 9a5b02a89c02d5ff633d8456b22d3d5b7a15bd44)

Change-Id: I0752b6e2cf1e0b9a5075f7911408528538683c84

7 years agoMerge "Restructure use of absent tether_offload_disabled setting"
Treehugger Robot [Wed, 12 Jul 2017 06:06:07 +0000 (06:06 +0000)]
Merge "Restructure use of absent tether_offload_disabled setting"

7 years agoMerge "Connectivity: Fix format arguments"
Treehugger Robot [Wed, 12 Jul 2017 04:35:34 +0000 (04:35 +0000)]
Merge "Connectivity: Fix format arguments"

7 years agoRestructure use of absent tether_offload_disabled setting
Erik Kline [Fri, 7 Jul 2017 08:38:30 +0000 (17:38 +0900)]
Restructure use of absent tether_offload_disabled setting

This restructures the fetching of the default disposition such
that we disable (and enable) the feature with only a single
character change.

Additionally: fix unittests with proper use of FakeSettingsProvider.

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passed with developer enabled and disabled
Bug: 29337859
Bug: 32163131
Bug: 63250751
(cherry picked from commit c87cd411843484225897ebdf91cd05073c1c5f35)
Merged-In: Ib32489d07778465134bca52c589baddbd78ab129
Merged-In: I03d68b0da192fbd6172639343d4ab88c20127ad7
Merged-In: I10c0af2b2c4f6b6e613380e637cc3acb1f7a55a3

Change-Id: Ie16a022be8dacd76b0402bcb777680c36163a084

7 years agoMerge "Remove return value of ipSecAddSecurityAssociation"
Di Lu [Wed, 12 Jul 2017 03:53:57 +0000 (03:53 +0000)]
Merge "Remove return value of ipSecAddSecurityAssociation"

7 years agoMerge "Add first OWNERS files for core networking"
Treehugger Robot [Wed, 12 Jul 2017 03:41:57 +0000 (03:41 +0000)]
Merge "Add first OWNERS files for core networking"

7 years agoMerge "app_main: silence static analyzer warnings"
Treehugger Robot [Wed, 12 Jul 2017 02:43:14 +0000 (02:43 +0000)]
Merge "app_main: silence static analyzer warnings"

7 years agoConnectivity: Fix format arguments
Andreas Gampe [Tue, 11 Jul 2017 22:14:41 +0000 (15:14 -0700)]
Connectivity: Fix format arguments

Fix missing argument.

Bug: 19797138
Test: m
Change-Id: I5fdd2a453c0d7422e8c3e79c8dce2d0800ec45e9

7 years agoMerge "IpSecService: Actually throw exception"
Treehugger Robot [Wed, 12 Jul 2017 01:17:19 +0000 (01:17 +0000)]
Merge "IpSecService: Actually throw exception"

7 years agoapp_main: silence static analyzer warnings
George Burgess IV [Wed, 12 Jul 2017 00:18:26 +0000 (17:18 -0700)]
app_main: silence static analyzer warnings

This silences two warnings:

frameworks/base/cmds/app_process/app_main.cpp:238:11: warning: Potential
memory leak

frameworks/base/cmds/app_process/app_main.cpp:261:9: warning: Potential
memory leak

As the (existing) comment notes, we nuke argv later in main(), so these
copies are necessary. Since these args need to live for basically the
entire life of the process, it seems pointless to go out of our way to
free them.

Bug: 27101951
Test: mma. Static analyzer warnings are gone.
Change-Id: Icbfabfede9db909f6acb274b697cb6076c3fc11f

7 years agoAdd first OWNERS files for core networking
Hugo Benichi [Fri, 7 Jul 2017 02:55:41 +0000 (11:55 +0900)]
Add first OWNERS files for core networking

Covering
  core/java/android/net/
  core/java/com/android/server/net/
  packages/CaptivePortalLogin/
  services/core/java/com/android/server/
    ConnectivityService.java
    NsdServic.java
    NetworkManagementService.java
  services/core/java/com/android/server/connectivity/
  services/net/
  tests/net/

Android core networking files not covered:
  services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp
  services/core/proto/ipconnectivity.proto (path unique to aosp)

Bug: 63408147
Test: builds
Change-Id: Ifbb923d5ffdcada83864b5e0eb07911682d66efa

7 years agoIpSecService: Actually throw exception
Andreas Gampe [Tue, 11 Jul 2017 17:25:09 +0000 (10:25 -0700)]
IpSecService: Actually throw exception

Add a missing throw.

Bug: 19797138
Test: m
Test: Device boots
Change-Id: I6c6058ecc95a5b85da43a42bac2846c31cefc038

7 years agoMerge "GATT: Expose opportunistic client API to Java"
Treehugger Robot [Tue, 11 Jul 2017 20:15:17 +0000 (20:15 +0000)]
Merge "GATT: Expose opportunistic client API to Java"

7 years agoGATT: Expose opportunistic client API to Java
Jack He [Wed, 5 Jul 2017 21:55:35 +0000 (14:55 -0700)]
GATT: Expose opportunistic client API to Java

* Allow Java based programs to create an opportunistic GATT client
* Such client does not hold a GATT connection. It automatically
  disconnects when no other GATT connections are active for the
  remote device.

Bug: 63347806
Test: make, run battery service
Change-Id: Ib9333817d7f17a1fa3ddacfa51c680890bac19ec

7 years agoAddress further API review comments
Neil Fuller [Tue, 11 Jul 2017 14:25:48 +0000 (15:25 +0100)]
Address further API review comments

Address further API review comments from API reviewer.

Bug: 31008728
Test: make droid
Change-Id: I0b3f6be9eaf69ffa8a6e73475f9c3a9ba3e343f2

7 years agoMerge "Fix typo in Parcel javadoc."
Treehugger Robot [Tue, 11 Jul 2017 10:58:30 +0000 (10:58 +0000)]
Merge "Fix typo in Parcel javadoc."

7 years agoMerge "Move column definitions to an inner class"
Neil Fuller [Tue, 11 Jul 2017 10:01:01 +0000 (10:01 +0000)]
Merge "Move column definitions to an inner class"

7 years agoMerge "Fix for the missing focus in WebView form fields."
Hugo Benichi [Tue, 11 Jul 2017 07:05:26 +0000 (07:05 +0000)]
Merge "Fix for the missing focus in WebView form fields."

7 years agoFix for the missing focus in WebView form fields.
susnata [Fri, 23 Jun 2017 16:13:05 +0000 (09:13 -0700)]
Fix for the missing focus in WebView form fields.

This looks like a regression for WebView (58.0.3029.125) in android
'O'. But this seems to have been fixed in early version of 60 (webview).
This workaround gets us past the problem, until we get the newer version
of WebView.

Bug: 62449959
Test: Manual
Change-Id: Iab22f8f0db0ab58cb0a184c3f88e6b3770a35fb0
Merged-In: I29883bf7d1567c1ce7be90b4efde4b3da93b99a2

(cherry pick from commit 97640400c4aa6bf05d5606ea749b54ad63de97cd)

7 years agoFix typo in Parcel javadoc.
Bin Chen [Tue, 11 Jul 2017 03:01:44 +0000 (11:01 +0800)]
Fix typo in Parcel javadoc.

Change-Id: Ida05259143e86c15c2ed69eeb7566d39b60fa823

7 years agoMove column definitions to an inner class
Neil Fuller [Mon, 10 Jul 2017 18:18:01 +0000 (19:18 +0100)]
Move column definitions to an inner class

Move column definitions and other URI constants
to inner classes based on feedback from an API council
reviewer.

Bug: 31008728
Test: make droid
Change-Id: I213e44f2655017e0ca32a4dfb1f5617ef471d854

7 years agoMerge "Configure the package name of the updater app"
Neil Fuller [Mon, 10 Jul 2017 14:14:46 +0000 (14:14 +0000)]
Merge "Configure the package name of the updater app"

7 years agoMerge "Make failure to set addrgenmode a non-fatal error."
Treehugger Robot [Mon, 10 Jul 2017 12:15:47 +0000 (12:15 +0000)]
Merge "Make failure to set addrgenmode a non-fatal error."

7 years agoMerge "Track libcore commit 2fd032687ba3d4d7f6af560482c5aba525584621"
Treehugger Robot [Mon, 10 Jul 2017 12:00:31 +0000 (12:00 +0000)]
Merge "Track libcore commit 2fd032687ba3d4d7f6af560482c5aba525584621"

7 years agoTrack libcore commit 2fd032687ba3d4d7f6af560482c5aba525584621
Przemyslaw Szczepaniak [Tue, 4 Jul 2017 09:32:11 +0000 (10:32 +0100)]
Track libcore commit 2fd032687ba3d4d7f6af560482c5aba525584621

Test: Make
Bug: 62779247
Change-Id: I919df93b20e809f42a27225403e1549b763b0a60

7 years agoMerge "Fix dumpsys output for staged install version"
Treehugger Robot [Mon, 10 Jul 2017 11:52:11 +0000 (11:52 +0000)]
Merge "Fix dumpsys output for staged install version"

7 years agoMerge "CaptivePortalLogin ignores some ssl errors."
Hugo Benichi [Mon, 10 Jul 2017 11:42:45 +0000 (11:42 +0000)]
Merge "CaptivePortalLogin ignores some ssl errors."

7 years agoMake failure to set addrgenmode a non-fatal error.
Lorenzo Colitti [Mon, 10 Jul 2017 10:05:13 +0000 (19:05 +0900)]
Make failure to set addrgenmode a non-fatal error.

Bug: 17613910
Test: bullhead builds, boots, connects to wifi
Change-Id: I310dcacc6784c13904fca79b839b5f4d94bfc45e

7 years agoCaptivePortalLogin ignores some ssl errors.
Hugo Benichi [Sat, 17 Jun 2017 04:36:35 +0000 (13:36 +0900)]
CaptivePortalLogin ignores some ssl errors.

This patch changes the ssl error handler of the captive portal login
activity to ignore errors for resources coming from a different hostname
that the top-level page currently loading.

This allows logging into misconfigured portals that incorrectly bans ssl
to some hostnames necessary for loading their portal login pages.

Bug: 62332137
Test: manually tested with captive portal entwork.
Change-Id: I05378ed74e678829e46fbeee18df916ec6ec2856

7 years agoMerge "Add more logging to the Tethering SharedLog"
Treehugger Robot [Sat, 8 Jul 2017 07:06:09 +0000 (07:06 +0000)]
Merge "Add more logging to the Tethering SharedLog"

7 years agoMerge "Fix wrong array index bound in NotificationUsageStats"
Treehugger Robot [Fri, 7 Jul 2017 21:20:40 +0000 (21:20 +0000)]
Merge "Fix wrong array index bound in NotificationUsageStats"

7 years agoFix dumpsys output for staged install version
Neil Fuller [Fri, 7 Jul 2017 15:09:49 +0000 (16:09 +0100)]
Fix dumpsys output for staged install version

Fix dumpsys output for staged install version:
there was a double prefix.

Bug: 31008728
Test: Manual
Change-Id: Idcbdee68cb9961d93df6de96d7a1617f70b7ac94

7 years agoAdd more logging to the Tethering SharedLog
Erik Kline [Thu, 6 Jul 2017 07:40:06 +0000 (16:40 +0900)]
Add more logging to the Tethering SharedLog

This may at first seem a tad spammy, but a cursory examination suggests
most of this is the Tethering subsystem doing more work than necessary.
Some of this can be addressed with some simple changes in the near term.

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - watch "adb shell dumpsys connectivity tethering | tail 60"
      shows new log entries

Bug: 29337859
Bug: 32163131
Bug: 63334101

Change-Id: I9539a37f346469f0474084f5f31527bc35093bce
Merged-In: I6820e6cc81cfa43d99ad66860e1dcf42d20109f8
Merged-In: I10960bf23a837eda1fb473826596c484484f1875
Merged-In: I0a8eb8be5562fa814109191b0110050ca4b60c02
Merged-In: I6219e56d571854a2c61e1da63095e319e4bd3dc1

7 years agoMerge "Streamline testInstall_compatibleContext()"
Adam Vartanian [Fri, 7 Jul 2017 07:27:29 +0000 (07:27 +0000)]
Merge "Streamline testInstall_compatibleContext()"

7 years agoMerge changes from topic 'NCI-2.0'
Ruchi Kandoi [Thu, 6 Jul 2017 22:41:29 +0000 (22:41 +0000)]
Merge changes from topic 'NCI-2.0'

* changes:
  AID suffix registration.
  NCI2.0 update LF_T3T_PARAMETERS of 18 byte.

7 years agoMerge "Unhide InMemoryDexClassLoader ByteBuffer[] constructor"
Alex Light [Thu, 6 Jul 2017 21:03:24 +0000 (21:03 +0000)]
Merge "Unhide InMemoryDexClassLoader ByteBuffer[] constructor"

7 years agoMerge "Enable priority boost for non-Jack builds."
Colin Cross [Thu, 6 Jul 2017 20:48:31 +0000 (20:48 +0000)]
Merge "Enable priority boost for non-Jack builds."

7 years agoMerge "Log errors on android.os.VintfObject.verify()"
Yifan Hong [Thu, 6 Jul 2017 19:48:26 +0000 (19:48 +0000)]
Merge "Log errors on android.os.VintfObject.verify()"

7 years agoEnable priority boost for non-Jack builds.
Alan Leung [Wed, 14 Jun 2017 20:50:45 +0000 (13:50 -0700)]
Enable priority boost for non-Jack builds.

Test: m ANDROID_COMPILE_WITH_JACK=false / checked for boost+reset calls.
BUG: 36791701
Change-Id: I5fb4107ae39e76644c01c502483ae7d887ab18a3
Merged-In: I5fb4107ae39e76644c01c502483ae7d887ab18a3
(cherry picked from commit 421baeb9289cd5a16e2fef5601dcddbbfad8eb3e)

7 years agoUnhide InMemoryDexClassLoader ByteBuffer[] constructor
Alex Light [Thu, 6 Jul 2017 18:25:18 +0000 (11:25 -0700)]
Unhide InMemoryDexClassLoader ByteBuffer[] constructor

This constructor lets one give multiple dex files as byte buffers for
the InMemoryDexClassLoader.

Bug: 63390204
Test: Builds
Change-Id: I5b8a7860dbc365c0a51dbaf4540b9fa53c922546

7 years agoMerge "Add a reason arg to streamStateUpdated"
Hall Liu [Thu, 6 Jul 2017 18:08:02 +0000 (18:08 +0000)]
Merge "Add a reason arg to streamStateUpdated"

7 years agoMerge "Fix ContentObserver unregister issue"
Fyodor Kupolov [Thu, 6 Jul 2017 18:07:04 +0000 (18:07 +0000)]
Merge "Fix ContentObserver unregister issue"

7 years agoAID suffix registration.
Love Khanna [Fri, 12 May 2017 08:23:42 +0000 (13:53 +0530)]
AID suffix registration.

Test: compiles.

Change-Id: I0ab02599814722055d77eef29e734bfd45e8d1ee

7 years agoStreamline testInstall_compatibleContext()
Adam Vartanian [Thu, 6 Jul 2017 14:43:52 +0000 (15:43 +0100)]
Streamline testInstall_compatibleContext()

Conscrypt is making ClientSessionContext#getSession() private since
users shouldn't be calling it, which causes this test to fail to build.
While this test uses it, in practice the only non-Conscrypt code it's
testing is SSLSessionCache#install(), the rest of it just tests that
Conscrypt works properly.  We reduce the test to just a test of the
SSLSessionCache code, since Conscrypt's tests should suffice for testing
Conscrypt's use of the cache.

Test: adb shell am instrument -w -e class android.net.SSLSessionCacheTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Iea61c47eb2c002629dd2f50c81d5bc4f7221c654

7 years agoMerge "Clearly log tether_offload_disabled setting status in start()"
Treehugger Robot [Thu, 6 Jul 2017 07:54:33 +0000 (07:54 +0000)]
Merge "Clearly log tether_offload_disabled setting status in start()"

7 years agoClearly log tether_offload_disabled setting status in start()
Erik Kline [Thu, 6 Jul 2017 03:38:48 +0000 (12:38 +0900)]
Clearly log tether_offload_disabled setting status in start()

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 29337859
Bug: 32163131

Change-Id: I113358ef71c2e5e3254eb6f9fbf9d5721825b0df
Merged-In: Iebcdb7bfaa85f822e73fe2f3b54caceb5420709c
Merged-In: Ifce832dca7b4d8b3056e2a9e91d38bffe25cfeb6
Merged-In: I99f6abc31579b4b25589452c44e1834a7ba4e591
Merged-In: I312a9309d6934bcec7fc0245cad12b97f1a22521

7 years agoMerge "ProcessStats: fix uss average value offset"
Mathieu Chartier [Thu, 6 Jul 2017 03:13:52 +0000 (03:13 +0000)]
Merge "ProcessStats: fix uss average value offset"

7 years agoFix ContentObserver unregister issue
daqi [Wed, 28 Jun 2017 06:16:13 +0000 (14:16 +0800)]
Fix ContentObserver unregister issue

[Cause of Defect]
In the ContentObserver callback procedure, the binder thread
has no sync mechanism with handler thread.
The ContentObserver#onChange method can get called after
ContentResolver#unregisterContentObserver called in the
very low probability.

Bug: https://issuetracker.google.com/issues/63154326
Test: manual - check https://github.com/nanjingdaqi/ContentObserverDemo
Change-Id: I0e3831eba7a9cc1a5bf0d30abe5dd0ec8259b0d4
Signed-off-by: daqi <daqi@xiaomi.com>
7 years agoMerge "Update DownloadRequest API"
Hall Liu [Thu, 6 Jul 2017 01:52:04 +0000 (01:52 +0000)]
Merge "Update DownloadRequest API"

7 years agoMerge "Protect TIMEOUT_CONNECT broadcast which is for Nfc Handover"
Treehugger Robot [Thu, 6 Jul 2017 01:30:10 +0000 (01:30 +0000)]
Merge "Protect TIMEOUT_CONNECT broadcast which is for Nfc Handover"

7 years agoMerge "Better logging infrastructure in OffloadHardwareInterface"
Treehugger Robot [Thu, 6 Jul 2017 00:31:44 +0000 (00:31 +0000)]
Merge "Better logging infrastructure in OffloadHardwareInterface"

7 years agoProtect TIMEOUT_CONNECT broadcast which is for Nfc Handover
Hiroki Yamamoto [Fri, 14 Apr 2017 06:10:15 +0000 (15:10 +0900)]
Protect TIMEOUT_CONNECT broadcast which is for Nfc Handover

Test: do Nfc Bluetooth Handover and wait for the timeout
Bug: 63250718
Change-Id: Ieea8b8f7a07fe90a594ed13ecfefd01e1d60853d

7 years agoLog errors on android.os.VintfObject.verify()
Yifan Hong [Wed, 5 Jul 2017 23:39:51 +0000 (16:39 -0700)]
Log errors on android.os.VintfObject.verify()

Test: pass
Bug: 63290683
Change-Id: I7ddc355024359e31aca4bbdf18f42075f72ddd5a

7 years agoMerge "Track update of org.json API"
Tobias Thierer [Wed, 5 Jul 2017 22:22:16 +0000 (22:22 +0000)]
Merge "Track update of org.json API"

7 years agoMerge "Framework: Add libziparchive dependency"
Treehugger Robot [Wed, 5 Jul 2017 22:20:40 +0000 (22:20 +0000)]
Merge "Framework: Add libziparchive dependency"

7 years agoMerge "Cherry-pick 7ad1110ecd6a840fcd2895c62668828a1ca029c6"
Treehugger Robot [Wed, 5 Jul 2017 21:01:29 +0000 (21:01 +0000)]
Merge "Cherry-pick 7ad1110ecd6a840fcd2895c62668828a1ca029c6"

7 years agoFramework: Add libziparchive dependency
Andreas Gampe [Mon, 3 Jul 2017 20:03:29 +0000 (13:03 -0700)]
Framework: Add libziparchive dependency

Bug: 37342627
Test: m
Change-Id: I4bc85b87a6c4305f14586aba662bcccbd4b8b6e2

7 years agoCherry-pick 7ad1110ecd6a840fcd2895c62668828a1ca029c6
Adam Lesinski [Fri, 28 Oct 2016 23:39:15 +0000 (16:39 -0700)]
Cherry-pick 7ad1110ecd6a840fcd2895c62668828a1ca029c6

Partial cherry-pick of commit 7ad1110ecd6a840fcd2895c62668828a1ca029c6.

Test: m
Merged-In: Id0e57ee828f17008891fe3741935a9be8830b01d
Change-Id: Id0e57ee828f17008891fe3741935a9be8830b01d

7 years agoBetter logging infrastructure in OffloadHardwareInterface
Erik Kline [Tue, 4 Jul 2017 04:39:48 +0000 (13:39 +0900)]
Better logging infrastructure in OffloadHardwareInterface

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - watch "adb shell dumpsys connectivity tethering | tail -60" shows logs
Bug: 29337859
Bug: 32163131

Merged-In: I3b178f4bb798d9ac59b366723d19e3189d39942e
Merged-In: I1b64e562c74797cbfaa26f3a1b5e38c3bf2a0c0d
Merged-In: Id0bd14e5b364c497403c2d88f7b1c31d712e6f87
Change-Id: I78f28a9e940cc7e050f2d79f877d27468d13599a

7 years agoMerge "ConnectivityManager: allow usage of TYPE_NONE"
Treehugger Robot [Wed, 5 Jul 2017 14:21:35 +0000 (14:21 +0000)]
Merge "ConnectivityManager: allow usage of TYPE_NONE"

7 years agoMerge "ConnectivityServiceTest: more informative assert failures"
Treehugger Robot [Wed, 5 Jul 2017 14:07:37 +0000 (14:07 +0000)]
Merge "ConnectivityServiceTest: more informative assert failures"

7 years agoConnectivityManager: allow usage of TYPE_NONE
Hugo Benichi [Tue, 20 Jun 2017 05:07:59 +0000 (14:07 +0900)]
ConnectivityManager: allow usage of TYPE_NONE

This patch allows to use TYPE_NONE for the legacy network type variable
of NetworkInfo. This usage is "safe" with respect to legacy APIs using
network types as most of them already returns null or do nothing for
TYPE_NONE.

Of the existing APIs in ConnectivityManager that accept a network type
argument, those which were already returning null or doing nothing for
TYPE_NONE are:
  getNetworkInfo(int)
  getNetworkForType(int)
  stopUsingNetworkFeature(int, String)
  networkCapabilitiesForType(int)
  requestRouteToHostAddress(int, InetAddress)
  reportInetCondition(int, int)
  isNetworkSupported(int)
  getLinkProperties(int)

Only setProvisioningNotificationVisible needs an additional guard
against TYPE_NONE.

Bug: 30088447
Bug: 62844794
Test: runtest frameworks-net
Change-Id: I112596fcd03d3c2cd42a2a84d265adb38e3944bb

7 years agoConnectivityServiceTest: more informative assert failures
Hugo Benichi [Mon, 26 Jun 2017 01:06:49 +0000 (10:06 +0900)]
ConnectivityServiceTest: more informative assert failures

Bug: 62918393
Test: runtest frameworks-net
Change-Id: If87315ef7cba6380596f48b92c7e0f6eeccc8368

7 years agoMerge "ConnectivityServiceTest: eliminate remaining sleep()"
Hugo Benichi [Wed, 5 Jul 2017 12:25:16 +0000 (12:25 +0000)]
Merge "ConnectivityServiceTest: eliminate remaining sleep()"

7 years agoConnectivityServiceTest: eliminate remaining sleep()
Hugo Benichi [Mon, 26 Jun 2017 01:20:00 +0000 (10:20 +0900)]
ConnectivityServiceTest: eliminate remaining sleep()

ConnectivityServiceTest was still using sleep() in a few places although
these were unnecessary:
  - in testSatisfiedThenLostNetworkRequestDoesNotTriggerOnAvailable(),
    expectNoCallback() and expectAvailableCallback() already include
    waitForIdleHandler calls that drain the message queues and make
    sleep no-ops.
  - in testTimedoutAfterUnregisterdNetworkRequest, the sleeps were
    introduced before unregisterNetworkCallback was changed to have a
    synchronous effect for callback unregistration, therefore the sleep
    becomes simply non-sensical. To reflect this the name of the method
    is also changed.

Bug: 62918393
Test: runtest frameworks-net
Change-Id: I7b701ecf5846a5e1890e86107b8d2544b419ce44

7 years agoMerge "Switch to USB_CONFIGURED as the primary USB readiness signal"
Treehugger Robot [Wed, 5 Jul 2017 05:56:29 +0000 (05:56 +0000)]
Merge "Switch to USB_CONFIGURED as the primary USB readiness signal"

7 years agoSwitch to USB_CONFIGURED as the primary USB readiness signal
Erik Kline [Tue, 4 Jul 2017 13:02:49 +0000 (22:02 +0900)]
Switch to USB_CONFIGURED as the primary USB readiness signal

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - USB tethering on and off works as expected
Bug: 32163131
Bug: 36216864
Bug: 62147658
Bug: 62552150

Merged-In: I3ae731c21f292a476a9e30e229d66ef6ab4a0545
Merged-In: I717fdd269b012f32548ebe0603999ae403b03100
Merged-Id: Ia8f7f3616f1358b0427386ce8aff26899e03ac07
Change-Id: Ia8f7f3616f1358b0427386ce8aff26899e03ac07
(cherry picked from commit c438e306cc69b9d4d62512030267e93011b29978)

7 years agoMerge "Revert "ConnectivityManager: allow usage of TYPE_NONE""
Roland Levillain [Tue, 4 Jul 2017 11:15:18 +0000 (11:15 +0000)]
Merge "Revert "ConnectivityManager: allow usage of TYPE_NONE""

7 years agoRevert "ConnectivityManager: allow usage of TYPE_NONE"
Roland Levillain [Tue, 4 Jul 2017 11:07:47 +0000 (11:07 +0000)]
Revert "ConnectivityManager: allow usage of TYPE_NONE"

This CL is breaking some internal builds.

This reverts commit 726931ebf4707795413578b57a1f033bf9a6e064.

Change-Id: Ie79214808d84c73f54a525f515b4c90a3fb23542

7 years agoMerge "Revert "ConnectivityServiceTest: more informative assert failures""
Roland Levillain [Tue, 4 Jul 2017 11:12:10 +0000 (11:12 +0000)]
Merge "Revert "ConnectivityServiceTest: more informative assert failures""

7 years agoRevert "ConnectivityServiceTest: more informative assert failures"
Roland Levillain [Tue, 4 Jul 2017 11:09:10 +0000 (11:09 +0000)]
Revert "ConnectivityServiceTest: more informative assert failures"

CL https://android-review.googlesource.com/#/c/420720/ is
breaking several internal builds, and CL
https://android-review.googlesource.com/#/c/422480/ must
be reverted beforehand.

This reverts commit a6981669c4e2707bcfb3db001e262b2da4bb9c17.

Change-Id: I5883409452d39e1834e183aa7b5ccdbf14291ca5

7 years agoMerge "Revert "ConnectivityServiceTest: eliminate remaining sleep()""
Roland Levillain [Tue, 4 Jul 2017 11:11:09 +0000 (11:11 +0000)]
Merge "Revert "ConnectivityServiceTest: eliminate remaining sleep()""

7 years agoRevert "ConnectivityServiceTest: eliminate remaining sleep()"
Roland Levillain [Tue, 4 Jul 2017 11:10:06 +0000 (11:10 +0000)]
Revert "ConnectivityServiceTest: eliminate remaining sleep()"

CL https://android-review.googlesource.com/#/c/420720/ is
breaking several internal builds, and CL
https://android-review.googlesource.com/#/c/422481/ must
be reverted beforehand.

This reverts commit 8afb9cfd000dadc730e52ebdeb4ad031b84b8e03.

Change-Id: If0b196b6860c4087a05b28770469d7850a76fd37

7 years agoMerge "ConnectivityServiceTest: eliminate remaining sleep()"
Treehugger Robot [Tue, 4 Jul 2017 09:25:53 +0000 (09:25 +0000)]
Merge "ConnectivityServiceTest: eliminate remaining sleep()"

7 years agoMerge changes I90c211dc,I4455f272
Treehugger Robot [Tue, 4 Jul 2017 09:22:07 +0000 (09:22 +0000)]
Merge changes I90c211dc,I4455f272

* changes:
  ConnectivityServiceTest: more informative assert failures
  ConnectivityManager: allow usage of TYPE_NONE

7 years agoConnectivityServiceTest: eliminate remaining sleep()
Hugo Benichi [Mon, 26 Jun 2017 01:20:00 +0000 (10:20 +0900)]
ConnectivityServiceTest: eliminate remaining sleep()

ConnectivityServiceTest was still using sleep() in a few places although
these were unnecessary:
  - in testSatisfiedThenLostNetworkRequestDoesNotTriggerOnAvailable(),
    expectNoCallback() and expectAvailableCallback() already include
    waitForIdleHandler calls that drain the message queues and make
    sleep no-ops.
  - in testTimedoutAfterUnregisterdNetworkRequest, the sleeps were
    introduced before unregisterNetworkCallback was changed to have a
    synchronous effect for callback unregistration, therefore the sleep
    becomes simply non-sensical. To reflect this the name of the method
    is also changed.

Bug: 62918393
Test: runtest frameworks-net
Change-Id: I78426665670f702304212753f417b3d5a8a2c107

7 years agoConnectivityServiceTest: more informative assert failures
Hugo Benichi [Mon, 26 Jun 2017 01:06:49 +0000 (10:06 +0900)]
ConnectivityServiceTest: more informative assert failures

Bug: 62918393
Test: runtest frameworks-net
Change-Id: I90c211dc6d6262475924ecabc2863c47aec5a0b9

7 years agoConnectivityManager: allow usage of TYPE_NONE
Hugo Benichi [Tue, 20 Jun 2017 05:07:59 +0000 (14:07 +0900)]
ConnectivityManager: allow usage of TYPE_NONE

This patch allows to use TYPE_NONE for the legacy network type variable
of NetworkInfo. This usage is "safe" with respect to legacy APIs using
network types as most of them already returns null or do nothing for
TYPE_NONE.

Of the existing APIs in ConnectivityManager that accept a network type
argument, those which were already returning null or doing nothing for
TYPE_NONE are:
  getNetworkInfo(int)
  getNetworkForType(int)
  stopUsingNetworkFeature(int, String)
  networkCapabilitiesForType(int)
  requestRouteToHostAddress(int, InetAddress)
  reportInetCondition(int, int)
  isNetworkSupported(int)
  getLinkProperties(int)

Only setProvisioningNotificationVisible needs an additional guard
against TYPE_NONE.

Bug: 30088447
Bug: 62844794
Test: runtest frameworks-net
Change-Id: I4455f2726d06406047086368628c1f253d854d8d

7 years agoMerge "Wakeup packet mark/mask configuration option"
Treehugger Robot [Tue, 4 Jul 2017 03:38:34 +0000 (03:38 +0000)]
Merge "Wakeup packet mark/mask configuration option"

7 years agoConfigure the package name of the updater app
Neil Fuller [Mon, 3 Jul 2017 15:08:40 +0000 (16:08 +0100)]
Configure the package name of the updater app

Configure the package name of the updater app;
the package name is now decided and can be defaulted.

Bug: 31008728
Test: make droid
Change-Id: I2fe215d34600ce16f902b4e285edcb345423104b

7 years agoMerge "Add dumpsys support to RulesManagerService"
Neil Fuller [Mon, 3 Jul 2017 09:29:32 +0000 (09:29 +0000)]
Merge "Add dumpsys support to RulesManagerService"

7 years agoMerge "Networking unit tests: fix some flaky tests"
Treehugger Robot [Mon, 3 Jul 2017 09:23:26 +0000 (09:23 +0000)]
Merge "Networking unit tests: fix some flaky tests"

7 years agoMerge "Pass all offload-exempt prefixes into OffloadController"
Treehugger Robot [Mon, 3 Jul 2017 08:30:30 +0000 (08:30 +0000)]
Merge "Pass all offload-exempt prefixes into OffloadController"

7 years agoMerge "Switch IpManager and IpReachabilityMonitor to use SharedLog"
Treehugger Robot [Mon, 3 Jul 2017 08:09:48 +0000 (08:09 +0000)]
Merge "Switch IpManager and IpReachabilityMonitor to use SharedLog"

7 years agoNetworking unit tests: fix some flaky tests
Hugo Benichi [Thu, 29 Jun 2017 13:58:39 +0000 (22:58 +0900)]
Networking unit tests: fix some flaky tests

 - less strict regex for SharedLogTest: the subsecond part of the
   timestamp can have 0, 1, 2 or 3 digits.
 - refactor NetworkStatsServiceTest and NetworkStatsObserversTest to use
   waitForIdleHandler facility of ConnectivityServiceTest.
   NetworkStatsServiceTest was using a flaky custom version of
   waitForIdleHandler.

Bug: 62918393
Bug: 32561414
Test: runtest frameworks-net
Change-Id: I634acfb5f4fe1bd5267e3f14b9f645edc32d5d12

7 years agoSwitch IpManager and IpReachabilityMonitor to use SharedLog
Erik Kline [Thu, 29 Jun 2017 02:46:51 +0000 (11:46 +0900)]
Switch IpManager and IpReachabilityMonitor to use SharedLog

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - frameworks/opt/net/wifi/tests/wifitests/runtests.sh passes
    - frameworks/base/wifi/tests/runtests.sh passes
    - roamed from AP to AP watching IpRM logs accumulate
Bug: 62476366
Bug: 62162774

Merged-In: I4bef3b6b1975fa3c73cca0a0e95fad99708f061e
Merged-In: I265566158f3e5ebd21fb43e2eb0b8ba016fca76a
Change-Id: I155a26259420919eeed74166bacce3311caa49da
(cherry picked from commit 0fc10b2b1d7be649c80dda4ebdb2e31af216bfcc)

7 years agoMerge changes I6779a835,I4e3d8322
Lorenzo Colitti [Mon, 3 Jul 2017 01:39:32 +0000 (01:39 +0000)]
Merge changes I6779a835,I4e3d8322

* changes:
  Only connect to one address per address family.
  Update our user agent to something newer.

7 years agoMerge "[BUG] java.util.MissingFormatArgumentException: Format specifier '%d'"
Treehugger Robot [Mon, 3 Jul 2017 00:17:57 +0000 (00:17 +0000)]
Merge "[BUG] java.util.MissingFormatArgumentException: Format specifier '%d'"

7 years agoPass all offload-exempt prefixes into OffloadController
Erik Kline [Sat, 24 Jun 2017 10:29:10 +0000 (19:29 +0900)]
Pass all offload-exempt prefixes into OffloadController

Additionally:
    - eliminate useless TetherMasterUtilState

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks passes
Bug: 29337859
Bug: 32163131

Change-Id: I0482ac9dd9e8ba558b253643dbc01875ce9475ef

7 years agoOnly connect to one address per address family.
Lorenzo Colitti [Wed, 28 Jun 2017 14:42:41 +0000 (23:42 +0900)]
Only connect to one address per address family.

This ensures probes don't take too long when a host has
multiple addresses. So for example:

$ adb shell settings put global captive_portal_http_url http://play.googleapis.com/generate_204
$ host play.googleapis.com
play.googleapis.com is an alias for googleapis.l.google.com.
googleapis.l.google.com has address 216.58.196.234
googleapis.l.google.com has address 216.58.197.10
googleapis.l.google.com has address 172.217.26.106
googleapis.l.google.com has address 172.217.27.170
googleapis.l.google.com has address 216.58.199.234
googleapis.l.google.com has address 216.58.221.170
googleapis.l.google.com has IPv6 address 2404:6800:400a:807::200a

results in:

06-29 21:38:09.695 - PROBE_DNS play.googleapis.com 270ms OK 2404:6800:400a:806::200a,172.217.26.106

Bug: 36532213
Test: as described in commit description
Change-Id: I6779a8356bac8d4a3912b0822379d45dfc662541

7 years agoMerge "Add boot profile support"
Treehugger Robot [Sat, 1 Jul 2017 03:24:12 +0000 (03:24 +0000)]
Merge "Add boot profile support"

7 years agoAdd boot profile support
Mathieu Chartier [Fri, 30 Jun 2017 18:47:38 +0000 (11:47 -0700)]
Add boot profile support

If the boot profile file exists, its passed to the runtime as an
image compiler option. Also pass speed-profile for this case.

Bug: 37966211
Test: make, flash, and look at logcat during boot

(cherry picked from commit f99e70e93408bd6dfda595866f13ba0068d4798e)

Change-Id: Ia09ff0200186382e45151b7cabb53016f8e0aa3f

7 years agoAdd a reason arg to streamStateUpdated
Hall Liu [Fri, 30 Jun 2017 21:37:30 +0000 (14:37 -0700)]
Add a reason arg to streamStateUpdated

Change-Id: I6cc48b64aa885672e062b060a0cf58649df17916

7 years agoMerge "hidl getService throw correct exceptions."
Treehugger Robot [Fri, 30 Jun 2017 20:36:36 +0000 (20:36 +0000)]
Merge "hidl getService throw correct exceptions."

7 years agoAdd dumpsys support to RulesManagerService
Neil Fuller [Fri, 23 Jun 2017 15:43:45 +0000 (16:43 +0100)]
Add dumpsys support to RulesManagerService

Override the dump method so RuleManagerService can dump its state
into logs. Crude argument support has been added for dumping
specific fields in an easy to process way (for test scripts to use).

Tested with:
make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above.
Test: Manual; adb shell dumpsys timezone [-format_state piscotz]
Bug: 31008728
Change-Id: I0ad83aa245232ed0b983ceacd8accfb876824d6f

7 years agoMerge "Track move of distro installer code"
Neil Fuller [Fri, 30 Jun 2017 12:28:23 +0000 (12:28 +0000)]
Merge "Track move of distro installer code"