Commit Graph

8826 Commits

Author SHA1 Message Date
Mathew Inwood
60b6925bdb Merge "Package whitelist for hiddenapi checks." am: 9a50d75795
am: 3d2a3e25d3

Change-Id: I8e0120c77965a3d5784e61c7eabe5a8c4f88b1ea
2018-02-22 14:29:23 +00:00
Mathew Inwood
3d2a3e25d3 Merge "Package whitelist for hiddenapi checks."
am: 9a50d75795

Change-Id: Iad8ccab4d46677320c9d39f73e6bbc67262c18b2
2018-02-22 14:11:57 +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
Robert Sesek
0dd7cf0bb3 Merge "Reparent the webview_zygote to be a child of the main app_process zygote." am: 1c81aa6375
am: 486190f87b

Change-Id: I683dbbf730bfd02e43cb67bfcaa0df56d69c9796
2018-02-21 02:33:14 +00:00
Robert Sesek
486190f87b Merge "Reparent the webview_zygote to be a child of the main app_process zygote."
am: 1c81aa6375

Change-Id: I2af77c52ea7aca058ab1a1fc224968760e6c3ac5
2018-02-21 02:16:22 +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
Robert Sesek
4523bf284a Merge "Add Zygote.startChildZygote() to fork a new process that itself is a zygote." am: 554cfd1f1d
am: 5b9410c74b

Change-Id: I5e9d5c960b9f78cfa7ca7ab88e9d2075f97daca8
2018-02-17 03:51:28 +00:00
Robert Sesek
5b9410c74b Merge "Add Zygote.startChildZygote() to fork a new process that itself is a zygote."
am: 554cfd1f1d

Change-Id: I723f75be6488390932a60b411ac04660c16d93d1
2018-02-17 03:41:55 +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
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
Calin Juravle
e31b7c4d24 Merge "Pass the compilation reason to dexopt" am: b0817b238a
am: 68024999b7

Change-Id: I6a4e3dd19cf612bd698bff0f60de2ef3fac35604
2018-02-16 05:45:10 +00:00
Calin Juravle
5a0b4c4c62 Merge changes from topic "cp_calin_framework_2017" am: b98102b4dc
am: b3da44d9a1

Change-Id: Ibd848f6803d63da46ae1461b469422c5a6431980
2018-02-15 21:30:27 +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
Calin Juravle
29c772cb48 [framework] Pass .dm files to dexopt at install time
(cherry picked from commit cc65194e8e)

Test: DexoptOptionsTest
      adb install foo.apk foo.dm
Bug: 30934496

Merged-In: If7e705a0efc0954a385ec3bfe7a93921c0d83351
Change-Id: If7e705a0efc0954a385ec3bfe7a93921c0d83351
2018-02-14 08:19:42 -08:00
Calin Juravle
ea6c0ffb4a [framework] Extend profile operations to take the profile name
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name based on their
split name.

All the profile operations will now work on a specific profile name rather
than assuming a default global name.

Also, move dumpProfiles and clearProfiles functionality to the
ArtManagerService so that we can re-use profileName computations easier.

(cherry picked from commit 6ae39fc2e5)

Test: manual (dexopt apps, merge profiles, clear profiles)
      gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496

Merged-In: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
Change-Id: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
2018-02-14 08:19:42 -08:00
Calin Juravle
011603ab76 Support installation of DexMetadata files (.dm)
Add support in the package installer to install dex metadata files
alongside the application apks (base or splits).

During installation or update the dex metadata files will need to have a
matching apk file. The matching is done by checking the file extension
(e.g. base.apk -> base.dm, split_a.apk -> split.dm).

On disk, the metadata files are placed next to the apks.

The .dm files will be used during install-time optimizations and passed
verbatim to dex2oat.

Test: adb shell am instrument -w \
1) adb shell am instrument -w \
  -e class android.content.pm.DexMetadataHelperTest

com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

2) adb install-multiple CtsClassloaderSplitApp.apk
CtsClassloaderSplitApp.dm CtsClassloaderSplitAppFeatureA.apk
CtsClassloaderSplitAppFeatureA.dm CtsClassloaderSplitAppFeatureB.apk

3) gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases

(cherry picked from commit 3fc56c3000)

Bug: 30934496
Merged-In: I86f0a8307705ff3d6a5a85c2fcaae085dd62d4af
Change-Id: I86f0a8307705ff3d6a5a85c2fcaae085dd62d4af
2018-02-14 08:00:56 -08:00
Nicolas Geoffray
2c426bc3f4 Merge "Refactor runtime hidden API flag from negative to positive" am: 46b4862d20
am: d0f327cc60

Change-Id: Iaa313ddff5b22ed22baa916d931befc7a59090ba
2018-02-14 14:07:55 +00:00
David Brazdil
b3a4aab310 Refactor runtime hidden API flag from negative to positive
There are only two situations in which we want to enable hidden API
access flag checks. Turning the flag from DISABLE_ to ENABLE_
simplifies logic in ART and reduces the number places where the flag
had to be passed down to ART.

