Commit Graph

10040 Commits

Author SHA1 Message Date
Eric Holk
d28e721546 Revert "LayoutInflater: Special case well-known View constructors"
This reverts commit cb694714f1.

Reason for revert: test failures (http://b/133342433)

Change-Id: I4967e21769a0e45038e9f0941909faec731b3124
2019-05-23 18:18:04 +00:00
Eric Holk
cb694714f1 LayoutInflater: Special case well-known View constructors
This avoids loading constructors with reflection for well-known View classes.

An average of 1300 app startups with and without this change shows the special
casing improves app startup time by about 2.5ms.

The classes listed here are taken from examining several app traces as well as
the similar list in AppCompatViewInflater.

Bug: 131421854
Change-Id: I676a50eec50b86fa0b385add4bc092a657d8e8bb
2019-05-22 08:41:21 -07:00
Xin Li
c76d117d2a DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
Bug: 132622481
Change-Id: I7ba1a9999b3a9bac8031dd086fa2632e45404f32
2019-05-15 11:31:45 -07:00
Chalard Jean
026b89e4f2 Merge "Move TrafficStats tags for the network stack constants"
am: 3444dd03d6

Change-Id: I13ba9e3077bb4ec28229a09f2d4747a43c281bcc
2019-04-16 23:08:07 -07:00
Chalard Jean
896245a1e2 Move TrafficStats tags for the network stack constants
As per API council feedback, these constants should live in
a place that is private to the network stack, only with a
range defined in system API.

Bug: 129433383
Test: m
Change-Id: I84a90f84a9af6fef4667ee4d512ebd0413222086
Merged-In: I4882686a86e7c6d42f4b0619b921d02619ed6d4c
Merged-In: I9b648ed6c687d56db61a54570c7880c51c1bae51
2019-04-17 05:45:40 +00:00
Jeff Vander Stoep
255db3ee0c Merge "Disable XOM on libraries for apps with targetSdkVerison<Q"
am: e7b20fbae9

Change-Id: If511abfc4b7e1ca5ea4eb730e0dae1e2b936a66f
2019-04-10 19:24:09 -07:00
Jeff Vander Stoep
72625f5fd4 Disable XOM on libraries for apps with targetSdkVerison<Q
Apps may (and do) assume that libraries are readable. To avoid app
breakage, mark execute-only sections of as read+execute
for apps with targetSdkVersion<Q.

Bug: 128907672
Test: Check libc for app with targetSdk==current
cat /proc/25950/maps | grep libc.so
77c01e3000-77c028b000 --xp 00041000 07:20 106 /apex/com.android.runtime/lib64/bionic/libc.so
Test: Check libc for app with targetSdk<current
cat /proc/26355/maps | grep libc.so
77c01e3000-77c028b000 r-xp 00041000 07:20 106
/apex/com.android.runtime/lib64/bionic/libc.so

Change-Id: I90b5c91923c8008ae4b4818985842fe3e354a850
Merged-In: I90b5c91923c8008ae4b4818985842fe3e354a850
(cherry picked from commit 739c0b5193)
2019-04-10 15:04:14 -07:00
Chenbo Feng
ee6ed6914f Merge "Move NetworkStatsFactory into service directory"
am: 48294e098f

Change-Id: If92f556cbf3badcb057a3b6e43bb3ef74d0c9ac0
2019-04-05 13:26:28 -07:00
Chenbo Feng
f2f1f27098 Move NetworkStatsFactory into service directory
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.

Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.

Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
      android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Merged-In: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
2019-04-03 11:33:40 -07:00
Steven Moreland
4e709ea3fd Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders."""
am: 4b5ca28dfe

Change-Id: I63fa6d4a8671db24bf9fce898414c27068547ed2
2019-04-01 19:38:43 -07:00
Steven Moreland
4b5ca28dfe Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""" 2019-04-02 02:19:44 +00:00
Steven Moreland
bdc2702cdf Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""
This reverts commit d3c2bc5a4e.

Reason for revert: reland fix
Bug: 128529256

Change-Id: I0647d4242406e31348a68ebba328e5f8ad750144
2019-03-29 21:52:32 +00:00
Varun Anand
09ef7691f5 Merge changes from topic "vpn_data_accounting"
am: 6c93e5378a

Change-Id: Iaa4b2dd9be2fc6e9833c6c846b6858aab507ca8b
2019-03-28 18:06:12 -07:00
Varun Anand
6c93e5378a Merge changes from topic "vpn_data_accounting"
* changes:
  Move BatteryStats and StatsCompanionService to use NetworkStatsService.
  NetworkStatsService: Fix getDetailedUidStats to take VPNs into account.
  Take all VPN underlying networks into account when migrating traffic for VPN uid.
2019-03-29 00:40:53 +00:00
Varun Anand
346aa87544 Move BatteryStats and StatsCompanionService to use NetworkStatsService.
This CL is a manual merge of http://ag/c/6015966/3.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: manual test: verified that BatteryStats are correctly accounting
for VPN traffic.
Change-Id: I5b07ce70ac58bdcbebc3114bfe9fd411469d57af
Merged-In: I230c1edbf64cfeb3dbb560db368b5e420f7b79a4
2019-03-28 10:31:51 -07:00
Varun Anand
29d2ef2fe1 NetworkStatsService: Fix getDetailedUidStats to take VPNs into account.
This API is similar to one provided by NetworkStatsFactory with the
difference that NSS also migrates traffic from VPN UID to other apps.

Since traffic can only be migrated over NetworkStats delta, NSS
therefore maintains NetworkStats snapshot across all UIDs/ifaces/tags.

This snapshot gets updated whenever NSS records a new snapshot
(based on various hooks such as VPN updating its underlying networks,
network getting lost, etc.), or getDetailedUidStats API is invoked by
one of its callers.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: manually verified that battery stats are migrating traffic off of
TUN (after patching above CL where we point BatteryStats to use this
API).
Change-Id: Ib0f0c2d4d41ee1d7a027ea9da457baaf198d649e
2019-03-28 10:31:51 -07:00
Varun Anand
95aa6d446f Take all VPN underlying networks into account when migrating traffic for
VPN uid.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: Manually verified on device that stats from VPN UID are moved
      appropriately based on its declared underlying network set.
Test: vogar --mode app_process --benchmark NetworkStatsBenchmark.java

Change-Id: I9d8d0cc58d18002c1c96f8ddff780ef8dc452d21
2019-03-28 10:31:49 -07:00
Nicolas Geoffray
7561d4667c Merge "Revert "Preload non-bootclasspath Java lib ClassLoaders.""
am: d08c3b655b

Change-Id: Id04898d99862cc1fff248fc9ba466faf55e30eb7
2019-03-28 02:39:21 -07:00
Nicolas Geoffray
d08c3b655b Merge "Revert "Preload non-bootclasspath Java lib ClassLoaders."" 2019-03-28 09:27:05 +00:00
Nicolas Geoffray
d3c2bc5a4e Revert "Preload non-bootclasspath Java lib ClassLoaders."
This reverts commit 1b11aaaf9b.

Bug: 128529256
Bug: 127406460

Reason for revert: Breaks FSI

Change-Id: Ie9775779cda7b376c36493f3ce3246eafc672c59
2019-03-28 09:25:11 +00:00
Steven Moreland
625d63ed64 Merge "Preload non-bootclasspath Java lib ClassLoaders."
am: 213812ba28

Change-Id: Ie16e82383bab53b5f92258289bf50ba9d7a897cd
2019-03-27 16:18:22 -07:00
Steven Moreland
213812ba28 Merge "Preload non-bootclasspath Java lib ClassLoaders." 2019-03-27 22:59:49 +00:00
Andrei-Valentin Onea
6acb2106f7 Merge changes from topic "unsupported-internal"
am: 2f573ac6f8

Change-Id: I0fedf5c754a59a9c57b3abd00adff00d58b4930c
2019-03-27 06:56:12 -07:00
Andrei Onea
eecddd581e Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal.app
  com.android.internal.database
  com.android.internal.http
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.util
  com.android.internal.view
  com.android.internal.view.menu
  com.android.internal.widget
  com.android.server.net
  com.android.server
  com.google.android.collect
  com.google.android.util

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: Ia5306f4713298b46ae3aba6fc9d87fae41f8a593
Change-Id: Ie26033d486033289ad3e010a534a921d29c3b2ca
2019-03-27 11:22:20 +00:00
Steven Moreland
1b11aaaf9b Preload non-bootclasspath Java lib ClassLoaders.
This is specifically for HIDL but is applicable to other libs.

Classes on the bootclasspath are implicitly used by apps. For this
reason, many classes should not go there. However, there are some
libraries which are used by many apps/processes which are still
nice to preload the ClassLoaders of.

Now, cacheNonBootclasspathSystemLibs in ApplciationLoaders keeps
a map of jar -> ClassLoader in zygote to be retrieved by child
processes.

Bug: 128529256
Bug: 127406460
Test: boot Pixel 2, verify libs are preloaded and used, try apps that
    use these libraries.
Test: grep for ClassLoaderContext errors, for instance:
 - ClassLoaderContext shared library size mismatch
 - ClassLoaderContext classpath element mismatch
Test: showmap on various processes which use the preloaded libs.

Change-Id: I351bf1679e9a928c10dca860b6cd6cb414c3bb8e
2019-03-27 01:40:05 -07:00
Andreas Gampe
782ae5139d Merge "Zygote: Load system server code early"
am: f039816600

Change-Id: I0a2895b64d3a505c3de8e6dfe24a861cc1e38fec
2019-03-19 14:49:48 -07:00
Andreas Gampe
6b6f96de15 Zygote: Load system server code early
In an effort to allow loading integrity-checked artifacts from
the dalvik-cache, attempt to create and cache the system server's
classloader early, while still being in the system_server_startup
selinux domain.

The advantage of this approach is that allowances for loading
from the cache are restricted to startup.

Bug: 128688902
Test: m
Test: Device boots, picks up /system artifacts
Test: Device boots, picks up integrity-checked /data artifacts
Merged-In: If4a75fa106db09f1bd666d6d8df7ac3ac3e35a8c
Change-Id: If4a75fa106db09f1bd666d6d8df7ac3ac3e35a8c
2019-03-19 10:41:32 -07:00
Nikita Ioffe
e54c0344de Merge "Add a whitelist to control packages that can use Bugreporting API"
am: 17492d0691

Change-Id: If224c6522c89c53cb1d5e72a55d5aa051a4e0d02
2019-03-14 03:23:08 -07:00
Nikita Ioffe
ee4d7be219 Add a whitelist to control packages that can use Bugreporting API
Test: checked SecurityException is thrown for my custom app
Test: whiltelisted my custom app, checked no SecurityException is thrown
Bug: 126541701
Change-Id: Id0b61ccc1adf40bcb455d3b59b640f4b160bdd84
Merged-In: Id0b61ccc1adf40bcb455d3b59b640f4b160bdd84
(cherry picked from commit 07964b49ac)
2019-03-13 17:01:56 +00:00
Ganesh Mahendran
2a82e9a69c Merge "continue read file when returned count > 0"
am: 894c578a02

Change-Id: I43f5be6a4b365e2e7ea11ae413860d9cb0c37949
2019-03-13 00:59:30 -07:00
Treehugger Robot
894c578a02 Merge "continue read file when returned count > 0" 2019-03-13 07:36:51 +00:00
Kiyoung Kim
d5f216ac8b Merge "Schematize Crypto state system property"
am: 88b57a2c4d

Change-Id: Idb96ab95b1ea69a636f315edeb84c8ba025d75bd
2019-03-12 21:33:34 -07:00
Treehugger Robot
88b57a2c4d Merge "Schematize Crypto state system property" 2019-03-13 01:30:58 +00:00
Kiyoung Kim
ad0ca523a6 Merge "Add product apk support from libnativeloader"
am: 307df45b5f

Change-Id: I1f9c9e63c1cf7477436b8bc38e5e62e075183c64
2019-03-12 02:05:13 -07:00
Kiyoung Kim
5cba0cff2c Add product apk support from libnativeloader
Currently libnativeloader appends vendor lib path if apk is from vendor
partition. Similar to this we should add product lib path if apk if from product partition.

Bug: 124705551
Test: m -j && tested from crosshatch with product apps (such as Wallpaper)
Change-Id: Ic85b16e8e4484a35c659c16e067f1e7c7285d05e
Merged-In: Iaa8d0ea61b1b9ab8a1da676a492f75c6a5d71d5d
2019-03-11 11:42:28 +09:00
Bernie Innocenti
b0498ba448 Merge "Add junyulai@ as owner of the core networking dirs"
am: e5e3ac639b

Change-Id: I06cca33e638baf671b891eb0c20b4c8f439eda2e
2019-03-08 07:50:29 -08:00
Bernie Innocenti
e5e3ac639b Merge "Add junyulai@ as owner of the core networking dirs" 2019-03-08 15:21:01 +00:00
Chalard Jean
ba4a9abe35 Merge "Support VPN Proxy(1/2)"
am: 65087f4705

Change-Id: I51a716d1ee6b85bef347164061d1c12183612f50
2019-03-08 06:42:23 -08:00
Bernie Innocenti
ea89cf2c6e Add junyulai@ as owner of the core networking dirs
Also removed emeritus accounts ek@ and silberst@ from various places.
A cleanup using 'include' would probably be in order...

Test: N/A
Change-Id: I575e60dd5e600e42d9571ce8e8d7661d30e99bfe
2019-03-08 13:04:05 +00:00
Chalard Jean
65087f4705 Merge "Support VPN Proxy(1/2)" 2019-03-08 00:34:25 +00:00
Andrei-Valentin Onea
20ebeb61a9 Merge "Add @UnsupportedAppUsage annotations"
am: 842e3aa420

Change-Id: Ie3bc96e663223de383be59cb764f139f459c5a67
2019-03-06 09:46:00 -08:00
Andrei Onea
cf1a82953b Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal.app
  com.android.internal.appwidget
  com.android.internal.location
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony
  com.android.internal.widget

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: I6eba34467b2492047e5264684312adfa029eb317
Change-Id: I413c4b6dd12bcf40b69423718ed278cbefe82087
2019-02-28 17:01:29 +00:00
Kiyoung Kim
0b434967fb Schematize Crypto state system property
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: m -j
Change-Id: I968b342fdd0b8c30405611e53aca2479784636d7
Merged-In: Id36208fac5d4de062a51d541b64145560242f8fc
2019-02-26 14:26:26 +09:00
Takayuki, Ogura
5ad260d087 Support VPN Proxy(1/2)
Use VPN Proxy if it is set in VPN Settings

Bug: 118793208
Test: runTest
Change-Id: Ib58685fe3afc6e0279f6abe762e9adabd6ea6ccc
2019-02-26 10:53:33 +09:00
Xin Li
f90d07b1b3 Merge "DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master" into stage-aosp-master 2019-02-23 00:39:16 +00:00
Sudheer Shanka
daddc5bb50 Merge "Fix potential crash when per-procstate cpu times tracking is turned on." 2019-02-22 01:24:03 +00:00
Sooraj Sasindran
9f0115bb6e Merge "Allow UiAutomation to adopt the shell permission indentity" 2019-02-22 00:41:29 +00:00
Xin Li
b455c3a7f3 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I2f9a524f2ba552de3f62e343075cf0abf400bbae
2019-02-21 16:02:06 -08:00
Svet Ganov
c2841ec7fe Allow UiAutomation to adopt the shell permission indentity
For testing we often need to run shell commands. This can be done
today via running a shell command from an instrumentation test
started from the shell. However, this requires adding shell commands
which are not in the API contract, involve boilerplate code, require
string parsing, etc.

This change allows an instrumentation started from the shell to
adopt the shell UID permission state. As a result one can call APIs
protected by permissions normal apps cannot get by are granted to
the shell. This enables adding dedicated test APIs protected by
signatures permissions  granted to the shell.

Test: cts-tradefed run cts-dev -m CtsUiAutomationTestCases
          -t android.app.uiautomation.cts.UiAutomationTest#testAdoptShellPermissions

bug:80415658

Merged-In: I4bfd4b475225125512abf80ea98cd8fcacb6a1be
Change-Id: I4bfd4b475225125512abf80ea98cd8fcacb6a1be
2019-02-21 19:59:14 +00:00
Kiyoung Kim
03c14760a5 Merge "Schematize Crypto system properties" 2019-02-21 00:16:45 +00:00