Commit Graph

84760 Commits

Author SHA1 Message Date
Lorenzo Colitti
dc7b7de85c Merge "Add support for TAP interfaces in TestNetworkManager." 2019-04-11 11:45:40 +00:00
Neil Fuller
1839e895f6 Merge "Switch from Byte.toHexString() to HexEncoding" 2019-04-11 09:27:54 +00:00
Neil Fuller
b5d1c15ec2 Switch from Byte.toHexString() to HexEncoding
Switch from Byte.toHexString() to HexEncoding equivalents.

Bug: 124232146
Test: build only
Exempt-From-Owner-Approval: Cherry-picking OWNERS approved internal version
Merged-In: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
Change-Id: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
2019-04-11 09:27:45 +00:00
David Brazdil
352021b4aa Merge "Update AppComponentFactory.instantiateClassLoader docs" 2019-04-10 22:18:02 +00:00
David Brazdil
59a97141c8 Update AppComponentFactory.instantiateClassLoader docs
Clarify the intended use and properties of the default class loader.

Bug: 128524313
Test: n/a
Change-Id: Iae82554f9294d5248b98f1fa72fc1a47993e86fd
2019-04-10 19:50:18 +01:00
Benedict Wong
c6ce6fc841 Merge changes I98573a5c,Ic7394f24
* changes:
  Enable checks for MANAGE_TEST_NETWORKS in TestNetworkService
  Cleanup of Test Network service
2019-04-10 17:06:17 +00:00
Treehugger Robot
a1e48f3c9a Merge "Fix comment on StaticIpConfiguration#getDomains" 2019-04-10 06:30:55 +00:00
Lorenzo Colitti
b15fcce2a2 Add support for TAP interfaces in TestNetworkManager.
Test: builds, boots
Change-Id: I88bfd7f37c0ba0228f8288fe92212618ce134e4f
2019-04-10 13:29:41 +09:00
Chiachang Wang
e9a39ceb6b Merge "Move data stall definitions out from Setting" 2019-04-10 03:27:19 +00:00
Chiachang Wang
2449e583d8 Move data stall definitions out from Setting
From mainline perspective, we should use android flag api
instead of using Settings. Thus, move the definitions into
NetworkStack.

Bug:120013793
Test: atest NetworkStackTests SettingsBackupTest
Change-Id: I8e1fb5b47fff3bf624131ba1f5732daabd991e6d
Merged-In: I8e1fb5b47fff3bf624131ba1f5732daabd991e6d
Merged-In: I0a2a1e5d3de14ea86556ca471e26064df3481412
2019-04-10 02:37:57 +00:00
Chiachang Wang
c72f456b19 Merge "Enforce NETWORK_STACK permission for calling NSS#forceUpdateIfaces" 2019-04-10 02:27:30 +00:00
Kiyoung Kim
2ed229287d Merge "Check if product app is unbundled from property." 2019-04-10 00:34:54 +00:00
Benedict Wong
7df36ed96a Cleanup of Test Network service
This follow-up change performs some cleanup changes without affecting
functionality

Bug: 72950854
Test: Compiles, CTS tests using this pass
Change-Id: Ic7394f24f11d713c9374b438182e29d2a02ea236
2019-04-09 16:34:35 -07:00
vichang
3183cbf6dc Merge "Remove the feature flag for time zone picker" 2019-04-09 12:23:19 +00:00
Chiachang Wang
e05d9d88bd Enforce NETWORK_STACK permission for calling NSS#forceUpdateIfaces
ConnectivityManager and its usages are removed from
NetworkStatsService. After that, forceUpdateIfaces requires
information that only ConnectivityService has, hence
restricting the calling permission to NETWORK_STACK or
MAINLINE_NETWORK_STACK permission. The required permission
will be changed from READ_NETWORK_USAGE_HISTORY to
NETWORK_STACK or MAINLINE_NETWORK_STACK. This change would make
it impossible to call outside the system.

Bug: 126830974
Test: atest FrameworksNetTests
Change-Id: I776484921b2dbb6735d7940c558fb5e4baed6d1e
2019-04-09 19:42:52 +08:00
Neil Fuller
70f7a0bf04 Merge "Switch to HexEncoding from ByteStringUtils" 2019-04-09 09:50:59 +00:00
Neil Fuller
b39d83ebf0 Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.