Bug: 64382372
Test: boot device, install and run apps, check log messages

(cherry picked from commit f7e31c0a2b)

Change-Id: Ib2f70696d98c6e1500d1d419d6acf0a8d0487213
2018-02-14 10:13:06 +00:00
hansson
927afd1edf Merge "fix misleading FATAL EXCEPTION IN SYSTEM PROCESS log" am: c0c9f53175
am: 78d15fd15a

Change-Id: Ie90bccf5aa5fb67e1b4769fcbb1013b1fae71063
2018-02-13 16:39:33 +00:00
yuanhuihui
e669ac2520 fix misleading FATAL EXCEPTION IN SYSTEM PROCESS log
There will be the following situations about mApplicationObject:

1) fork app process will invoke ActivityThread.main(),
then set mApplicationObject.

2) fork system_server, don't set mApplicationObject value.

3) using app_process fork process except zygote, will inovke RuntimeInit,
don't set mApplicationObject value。

For example using command as below:
app_process /system/bin com.android.commands.am.Am "$@",

if this process throw uncaught exception,will output FATAL EXCEPTION IN SYSTEM PROCESS log,
it's not in system process but in normal process。

so should add condition: Process.SYSTEM_UID == Process.myUid()

BUG: 72759350
Test: manual

Change-Id: Ie8d769e4149cd9b938577058de871c4f8db9efe5
Signed-off-by: yuanhuihui <yuanhuihui@xiaomi.com>
2018-02-13 12:52:38 +00:00
Rubin Xu
0cc5170801 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926 am: 469065ccb7 am: bf1ecab901 am: 7ac2108ed3
am: a7483c90c1

Change-Id: I04733e3924d0530300106f5897771adf8a4db391
2018-02-07 22:31:21 +00:00
Rubin Xu
a7483c90c1 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926 am: 469065ccb7 am: bf1ecab901
am: 7ac2108ed3

Change-Id: Ibae4cb0462cfcbc2296e71849387d0c0035d3cce
2018-02-07 22:14:48 +00:00
Rubin Xu
7ac2108ed3 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926 am: 469065ccb7
am: bf1ecab901

