Commit Graph

5638 Commits

Author SHA1 Message Date
Lorenzo Colitti
57646109fd Merge "Make DNS cache lifecycle management explicit"
am: a6d5664819

Change-Id: Ie97fe453c89476915f3b362b6486c7d4608da2a9
2019-04-25 17:38:23 -07:00
Lorenzo Colitti
a6d5664819 Merge "Make DNS cache lifecycle management explicit" 2019-04-26 00:23:22 +00:00
Rubin Xu
39c2091c88 Merge "Remove unused methods from INetworkManagementService"
am: 5d2c5d5dc2

Change-Id: Ie37c9c751830d209d40772bd2d410a9c550236cd
2019-04-24 07:43:27 -07:00
Treehugger Robot
5d2c5d5dc2 Merge "Remove unused methods from INetworkManagementService" 2019-04-24 14:29:39 +00:00
Luke Huang
a24d5d8f8b Make DNS cache lifecycle management explicit
1. ConnectivityService calls netd binder to create/destroy network directly.
2. Call dnsresolver binder to create/destroy cache after create/destroy network.
3. Remove unused network create/destroy methods in NetworkManagementService.

Bug: 129453995
Test: atest FrameworksNetTests
Change-Id: I15660d27f735e33d621d4af8972cdf115bf76dfa
2019-04-22 17:43:37 +08:00
Yiwei Zhang
18e97c3db5 Merge changes from topic "GameDriver3"
am: 5d832d2988

Change-Id: If2449acb0eef75ad81d913ab8fc07ae927f2ab8e
2019-04-19 14:38:53 -07:00
Treehugger Robot
5d832d2988 Merge changes from topic "GameDriver3"
* changes:
  Game Driver: process sphal libraries in GPU service
  Game Driver: Add a Settings.Global property for sphal libraries
  [Game Driver] Add global whitelist option.
  [GPU Service] Move blacklists process to GPU service.
  Split blacklist from versioned blacklists.
  Game Driver: clean up GraphicsEnvironment
  [GPU Service] Implement GPU service.
2019-04-19 20:47:35 +00:00
Dan Willemsen
c2975a3850 Merge "Expose android.os.Build.VERSION.ACTIVE_CODENAMES to CTS"
am: 644792c7d6

Change-Id: I659115cec0db8ccae778e1b842a08bb04c63e10f
2019-04-19 12:56:42 -07:00
Yiwei Zhang
b1eeb0cd9d Game Driver: process sphal libraries in GPU service
This change adds the sphal libraries text file parsing to the GPU
service. As the result, when the Game Driver apk is updated, the sphal
library list will be read out to the GAME_DRIVER_SPHAL_LIBRARIES
settings global property to be used in the graphics environment to
extend the current linker namespace.

Bug: 124448366
Test: Build, flash and boot. Install the apk to verify settings global.

Change-Id: Ifb4007a1fe7269e0a2857fe7badc8642342b1449
Merged-In: Ifb4007a1fe7269e0a2857fe7badc8642342b1449
2019-04-19 12:35:03 -07:00
Dan Willemsen
644792c7d6 Merge "Expose android.os.Build.VERSION.ACTIVE_CODENAMES to CTS" 2019-04-19 19:30:50 +00:00
Peiyong Lin
db98f35743 [Game Driver] Add global whitelist option.
Allow a '*' at the beginning of the whitelist file to mean whitelist
everything.

BUG: 120869311
Test: Build, flash and boot. Verify with apk
Change-Id: Ia1b772f545a04acb7f5b4ccbe5489e43ecddb9d2
Merged-In: Ia1b772f545a04acb7f5b4ccbe5489e43ecddb9d2
2019-04-19 10:49:03 -07:00
Peiyong Lin
8287771adc [GPU Service] Move blacklists process to GPU service.
Instead of re-process blacklists proto everytime, we move the processing to GPU
Service, and add SettingsObserver to observe the change of
Settings.Global.GAME_DRIVER_BLACKLISTS such that we only re-process the
blacklists when needed.

As a result, we will have GAME_DRIVER_BLACKLISTS which is used to accept a list
of blacklist from the server, one for each game driver version that needs to
have blacklist, and GAME_DRIVER_BLACKLIST will only contain a list of
blacklisted application package names for the current version of game driver on
the device, separated by comma.

BUG: 120869311
Test: Build, flash and boot. Use adb shell settings put command to verify.
Change-Id: Ic49800cd0b5b82ddbbdf9907d603243415d5bd3b
Merged-In: Ic49800cd0b5b82ddbbdf9907d603243415d5bd3b
2019-04-19 10:48:07 -07:00
Yiwei Zhang
351e9a6bf2 Merge changes from topic "GameDriver2"
am: a88226283d

Change-Id: I632eae432db8490ae78d32b245717a6ab0861f8a
2019-04-18 17:25:47 -07:00
Dan Willemsen
cac5c61e24 Expose android.os.Build.VERSION.ACTIVE_CODENAMES to CTS
So that CTS can handle more than one active codename.

Bug: 130764058
Test: atest CtsOsTestCases:android.os.cts.BuildTest#testBuildConstants
Change-Id: I671e28308723ee9e79ded01f12330e4efdbbbe17
2019-04-18 14:06:54 -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
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
Peiyong Lin
a0bd6fd610 Merge changes from topic "GameDriver"
am: e10cb9bd1c

Change-Id: I4627c998da042bfab14769455c874aae2e19b91c
2019-04-17 14:02:56 -07:00
Peiyong Lin
7d1d0c4f63 [GUP] Hard code the name of the whitelist file.
am: be09eef818

Change-Id: Ib63d6d818600961a5cba4ed2c2d33d654bd1c849
2019-04-17 13:55:43 -07:00
Peiyong Lin
4ce7aa1729 Add global property to store opt-in application package name.
am: e23f59aa5a

