Commit Graph

84795 Commits

Author SHA1 Message Date
Peiyong Lin
8441bcbc6d Split blacklist from versioned blacklists.
Previously we use blacklist to get all blacklists, to maintain the consistency
between blacklist and whitelist, and to move blacklist processing to GPU
service, we added blacklists to store all blacklists, and now blacklist will
only represent one blacklist.

BUG: 120869311
Test: Build, flash and boot. Verified in master patch ag/6288554
Change-Id: Ifac875177ad959705c8f80672341c4cbee7bbc93
Merged-In: Ifac875177ad959705c8f80672341c4cbee7bbc93
Exempt-From-Owner-Approval: Change in CoreSettingsObserver.java is too minor
2019-04-17 23:09:42 -07:00
Yiwei Zhang
b421e0c796 Game Driver: clean up GraphicsEnvironment
Bug: 123529932
Test: Build, flash and boot. Verify by installing game driver apk
Change-Id: Id73605125410a2b4054d9179227022e177d20af2
Merged-In: Id73605125410a2b4054d9179227022e177d20af2
2019-04-17 22:57:54 -07:00
Peiyong Lin
c95354bc9c [GPU Service] Implement GPU service.
GPU Service is used to monitor all GPU and graphics driver related features.
This patch implements GPU service into System Server, and implements
functionality to extract the whitelist out of game driver package when the
package is upgraded or removed. This will move the whitelist processing off
critical path when app launches.

BUG: 123290424
Test: Build, flash and boot. Verify by upgrading game driver apk.
Change-Id: I563a138bfe0c4c1bb17ed28dab5d6a8df244021d
Merged-In: I563a138bfe0c4c1bb17ed28dab5d6a8df244021d
2019-04-17 20:18:09 -07:00
Yiwei Zhang
c4db14e72d Game Driver: rename GUP to Game Driver
Bug: 119221883
Test: Build, flash, boot and make RunSettingsRoboTests
Change-Id: I39724917b516b4871c6b1b1f0d30aa0f793942a4
Merged-In: I39724917b516b4871c6b1b1f0d30aa0f793942a4
2019-04-17 19:54:52 -07:00
Peiyong Lin
0b0b48d8f5 [Game Driver] Add support for whitelist.
Instead of keeping reading the whitelist everytime, we want to store it in
Settings.Global variable and reuse it later.

BUG: 120869311
Test: Build, flash and boot.
Change-Id: I5e39757383c5ba7d31af7efb3e6e8a2996e669f4
Merged-In: I5e39757383c5ba7d31af7efb3e6e8a2996e669f4
2019-04-17 17:02:39 -07:00
Peiyong Lin
ac74bc8f45 [Game Driver] Add blacklist mechanism.
When a blacklist is set, we must not use driver package for those applications
on the blacklist.

BUG: 120869311
Test: Build, flash, boot. Verify with command line.
Change-Id: I1c9f10a3086007038c328a20346ffadeff1861ae
Merged-In: I1c9f10a3086007038c328a20346ffadeff1861ae
2019-04-17 16:22:33 -07:00
Yiwei Zhang
79c5356a07 GUP: Add a global property for genreal preference
This change also fixes typos and adds some missing comments

Bug: 119221883
Test: Build, flash and boot, verify with prototype
Change-Id: Ida976c4fb3d4af5ffc1d9b977f00fa9c7239a434
Merged-In: Ida976c4fb3d4af5ffc1d9b977f00fa9c7239a434
2019-04-17 15:54:48 -07:00
Yiwei Zhang
a35e865b97 GUP: Update global property for the new dev opt
We updated the development opt in mechanism for GUP. Now we have
GUP_DEV_OPT_IN_APPS for applications selected to use GUP and
GUP_DEV_OPT_OUT_APPS for applications selected not to use GUP.

Bug: 119221883
Test: Build, flash and boot, verify with prototype
Change-Id: I52869ecf9e411a8dbdc1146f00c82023ba41bebf
Merged-In: I52869ecf9e411a8dbdc1146f00c82023ba41bebf
2019-04-17 00:17:53 -07:00
Peiyong Lin
8eeb14e639 Rename updatable graphics driver to Game Update Package.
We have rebranded this project to Game Update Package, and GUP for short.