Change-Id: Ibf8e444ab8e66a068174c30985e3056443db99fe
2018-02-07 21:59:55 +00:00
Android Build Merger (Role)
bf1ecab901 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926 am: 469065ccb7
Change-Id: I9af74b6a8fd17dbc9c8c1edebc0db81a07d2e8dc
2018-02-07 08:19:03 +00:00
Android Build Merger (Role)
469065ccb7 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97 am: f097744926
Change-Id: Ic3e36a94f5c7b3cf33b8c7972fc1bd254be9a31c
2018-02-07 08:18:57 +00:00
Android Build Merger (Role)
f097744926 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483 am: 4af59f1c97
Change-Id: Ic3b71eb297425e9ff6d40c542aa67027317dffea
2018-02-07 08:18:50 +00:00
Android Build Merger (Role)
4af59f1c97 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483
Change-Id: Ie3d39f4c402d3385f45aca01059f03ef4025855f
2018-02-07 08:18:44 +00:00
Android Build Merger (Role)
ab36ba8483 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2
Change-Id: I76a950ed4296cad67230c36ee9edc0b7cc905c60
2018-02-07 08:18:37 +00:00
Android Build Merger (Role)
b3012285e2 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2
Change-Id: I7c984a83858ee5bb0b84d122dac27e0273f0a177
2018-02-07 08:18:22 +00:00
Android Build Merger (Role)
4405b0ced2 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f
Change-Id: Ib6d585953a35d3d00ab51144af7639c851ac3d72
2018-02-07 08:18:15 +00:00
Android Build Merger (Role)
83cb35453f [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d
Change-Id: I060b6306f3f53b4497b6a19d7221aa1938e66f55
2018-02-07 08:18:09 +00:00
Android Build Merger (Role)
0231bc4d6d [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888
Change-Id: Ib1b60818cddeefe3031cf6c9880f5b790775aa62
2018-02-07 08:18:02 +00:00
Rubin Xu
54813e9888 Fix VerifyCredentialResponse parcelling code
There was an asymmetry between parcelling and unparcelling of
VerifyCredentialResponse that could lead to type confusion if
packed with other objects in a Parcel.

Test: none
Bug: 71714464
Change-Id: Icff68879e249422ccca49f2bb7db85c35b4cb353
2018-02-07 08:17:06 +00:00
Siyuan Zhou
11942417b2 Merge "BootReceiver: changed deprecated Build.RADIO to Build.getRadioVerison to get non-empty radio firmware version in SYSTEM_LAST_KMSG." am: 1a535ba4b9
am: 1801988051

Change-Id: I6c9e33ae9fbec647ade9f4258aedfdf73f2883a2
2018-02-07 04:03:26 +00:00
Treehugger Robot
1a535ba4b9 Merge "BootReceiver: changed deprecated Build.RADIO to Build.getRadioVerison to get non-empty radio firmware version in SYSTEM_LAST_KMSG." 2018-02-07 01:24:36 +00:00
Hugo Benichi
9a70530107 Merge "Update OWNER files for connectivity" am: 771e229a23
am: ce0c31d392

Change-Id: I5a995856aa347874b534312212ca73ffff0193c0
2018-02-05 00:39:54 +00:00
Hugo Benichi
771e229a23 Merge "Update OWNER files for connectivity" 2018-02-04 23:18:52 +00:00
Hugo Benichi
1c8756154a Update OWNER files for connectivity
Test: no functional change
Change-Id: I25276c769468c37970cb1915660fee29e589008c
2018-02-02 12:49:45 +09:00
David Srbecky
2eaaf25218 Merge "Propagate the "dalvik.vm.minidebuginfo" property to ART run-time." am: ddd440b8a2
am: 8df431a8ef

Change-Id: Ib2c08bb7bcf5d85c15db9ec16eca1ae9c7930eb6
2018-02-01 19:25:40 +00:00
Siyuan Zhou
4b1e6c3b2f BootReceiver: changed deprecated Build.RADIO to Build.getRadioVerison to get non-empty radio firmware version in SYSTEM_LAST_KMSG.
Test: Manually verified on Pixel 2 XL, Nexus 5X and 6P devices.
BUG:70934228
Change-Id: I40da7e659619e06587409c6b83c655b46bcbd5b2
2018-01-31 16:17:12 -08:00
Vladislav Kaznacheev
b6ec1be492 [DO NOT MERGE] Fix context menu position for RTL
Based on https://android-review.googlesource.com/574843.
Added APCT coverage to verify the fix and prevent regressions.

Bug: 70920189
Test: android.view.menu.ContextMenuTest
Change-Id: Id9ee500751fe6f3da07bf10fb510ac49487104d0
2018-01-31 16:14:49 -08:00
David Srbecky
156ed92c94 Propagate the "dalvik.vm.minidebuginfo" property to ART run-time.
Change-Id: I27e230fe91490defde4cc38ca8cbc3aa0765fed1
2018-01-30 14:37:37 +00:00
David Brazdil
5fab14313b Merge "Set Zygote.DISABLE_HIDDEN_API_CHECKS for system apps" am: 50cfaa40ca
am: 97a970e56b

Change-Id: I73eaa052597d225aa673dd479977b0ce7a7d6d64
2018-01-25 01:12:33 +00:00
David Brazdil
2a21a9c997 Merge "Set DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps" am: 2a8c24be18
am: 6dea42ae0f

Change-Id: I6376e610c575cd7c3f7bf8a72ca4c1a92d9023cc
2018-01-24 21:43:47 +00:00
David Brazdil
071bcaa906 Set Zygote.DISABLE_HIDDEN_API_CHECKS for system apps
When forking a process for a system app, pass a flag to ART that
will disable enforcement of hidden API access checks.

Test: manual
Bug: 64382372
Change-Id: I5ba81d84a44c9467613f060428b11e1d9d725bd3
2018-01-24 21:42:28 +00:00
David Brazdil
7c48e0e074 Set DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps
For now, system apps will be exempt from hidden API access checks.
Pass the appropriate flag to dexopt.

Test: manual
Bug: 64382372
Bug: 72305689
Merged-In: I5676ffa3a5ba680bf5f6bab0b62f0acf4a933097
Change-Id: Idc3067d2c6040f15fe0f051090ba45efe591ebae
2018-01-24 14:12:33 +00:00
Chenbo Feng
cf4b551fb7 Merge changes from topic "bpfStats" am: 6e03224697
am: e041f38289

Change-Id: Ib4790159fd331858ce9f3343a44ccec66fae638c
2018-01-24 05:39:54 +00:00
Chenbo Feng
93afbf258f Use /proc/net/dev to get stats summary
If the qtaguid proc file is no longer exist, the device is running new
eBPF module to do traffic accounting. So the NetworkStatsFactory need to
use the proc/net/dev interface to get the per interface traffic stats
summary. Also, adding a test to verify the helper function work properly

Bug: 30950746
Test: run NetworkStatsFactoryTest
Change-Id: Ia36808bf02f1637dd41a3e7c50917b91b1a77524
2018-01-23 00:35:02 -08:00
Chenbo Feng
828f1b45fb Add bpf support for NetworkStatsFactory
Add the native method used to read the detail information of network
stats from bpf maps. The native method of NetworkStatsFactory should
choose the correct implementation to get the stats detail depending on
the kernel version. Currently the bpf result is printed as a reference
and the actual behavior of NetworkStatsFactory should not change.

Test: NetworkStatsFactory related cts test should not fail.
Bug: 30950746
Change-Id: I4715a23559b5b2306bd556cea0431f0ed172a993
2018-01-23 00:34:53 -08:00