Bug: 124232146
Test: build only
Change-Id: I9f18bb56eccf5bd628e1fd9068285f75623f7caf
2019-04-08 21:57:53 +01:00
sqian
44eaff68fa Clean up Call redirection setting
Test: Treehugger
Bug: 123038126
Change-Id: I9cb569bfd1ef5fba7958bb2e5f42f05e300e3358
Merged-In: I9cb569bfd1ef5fba7958bb2e5f42f05e300e3358
2019-04-07 02:41:08 +00:00
Treehugger Robot
5721cf94de Merge "Don't set sehash when calling restoreconRecursive" 2019-04-05 15:25:47 +00:00
Remi NGUYEN VAN
7fdf4e958d Merge "Remove SocketUtils#setSocketTimeValueOption" 2019-04-05 07:13:54 +00:00
Remi NGUYEN VAN
1ddf974859 Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" 2019-04-05 06:38:08 +00:00
Nick Kralevich
cb1dddad27 Don't set sehash when calling restoreconRecursive
restorecon_recursive updates the SELinux label of the files in the
filesystem, and then attempts to write the xattr "security.sehash" as an
optimization for future restorecons. Writing security.* extended
attributes requires CAP_SYS_ADMIN, which system_server doesn't have (and
shouldn't have).

Suppress the computation and writing of the hash value. It's not
needed.

This bug has been around for a long time, but due to the fix for
bug 62302954, the error message is being generated more frequently
now.

TODO: It would be better if the default for restorecon was to suppress
the hash computation, since otherwise it encourages programs to be
overprivileged with CAP_SYS_ADMIN. I'll plan on doing that in a followup
commit.

Bugs where this error message has been called out:
Bug: 129766333
Bug: 129271240
Bug: 128700692
Bug: 129925723

Test: install an APK and ensure that no "SELinux:  setxattr failed"
    error messages are generated.
Change-Id: I83f4f225e4e73453daea42dbcabf0f8a06d320d6
2019-04-04 16:11:37 -07:00
Steven Moreland
54ea352532 Merge "ApplicationLoaders: hard failures & tests" 2019-04-04 23:10:04 +00:00
Tyler Gunn
37f6620029 Merge "Remove call identification APIs." 2019-04-04 19:35:10 +00:00
Remi NGUYEN VAN
fecb63075b Remove SocketUtils#setSocketTimeValueOption
This API was added in Q but is not necessary anymore as
Os#setsockoptTimeval was exposed as public API.

Test: m
Fixes: 129433363
Change-Id: Ifd04c0314f7f7c0dbd0ed89dbaf69b9c152d3330
2019-04-04 18:02:49 +09:00
Kiyoung Kim
22557fe696 Check if product app is unbundled from property.
Some of devices launched with old version of android (and maybe not
treblized) can come with no /product/lib. However in current we are
checking if product app is unbundled by checking /product/lib from
search path, this can lead to wrong check of unbundled. To fix this, I
created new property (ro.product.apps.unbundled) to decide if product
app is unbundled.

Bug: 129011845
Test: m -j && tested from crosshatch
Change-Id: Id30595b3ca88ffe008ffe479406d59b840b19b44
2019-04-04 01:59:24 +00:00
Chen Xu
7871659f67 Merge "scrub pii (imsi) from carrierIdentifier logging" 2019-04-04 01:53:53 +00:00
chen xu
c33a47fece scrub pii (imsi) from carrierIdentifier logging
Bug: 129229239
Test: Manual
Change-Id: I642d60e4ba1001bfd481aada87fa08dbd19098be
(cherry picked from commit 61b2c86719)
Merged-in: I642d60e4ba1001bfd481aada87fa08dbd19098be
2019-04-03 17:32:05 -07:00
Treehugger Robot
dc489aba0e Merge "Use Class.forName instead of ClassLoader.loadClass." 2019-04-03 19:24:22 +00:00
Steven Moreland
fd1dad339b ApplicationLoaders: hard failures & tests
Make errors in ApplicationLoaders caching hard failures since they are
only ever expected under bad configuration. Tests for these are also
added.

Test: atest android.app.ApplicationLoadersTest
Bug: 128529256
Change-Id: Ib259bcdf472e6a2f7f6b1071bb70cfead4502231
Merged-In: Ib259bcdf472e6a2f7f6b1071bb70cfead4502231
2019-04-03 11:58:30 -07:00
Nicolas Geoffray
7ef8030754 Use Class.forName instead of ClassLoader.loadClass.
Class.forName has a fast path that ClassLoader.loadClass doesn't
have yet.

Bug: 129834244
Test: m
Change-Id: I52427be9dae5acd8eef530f706626246d16dc82a
2019-04-03 10:32:49 -07:00
David Brazdil
06f2e1294b Pass app's data dir to ART
Inform ART about the location of the app's data directory when setting
up the process. This is part of an optimization that has ART cache
verification data into that directory.

Test: compiles, boots
Bug: 72131483
Change-Id: Ic80526b6ee383733eb5860e66f6c608109d838fb
2019-04-03 13:22:27 +01:00
Mark Chien
31b33b6f41 Merge "Some cleanups for Tethering" 2019-04-03 10:16:25 +00:00
paulhu
931cdd273f Move attach*Filter() and addArpEntry() methods to NetworkStack
The SocketUtils.attach*Filter and SocketUtils.addArpEntry methods
were added there because they could not be added as JNI inside
the NetworkStack. This was not possible because on Go devices,
the NetworkStack was a jar library. But now, Go also uses an APK.
Hence, move these methods to the NetworkStack.