Change-Id: I2dcd31f5110a5f65cb52a501b2dcfc5b3de75c83
2019-04-17 13:47:55 -07:00
Peiyong Lin
7808ff2cd8 [GraphicsEnvironment] Add whitelist support.
am: 443894f8bb

Change-Id: I9353ed28aa66dbc845012bc99fd789a970e6ea09
2019-04-17 13:38: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
Abhijeet Kaur
22fd8708f3 Merge "Notify the caller about I/O error"
am: 2f206c6270

Change-Id: I59b43aa3c092ee577833da5dc110953d4b21154d
2019-04-16 05:10:31 -07: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
Abhijeet Kaur
83882781ac Merge "Pass valid file descriptor to binder"
am: 0013d45b27

Change-Id: I034b8a273e123523bb038bf9d8a88ad4c652b328
2019-04-12 01:41:49 -07: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
1e41180dae Remove unused methods from INetworkManagementService
Remove unused public methods setPermission() and clearPermission()

Bug: 114231106
Test: make
Change-Id: I2dc14c9791f73175e8dacf3cd00a84f61b00edc2
2019-04-10 17:06:45 +01:00
Nick Kralevich
07fc302bfb Merge "Don't set sehash when calling restoreconRecursive"
am: 5721cf94de

Change-Id: I56e37cf914d9b48149fb354722700b0661564ecb
2019-04-05 08:36:51 -07: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
Luke Huang
1711278ce2 Merge "Use IDnsResolver instead of INetd for resolver related binder commands"
am: b9ef4dd299

Change-Id: Icca07604bc8f922c51493e72fde8c7377105bf8b
2019-03-29 01:57:44 -07:00
Luke Huang
6591477a5b Use IDnsResolver instead of INetd for resolver related binder commands
migrate resolver related commands from INetd to IDnsResolver

Bug: 126141549
Test: atest FrameworksNetTests ConnectivityServiceTest Nat464XlatTest
      atest DnsManagerTest
Change-Id: I559c0c1304d53dde408c062e1a52e742595e7cbe
2019-03-27 17:39:07 +08:00
Paul Hu
69aa833953 Merge "Fix Automated API Review issues."
am: 814bb8f627

Change-Id: I9cbe7dc166ec066b8785553f31dc32ea0572be8e
2019-03-21 07:24:16 -07:00
Paul Hu
814bb8f627 Merge "Fix Automated API Review issues." 2019-03-21 14:11:36 +00:00
paulhu
79b380cfe7 Fix Automated API Review issues.
These API's argument/return value must be marked either @NonNull
or @Nullable.

Bug: 126701148
Bug: 126699090
Bug: 126701058
Bug: 126700772
Bug: 126699941
Bug: 126701299
Bug: 126700007
Bug: 126700900
Test: atest FrameworksNetTests
Change-Id: Id030a9f1116178b96aa3d4614b10969a537b2fc4
2019-03-21 15:16:58 +08:00
Luke Huang
e374524144 Merge "Cleanup NetworkManagementService for Netd commnads binder migrartion"
am: 3af01e2f46

Change-Id: I86ca4cab29099b26f797ef6fce94dbb6f5183b90
2019-03-20 23:18:25 -07:00
Luke Huang
909b31aaf1 Cleanup NetworkManagementService for Netd commnads binder migrartion
remove dead code used for netd UNIX sokcet

Bug: 65862741
Test: atest NetworkManagementServiceTest FrameworksNetTests
Change-Id: I5db61cb86325b71ac8a8fce7b15dbf569abc5935
2019-03-20 20:02:24 +08:00
Andrei-Valentin Onea
4bd5774611 Merge "Add @UnsupportedAppUsage annotations"
am: 09426de69d

Change-Id: I8be4fa32c92a5b5ac335bfbfa0a6edffcb881b22
2019-03-18 07:49:55 -07:00
Andrei Onea
dcb67738f6 Add @UnsupportedAppUsage annotations
For packages:
  android.os

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I4ece0a3f37f88fc2508cb965092aed7cabc61819
Change-Id: I0d942254f06c1a355fb906640e223ad34cced6ab
2019-03-18 12:04:18 +00:00
Josh Gao
bc7222d46d Merge "ParcelFileDescriptor: improve javadoc."
am: c4e2b24d87

Change-Id: Ic01db5d3f9c7527f2458aa4cf10bd2c43d685bed
2019-03-15 19:52:34 -07:00
Treehugger Robot
c4e2b24d87 Merge "ParcelFileDescriptor: improve javadoc." 2019-03-16 02:36:30 +00:00
Nandana Dutt
20324711c0 Merge changes I39e84219,I8d0e12cb
am: cae221acac

Change-Id: I5fe14b5b25a1b22e184aa02e658c81d9d0238541
2019-03-15 03:39:51 -07:00
Treehugger Robot
cae221acac Merge changes I39e84219,I8d0e12cb
* changes:
  Bugreporting API: Take ownership of fds.
  Don't manage dumpstate lifecycle from system server
2019-03-15 10:28:06 +00:00
Nandana Dutt
9d6ff2968e Bugreporting API: Take ownership of fds.
BUG: 126434607
FIXES: 127649051
Test: manual
Change-Id: I39e8421925c53061b6bc2954dffe3bccb7b3314d
2019-03-14 16:16:33 +00:00
Nandana Dutt
be80e309ea Don't manage dumpstate lifecycle from system server
Dumpstate now exits correctly when it's finished. So we don't have to
manage its lifecycle from system server.

BUG: 123571915
Test: manually verified dumpstate service dies
Change-Id: I8d0e12cb607cda74b5cc36e26306ea106da67ba3
2019-03-13 15:19:55 +00:00