Commit Graph

83271 Commits

Author SHA1 Message Date
Erik Kline
b331b02da9 Merge "Fail if the interface is not available when starting" 2018-03-05 12:39:28 +00:00
Erik Kline
b152cd0aa4 Fail if the interface is not available when starting
Addresses a long-standing TODO.  Now, when calling IpClient's
startProvisioning(), the interface has to be available (i.e.
InterfaceParams#getByName() must return non-null).

Also:
    - add a test
    - refactor for testability
    - delete some constructors no longer used
    - properly handle passed-in null IpClient.Callback
    - some more IpManager -> IpClient renaming
    - permit recording metrics before starting a provisioning
      attempt (logging immediate errors) without Log.wtf().

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks/opt/net/wifi/tests/wifitests/runtests.sh passes
    - runtest frameworks-net passes
    - basic WiFi IpClient connections works fine
Bug: 62476366
Bug: 73487570
Change-Id: Ic83ad2a65637277dcb273feb27b2d1bb7a11eb2b
2018-03-05 19:29:26 +09:00
Treehugger Robot
0b8d55e633 Merge "Add DNS_TETHER to the list of UIDs in the framework." 2018-03-05 07:40:36 +00:00
Treehugger Robot
d846adac83 Merge "Extend network request to query networks w/o capabilites" 2018-03-02 19:04:31 +00:00
Chalard Jean
6001f72478 Merge "Give apps with NETWORK_SETTINGS right to see any VPN." 2018-03-02 11:52:15 +00:00
Chalard Jean
b552c4655f Give apps with NETWORK_SETTINGS right to see any VPN.
...not only the ones that apply to them.

Bug: 73217368
Test: runtest frameworks-net and CTS
Change-Id: I436972a3e51e98bdd815771b451bcedadf684763
2018-03-02 17:10:11 +09:00
Chalard Jean
adbf1d029b Give VPNs the INTERNET capability when they route most of the IP space
Test: manual, plus wrote some new tests for this
Bug: 72765718
Change-Id: I9759da72b752fd8eeb1d0647db9ab341f04c0528
2018-03-02 16:20:22 +09:00
Pavel Maltsev
1cd48dae22 Extend network request to query networks w/o capabilites
Add another bit mask into NetworkCapabilities class that represents
unwanted capabilities and corresponding methods to add and remove them.

Bug: 72828388
Bug: 68762530

Test: runtest -x frameworks/base/tests/net/
Change-Id: Ie291167eb74fdb696c7ee145c8cc46ea8115d6ba
2018-03-01 17:52:02 -08:00
Ajay Panicker
2a216f3999 Bluetooth: Remove adjustAvrcpAbsoluteVolume
The AudioManager now handles all calculations for volume stepping now
and no longer uses adjustAvrcpAbsoluteVolume.

Bug: 68812037
Test: Compile
Change-Id: I9cbf7989e49738c7a43fe3142aced5803111271e
2018-03-01 19:04:55 +00:00
Przemyslaw Szczepaniak
093c509c40 Merge "Tweak DateFormat.is24HourFormat javadoc to be more explicit." 2018-03-01 15:11:14 +00:00
Lorenzo Colitti
f4b4f4d43b Add DNS_TETHER to the list of UIDs in the framework.
It has been reserved in android_filesystem_config.h since
aosp/245632 in 2016, but was never included in the list of UIDs
in Process.java.

Bug: 29881876
Test: builds, boots
Change-Id: I6d36d7d15634445d992a10087b5ba31b480f9f20
2018-03-01 21:06:11 +09:00
Przemyslaw Szczepaniak
170d9b8ceb Tweak DateFormat.is24HourFormat javadoc to be more explicit.
Bug: 32761394
Test: make docs
Change-Id: If10da5b9d63e6e88774e333d5c266e423e6bc7c8
2018-03-01 10:35:57 +00:00
Chalard Jean
7959e70ef2 Merge "Fix up NetworkCapabilities' toString" 2018-03-01 04:01:16 +00:00
Joe Maples
39bb9e8905 pm: Fix typo in error
instnat -> instant

Change-Id: Ie2f06840575fc266e3510252635ad17be65945b8
Signed-off-by: Joe Maples <joe@frap129.org>
2018-02-28 18:42:08 +00:00
Holly Jiuyu Sun
4b5680b6fa Merge "Mark EUICC_PROVISIONED as @SystemApi." 2018-02-28 18:18:04 +00:00
Treehugger Robot
6d9d717ab7 Merge "Delay starting the webview_zygote until first use." 2018-02-28 16:02:58 +00:00
Chalard Jean
07ace0f6cc Fix up NetworkCapabilities' toString
Test: manual
Change-Id: I3bcec6a6873e8ec7ced0820d3d5b92249b19fe0a
2018-02-28 19:47:48 +09:00
Treehugger Robot
4c00edd361 Merge "Add OEM_PAID network capability" 2018-02-28 07:06:00 +00:00
Holly Jiuyu Sun
daeb505e2e Mark EUICC_PROVISIONED as @SystemApi.
Bug: 35851809
Test: test on phone
Merged-In: I1627aeaf6846e889767fb4223c46fa278a751b23
Change-Id: I1627aeaf6846e889767fb4223c46fa278a751b23
2018-02-27 21:00:04 -08:00
Robert Sesek
b21dbc220f Delay starting the webview_zygote until first use.
During boot, WebViewZygote.setMultiprocessEnabled() is called by the
WebView initialization logic. Starting the WebViewZygote here causes a
slowdown in the system_server boot process, so delay launching the
zygote until it is needed.

Previously the webview_zygote was launched by init, and merely
connecting to it in the boot process didn't have significant overhead.

Bug: 73743583
Bug: 63749735
Test: Boot a device, verify that webview_zygote process is not running.
Test: Launch "Third-party licenses" activity from Settings, and it
      renders correctly via the WebView.

Change-Id: I1352a5df95e4a793ac64862c439ba2573ddd2d18
2018-02-26 16:59:48 -05:00
Jakub Pawlowski
5027679041 Use assigned UUID for Hearing Aid Service
Test: manual
Bug: 64038649
Change-Id: Iab748db944df3bba8927973d0a55d95514b9f8ed
2018-02-26 18:12:19 +00:00
Hugo Benichi
cb0714332d Merge "Fix NPE in NetworkMetrics" 2018-02-24 17:54:01 +00:00
Treehugger Robot
e7d04d728c Merge "Let sendShowMessage called from hide to show" 2018-02-24 01:27:13 +00:00
Treehugger Robot
a4bde27012 Merge "Wrap raw binder interface into public classes" 2018-02-24 00:19:29 +00:00
Hugo Benichi
e73486bf24 Fix NPE in NetworkMetrics
addTcpStatsResult() in NetworkMetrics was not checking for the nullness
of the pendingSummary object and trying to add stats regardless.

This patch fixes addTcpStatsResult() so that it populates pendingSummary
if necessary, similarly to addConnectResult() and addDnsResult()

Bug: 73825228
Test: runtest frameworks-net
Change-Id: I616a4be0e6e5920bd2f5c58292fea769bd516df7
2018-02-24 08:01:30 +09:00
Ruchi Kandoi
0b0b183f24 Wrap raw binder interface into public classes
Test: Dummy application using the API
Bug: 73751309
Change-Id: If697100ed28b6b5217367d9988ed45f8baa14c34
2018-02-22 16:59:36 -08:00
Hall Liu
de3eeac84d Merge "RTT bugfixes, part 5" 2018-02-22 19:16:41 +00:00
Mathew Inwood
787c193ee5 Package whitelist for hiddenapi checks.
Some packages in the system image are not built against the SDK, so
enforcing hiddenapi checks for these will break them. Add a whitelist
for such packages.

For now, just add the contacts provider to the whitelist. The list will be
further populated later.

Test: Added test app package name to whitelist to verify.

Bug: 73244707

Merged-In: I94746b7f12dd9371d5068bb235eb853f63ee4d97
Change-Id: I1cbbd220c61b1b4b767c301f97096607ee902a7b
2018-02-22 11:05:14 +00:00
Hall Liu
e9041241de RTT bugfixes, part 5
* Add a new API to allow Telecom to inform ConnectionServices when the
RTT text stream changes
* No longer set the RTT property from ConnectionService. Client apps
should be setting properties themselves.
* Add Dialer-side RTT property in order to remove the dependence on
checking the RTT streams, which have a complex lifecycle

Bug: 72951201
Bug: 72648661
Test: manual, with real RTT calls and Dialer's SimulatorConnection, also
cts
Change-Id: Ic4c7d883d2dc6baf8e8c0eaa4df58d7de8762b9e
Merged-In: Ic4c7d883d2dc6baf8e8c0eaa4df58d7de8762b9e
2018-02-22 03:19:19 +00:00
Robert Sesek
602d1323ed Reparent the webview_zygote to be a child of the main app_process zygote.
This uses the new ZygoteProcess.startChildZygote() method to launch the
webview_zygote, rather than having init start it. This will share more
memory between the app_process and the webview_zygote, reducing the
overall system footprint.

Bug: 63749735
Test: m
Test: Launch "Third-party licenses" activity from Settings, and it
      renders correctly via the WebView.
Change-Id: I3e39cd8adb9c099c92ee34640428916d90cb2b8f
2018-02-20 17:00:41 -05:00
Torne (Richard Coles)
5bc14af5fa Consider shared libs when precreating WebView classloader.
The change to handling of the deprecated Apache HTTP library means that
the WebView implementation package might have a non-empty shared library
list. Make sure to fetch shared libraries when querying WebView
implementations, and take them into account when constructing both the
actual classpath to be used to precreate the classloader, and when
deciding what the cache key for the precreated classloader should be.

Change-Id: I5e1409358d935e1c9f325db434bc6d4ef8ead759
Merged-In: I5e1409358d935e1c9f325db434bc6d4ef8ead759
Fixes: 65574359
Test: launch anything that uses WebView
(cherry picked from commit 4fd8aa51e4)
2018-02-20 15:41:12 -05:00
nharold
6d5aea8811 Merge "Fix ConnectivityServiceTest for NATT Keepalive" 2018-02-20 19:17:23 +00:00
Chalard Jean
473b3b7f03 Merge "DO NOT MERGE : fix useless import" 2018-02-18 23:14:42 +00:00
Treehugger Robot
cfc6897a39 Merge "Add @Nullable to return values in Uri" 2018-02-17 04:49:23 +00:00
Treehugger Robot
554cfd1f1d Merge "Add Zygote.startChildZygote() to fork a new process that itself is a zygote." 2018-02-17 01:39:54 +00:00
Nathan Harold
63dd81390d Fix ConnectivityServiceTest for NATT Keepalive
Fix test breakages I caused when adding cell
support for NATT keepalives.

-Make the minimum keepalive interval a constant in
 ConnectivityManager and use it in tests.
-Re-Disallow IPv6 Keepalives

Bug: 73327535
Test: 'runtest -x ConnectivityServiceTest' now passes
Change-Id: I5ec4367d250ee371014e65c897c3897a25a05e2d
2018-02-16 16:34:50 -08:00
Treehugger Robot
8b764a0dab Merge "[DO NOT MERGE] Fix some mouse + list-item selection/scrolling issues" 2018-02-16 20:02:26 +00:00
Treehugger Robot
80ae7124f5 Merge "[DO NOT MERGE] Fix context menu position for RTL" 2018-02-16 19:54:26 +00:00
Robert Sesek
d0a190df8a Add Zygote.startChildZygote() to fork a new process that itself is a zygote.
This adds a new --start-child-zygote argument that instructs the main
zygote to create a new child process that will also be a zygote. The
system_server generates a random name in the abstract socket namespace
for it and the child-zygote to communicate over, and that is passed as
an argument to the new process.

A child-zygote bypasses the normal post-fork-child of the zygote process
in order to preserve itself as a zygote. This means not starting the
Binder threadpool nor launching into ActivityThread. Instead, a
child-zygote calls into its own main function. The main function runs a
ZygoteServer select loop, listening on the socket name specified by the
system_server when it was forked.

Unlike the system zygotes, a child-zygote can be killed without bringing
down the system. Killing a child-zygote will not terminate its child
processes, which will be reparented to init for reaping when they
eventually exit.

Bug: 63749735
Test: m (with multi-project commits landed)
Change-Id: I3e7ebbdba498f8fec1d84cdf927dc43a92be4b68
2018-02-16 14:17:41 -05:00
Mathew Inwood
fe1eebec5d Hidden API blacklisting killswitch.
Just support "*" for now, meaning disable all API blacklisting for all
apps.

Test: Manually verified by:
- installing test app that accesses hidden API
- manually blacklist the API
- $ adb shell settings put global hidden_api_blacklist_exemptions \\*

This is a cherry pick of change I9a41a104742c9aaaf3a753e7b0f3a1106e37d4d3
from internal master.

Merged-In: I9a41a104742c9aaaf3a753e7b0f3a1106e37d4d3
Change-Id: Ibb2a1d054c1b099fc6093e37f24b2ed421a2313c
2018-02-16 09:57:09 +00:00
Chalard Jean
77fb07e9e9 DO NOT MERGE : fix useless import
This was added to avoid a merge conflict at a sensitive time.
It can (and should) go.

Test: no code change
Change-Id: I11d73e2d988ae61a168aa0f1cc7c2c506f509d30
2018-02-16 17:21:39 +09:00
Treehugger Robot
f50d9fbdc1 Merge "Add missing'}' in javadoc of public API method" 2018-02-16 03:19:35 +00:00
Calin Juravle
b0817b238a Merge "Pass the compilation reason to dexopt" 2018-02-16 02:25:48 +00:00
Scott Kennedy
e26450b714 Add @Nullable to return values in Uri
This makes it much easier to add null-safety when calling this from Kotlin.

Test: refactoring CL. Existing unit tests still pass.
Change-Id: I55c33ad4ff1306afd80c1a5562c54dfcb6068b0b
2018-02-15 23:53:47 +00:00
Hall Liu
b823d08d21 Merge "Add setting and logging for RTT" 2018-02-15 21:01:10 +00:00
Calin Juravle
b981617ec7 Pass the compilation reason to dexopt
Record the compilation reason in the oat files to enable better
performance monitoring.

Test: DexoptOptionsTest
      manual
Bug: 73102540

Change-Id: Ifa487d4bc33dcd06f12af6bdd1d9a9c5f4562f4b
2018-02-15 12:49:26 -08:00
Hall Liu
ee57508851 Add setting and logging for RTT
Add a system setting to store preferred RTT mode for calls. Add logging
for RTT in Telecom base classes.

Bug: 63934808
Test: manual
Change-Id: Ie26fac800931604379bbe7b8abfed7caa8c0236d
Merged-In: Ie26fac800931604379bbe7b8abfed7caa8c0236d
2018-02-15 18:55:35 +00:00
Pavel Maltsev
43403201e6 Add OEM_PAID network capability
Bug: 68762530

Test: runtest -x frameworks/base/tests/net/

Change-Id: I51c07e0c2211d631e90b27468c26b599e7b07bc8
2018-02-15 10:46:00 -08:00
Treehugger Robot
b98102b4dc Merge changes from topic "cp_calin_framework_2017"
* changes:
  Allow public profile compilation for primary apks
  [framework] Pass .dm files to dexopt at install time
  Extend the ArtManager profiling API to cover boot image profiling
  [framework] Extend profile operations to take the profile name
  Accept UserHandle.USER_ALL during profile preparation
  [framework] Prepare profile for app code paths
  Perform a non strict matching of .dm files when computing the size
  Support installation of DexMetadata files (.dm)
  Rename snapshotProfile to createProfileSnapshot for consistency
  Implement ArtManager#snapshotProfile API
  Add SystemApis to expose runtime profile information
  Log SHA256 of secondary dex files during reconcile.
2018-02-15 16:17:06 +00:00
David Brazdil
10034d94cf Merge "Update hidden API toast message" 2018-02-15 11:55:15 +00:00