BUG: 119221883
Test: Build, flash and boot. Verify by going to developer options.
Change-Id: If284bd3e0b29cb025833be29fa33179011c151d7
Merged-In: If284bd3e0b29cb025833be29fa33179011c151d7
2019-04-16 23:06:24 -07:00
Peiyong Lin
be09eef818 [GUP] Hard code the name of the whitelist file.
Allowing customized whitelist filename could result in inconsistency and
fragmentations in toolings.

BUG: 120870520
Test: Build, flash and boot
Change-Id: Ibe9337b358b6a67600048f1661d73574d7bea607
Merged-In: Ibe9337b358b6a67600048f1661d73574d7bea607
2019-04-16 18:35:17 -07:00
Peiyong Lin
e23f59aa5a Add global property to store opt-in application package name.
We provide a way in developer option to opt-in an application to use updated
graphics driver. To make sure we set up the graphics environment correctly, we
need to access the package name of the selected application. This patch
introduces a global property to store the package name.

BUG: 119221883
Test: Build, flash and boot, verify with prototype
Change-Id: I49dfcccf387169c072fb9345f7a50c00fcdb0737
Merged-In: I49dfcccf387169c072fb9345f7a50c00fcdb0737
2019-04-16 18:35:17 -07:00
Peiyong Lin
443894f8bb [GraphicsEnvironment] Add whitelist support.
This patch adds the ability to load whitelist from updatable graphcis driver
apk. Typically a whitelist is part of the graphics driver apk, and the name is
set by overwriting ro.gfx.driver.whitelist.0

BUG: 117241379
Test: Build, flash and boot, whitelist an app and verify.
Change-Id: Ie36ca0173a90a8e48acaca2979ab64bbf92eeaed
Merged-In: Ie36ca0173a90a8e48acaca2979ab64bbf92eeaed
2019-04-16 18:33:43 -07:00
Treehugger Robot
2f206c6270 Merge "Notify the caller about I/O error" 2019-04-16 11:52:31 +00:00
Abhijeet Kaur
0af10e33f3 Notify the caller about I/O error
Call onError for caller of BugreportManager.start() if any io error
occurs during runtime.

Test: Tested manually by throwing IO exception in the code when
bugreport is being generated, onError of the callback successfully
called.
Change-Id: I9033d85d392b926041fc26a86806a370752d062d
2019-04-16 11:34:21 +01:00
Luke Huang
40e7fb6a9b Merge "Fix DnsResolver API could not bypass private DNS correctly" 2019-04-16 09:03:22 +00:00
Chalard Jean
ae8548df0b Merge "Restrict access to dangerous methods to <= P" 2019-04-16 05:17:20 +00:00
Luke Huang
2ade716f5c Fix DnsResolver API could not bypass private DNS correctly
Bug: 130594022
Test: atest DnsResolverTest
Change-Id: Ibf3edac3075d921d189237c485871efb869b320b
2019-04-16 11:57:45 +08:00
Treehugger Robot
90424e8060 Merge "Get new surface if it was released from setWindowStopped" 2019-04-15 22:52:55 +00:00
Treehugger Robot
e5cf74326d Merge "Refine Bluetooth Metadata API" 2019-04-15 20:37:28 +00:00
Neil Fuller
6150065560 Merge "Switch ByteStringUtils over to HexEncoding impl" 2019-04-15 17:30:35 +00:00
Treehugger Robot
da2b966f6e Merge "Bluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull" 2019-04-12 18:12:27 +00:00
Lorenzo Colitti
4c9f954d2b Revert "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""
This reverts commit 3897df2e36.

Reason for revert: Rolling forward, will fix tests in same CL stack.

Bug: 114231106
Bug: 130397860
Test: FrameworksNetTests
Change-Id: Ia8a0c99b4e1fd5dff26c881715cd876618ca4321
2019-04-12 19:52:32 +09:00
Remi NGUYEN VAN
6617bf81c9 Merge "Revert "Block incoming non-VPN packets to apps under fully-routed VPN"" 2019-04-12 10:25:46 +00:00
Remi NGUYEN VAN
3897df2e36 Revert "Block incoming non-VPN packets to apps under fully-routed VPN"
This reverts commit fd8f96d719.
This change does not have any topic: not reverting the other 2 commits in the original topic.