Change-Id: I1d88a0f0be23f2b15d5103fa092b9bf982329d7c
Fix: 129433183
Test: atest NetworkStackTests FrameworksNetTests
2019-04-03 17:49:36 +08:00
Remi NGUYEN VAN
28aef549ec Fix comment on StaticIpConfiguration#getDomains
Add consistency with setDomains().

Test: m
Change-Id: I9ff2de98cec2caf903310d7e8eb7b32362c0e151
2019-04-03 15:55:15 +09:00
Remi NGUYEN VAN
0470353c2e Merge "Fix API in CaptivePortal, StaticIpConfiguration" 2019-04-03 06:51:35 +00:00
markchien
9f246bd9e3 Some cleanups for Tethering
Bug: 126481523
Test: -build, flash, boot
      -FrameworksNetTests

Change-Id: I904646efa87eb5434124c7828aca4ab09c5dc38e
2019-04-03 13:56:00 +08:00
Paul Hu
3db9cfe660 Merge "Make CaptivePortalProbeSpec and CaptivePortalProbeResult as a library" 2019-04-03 02:42:06 +00:00
Treehugger Robot
97f778f0b5 Merge "docs: Linked VpnService class description to guide." 2019-04-02 15:14:28 +00:00
paulhu
b0f53b84cc Make CaptivePortalProbeSpec and CaptivePortalProbeResult as a library
These two classes were added to @SystemApi because they are used
both by NetworkMonitor and CaptivePortalLogin. However it turns
out they are not needed in the framework, so having them as a
library sounds better.

Change-Id: Iadf77ec5952b6da8812dc6d006a39bd4e93d2bd9
Fix: 129433264
Test: atest NetworkStackTests FrameworksNetTests
2019-04-02 17:55:42 +08:00
Paul Hu
1e97aab6f4 Merge "Address leftover comments on 923337 and 930217." 2019-04-02 07:39:04 +00:00
Steven Moreland
4b5ca28dfe Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""" 2019-04-02 02:19:44 +00:00
Remi NGUYEN VAN
59a06a05bd Fix API in CaptivePortal, StaticIpConfiguration
- Add documentation to CaptivePortal#logEvent
 - Add paragraph breaks to StaticIpConfiguration class javadoc
 - Format javadoc for API documentation
 - Move setters to a builder and hide fields for apps targeting P or
   older
 - Document StaticIpConfiguration getters and builder setters
 - Add documentation for StaticIpConfiguration#getRoutes

Bug: 129362244
Bug: 129433304
Test: built, flashed, booted, WiFi working
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: Ia66c1097f01ca87d02eba3456547aedb1e480186
2019-04-02 10:43:04 +09:00
Tyler Gunn
61460ac068 Remove call identification APIs.
Removing the CallIdentification API surface.

Test: Build, run tests.
Bug: 129531123
Change-Id: I5f1451ffba04ee438df739a17472c028c44f19b2
Merged-In: I5f1451ffba04ee438df739a17472c028c44f19b2
2019-04-02 00:38:48 +00:00
Treehugger Robot
463454432b Merge "BluetoothHealth: hide auto-created default constructors" 2019-04-01 22:37:43 +00:00
Jack He
875ff327e0 BluetoothHealth: hide auto-created default constructors
Fixes: 123926561
Test: make
Change-Id: I388472c82eaca245285b5ecf2959c415508d7e69
2019-04-01 13:19:54 -07:00
Mathieu Chartier
90aa945df5 Pass debug.allocTracker.stackDepth to runtime if it exists
Since this is no longer called in ART, pass it down in bind application.

Bug: 37291459
Test: test-art-host

Change-Id: I23623e9b8e9ca6261d90cc1ae1c5d8c24cc4eba5
2019-04-01 17:56:56 +00:00
paulhu
3d67f53b02 Address leftover comments on 923337 and 930217.
- Restrict unprivileged apps to use
  NetworkRequest.Builder#setSignalStrength.

- Remove the "throws NullPointerException" in
  CaptivePortalProbeSpec constructor.

- Remove the null check in LinkProperties.

- Add annotataion into all ConnectivityManager.NetworkCallback
  methods.

Change-Id: Id275cac1d6a30d7515cd7b113394f5e8a0179314
Fix: 129097486
Test: atest FrameworksNetTests
2019-04-01 16:24:10 +08:00
Paul Hu
f9d61f1c6d Merge "Fix ApfCapabilities, LinkAddress, RouteInfo, IpPrefix API issues." 2019-04-01 07:20:53 +00:00
Remi NGUYEN VAN
78454f3c46 Merge "Fix race when starting NetworkMonitor" 2019-04-01 03:54:03 +00:00