Reason for revert: broke FrameworksNetTests presubmit: b/130397860

Change-Id: Iff41d9fe97fafea44680c8d67d1ce19277548cc0
2019-04-12 09:05:40 +00:00
Treehugger Robot
0013d45b27 Merge "Pass valid file descriptor to binder" 2019-04-12 08:23:33 +00:00
Jakub Pawlowski
64307cc0b2 Bluetooth: Make ScanRecord.getServiceSolicitationUuids NonNull
Test: compilation
Bug: 115639878
Merged-In: I5f895d65a7036275ab0faa0afd2ee1eebc416476
Change-Id: I5f895d65a7036275ab0faa0afd2ee1eebc416476
2019-04-12 09:27:10 +02:00
Luke Huang
5023a6184c Merge "API council feedbacks for DnsResolver" 2019-04-12 00:45:18 +00:00
Abhijeet Kaur
86311f8a53 Pass valid file descriptor to binder
screenshotFd needs to be optional in Bugreport API. For some bugreports
such as wifi,telephony, interactive etc taking a screenshot is not
required.

Initially, the API was sending invalid file descriptor to the Binder, but
that binder transaction could not be completed as Binder validates the
file descriptor to be valid and not-null.

Adding a tmp.png screenshot file to pass to bugreport API call. In a
separate CL in frameworks/native, added check that the bugreports that
don't require screenshots would not use this file descriptor value.

Bug: 128981582
Test: Tested by taking bugreports using Bugreport API in shell
Merged-In: I3233f5753506ae159c9fa591742e6b99e361039b
Change-Id: I3233f5753506ae159c9fa591742e6b99e361039b
(cherry picked from commit b462e2e499)
2019-04-11 18:11:29 +01:00
Rubin Xu
0ebe724fc1 Merge "Block incoming non-VPN packets to apps under fully-routed VPN" 2019-04-11 16:46:16 +00:00
Luke Huang
4219ab6867 API council feedbacks for DnsResolver
To address the API review feedback provided by
the API council.

Bug: 129261432
Test: atest DnsResolverTest
Change-Id: I3de11c913682abf790850b45cd5d50ac28b3fc5c
2019-04-11 22:17:20 +08:00
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
Rubin Xu
fd8f96d719 Block incoming non-VPN packets to apps under fully-routed VPN
When a fully-routed VPN is running, we want to prevent normal apps
under the VPN from receiving packets originating from any local non-VPN
interfaces. This is achieved by using eBPF to create a per-UID input
interface whitelist and populate the whitelist such that all
non-bypassable apps under a VPN can only receive packets from the VPN's
TUN interface (and loopback implicitly)

This is the framework part of the change that build the whitelist.
The whitelist needs to be updated in the following cases:
* When a VPN is connected and disconnected
    This will cover the change to allowBypass bit, since that can't be
    changed without reconnecting.
* When a VPN's NetworkCapabilites is changed (whitelist/blacklist app changes)
* When a new app is installed
* When an existing app is removed
* When a VPN becomes fully-routed or is no longer fully-routed

New user/profile creation will automatically result in a whitelist app change
transition so it doesn't need to be handled specially here.

Due to the limitation of the kernel IPSec interacting with eBPF (sk_buf->ifindex
does not point to the virtual tunnel interface for kernel IPSec), the whitelist
will only apply to app VPNs but not legacy VPN connections, to prevent breaking
connectivity with kernel IPSec entirely.

Test: atest PermissionMonitorTest
Test: atest android.net.RouteInfoTest
Test: atest com.android.server.ConnectivityServiceTest
Test: atest HostsideVpnTests
Bug: 114231106
Change-Id: I143b03d60e46cb1b04732b4a4034f5847b4d1b1a
2019-04-10 17:05:54 +01: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
Chalard Jean
0bb53dbb64 Restrict access to dangerous methods to <= P
Test: make
Fixes: 130143562
Change-Id: I1a6a472f83cf00a1ab174a9c5e67d3e9357a0c45
2019-04-09 15:47:25 +09: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