Commit Graph

9310 Commits

Author SHA1 Message Date
Narayan Kamath
81945916f1 Merge "Remove uses of libcore.util.Objects.hashCode / equals." 2018-02-21 09:34:42 +00:00
Robert Sesek
f9bd606fba Merge "Reparent the webview_zygote to be a child of the main app_process zygote." am: 1c81aa6375 am: 486190f87b
am: 0dd7cf0bb3

Change-Id: I9468ec63053f35814ec45b18572966d8adc93f3e
2018-02-21 02:47:07 +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
TreeHugger Robot
71fe7174bd Merge "Work on issue #63937884: Heavyweight Apps/Game Mode" 2018-02-20 20:02:39 +00:00
TreeHugger Robot
29f1cdd5d3 Merge "Fixed Security Exception issue when inflating notification" 2018-02-20 19:30:42 +00:00
TreeHugger Robot
4ab3a17295 Merge "fix picture-in-picture logging" 2018-02-20 19:05:17 +00:00
TreeHugger Robot
761b33299a Merge "Log deferred jobs metrics to batterystats" 2018-02-20 18:52:24 +00:00
TreeHugger Robot
414189fefe Merge "APIs to watch active op changes" 2018-02-20 18:46:57 +00:00
Selim Cinek
e268fda3c5 Fixed Security Exception issue when inflating notification
This is a temporary fix until we can resolve why the permissing
isn't granted properly.

Bug: 73640774
Test: receive mms, reply from hun
Change-Id: I77d909762d90c84b95f32c4c20c495ba46b5a176
2018-02-20 09:54:20 -08:00
Jeff Sharkey
27e4b74a3d Define sane default target SDK for system_server.
Normal app launches always define a target SDK, but system_server
doesn't pass in an "--target-sdk-version" option, meaning we left
the default value target SDK of "0" in place, which isn't a valid
SDK level, meaning we treat it as targeting Android 1.0.

The majority of target SDK checks are using the higher-level value
provided from Context, meaning they've always been enforced; this
change means that we're now applying lower-level target SDK checks
that go through VMRuntime.

Test: builds, boots, typical operations still work
Bug: 72331067
Change-Id: I6940bb8c3a1cd2234bcacadbf60c902625876a76
2018-02-19 15:42:41 -07:00
Narayan Kamath
607223f3b7 Remove uses of libcore.util.Objects.hashCode / equals.
Use public API in java.util.Objects instead.

Test: make
Change-Id: I413280f254743a2efa2640a2194693aeb5980605
2018-02-19 14:12:01 +00:00
Amith Yamasani
977e11f335 Log deferred jobs metrics to batterystats
Log the deferred jobs event count, number of deferred jobs,
time since last job execution and break those down into
different time-since buckets in case the average becomes
too noisy.

Bug: 70297451
Test: dumpsys batterystats --checkin

Change-Id: Iafad6137989246f203a623ce1511140d4eac35b0
2018-02-18 22:43:13 -08:00
Bernardo Rufino
b331d1f1ef Merge "Add local transport parameters for transport flags GTS test" 2018-02-18 18:00:22 +00:00
Chenjie Yu
ae9fdf0403 fix picture-in-picture logging
+ log uid and activity name

Test: manual test. Will add cts test
Change-Id: I3d3e77b24779e439eacc06007fae62c037a19fd6
2018-02-18 00:08:01 -08:00
Robert Sesek
c0276a54ec Merge "Add Zygote.startChildZygote() to fork a new process that itself is a zygote." am: 554cfd1f1d am: 5b9410c74b
am: 4523bf284a

Change-Id: Ib714e447f06323d38c98de683f5547e66749856e
2018-02-17 04:08:15 +00: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
8b0012bc2c Merge "fix ModemActivityInfo should be delta" 2018-02-17 03:11:27 +00:00
Svetoslav Ganov
2d20fb47f4 APIs to watch active op changes
System singed components can watch for starting/finishing of
long running app ops. Also protected the APIs to watch op mode
changes with a singature permission for the cross-uid use case.

Test: atest com.android.server.appops.AppOpsActiveWatcherTest

bug:64085448

Change-Id: Id7fe79ce1de4c5690b4f52786424ec5a5d9eb0fa
2018-02-16 18:29:04 -08: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
Sudheer Shanka
ac417a56af Merge "Read per-uid cpu times less often." 2018-02-16 23:37:45 +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
Bernardo Rufino
eaa78b92a5 Add local transport parameters for transport flags GTS test
Added parameters for local transport in secure setting for setting up
local transport to test transport flags GTS test.

Test: GTS test in topic CL.
Bug: 73100304
Change-Id: If654175d91fdf1ea68db0f3320d59b2b770a4db3
2018-02-16 16:25:47 +00: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
Lucas Dupin
d42212885a Merge "Fix race condition in GradientDrawable" 2018-02-15 22:41:33 +00:00
Chenjie Yu
a54e54dcee fix ModemActivityInfo should be delta
Test: manual test
Change-Id: Icc45f05541bc90b64831572ed5f10733bc2207a4
Fix: 73388886
2018-02-15 14:07:50 -08: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
TreeHugger Robot
2792c7f6a2 Merge "Do not check isPortait on null mediaSize" 2018-02-15 21:08:25 +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
aedf031b21 Merge "Pass the compilation reason to dexopt" 2018-02-15 20:45:03 +00:00
TreeHugger Robot
e4adba745b Merge changes from topic "telus"
* changes:
  SUPL server for Telus
  New cellular network types
2018-02-15 18:04:59 +00:00
Sudheer Shanka
c20379e6ec Read per-uid cpu times less often.
Schedule the read with a delay and ignore any
proc state changes during this delay duration.

Bug: 73437192
Test: atest com.android.internal.os.BatteryStatsTests
Change-Id: Ica6ec3f16ed911091e79102a2a62210edcaddf94
2018-02-15 02:44:37 -08:00
Rebecca Silberstein
e371d1c0ae Add OWNERS for wifi/connectivity related files
Added OWNERS for the wifi dir under frameworks base and per-file owners
for wifi/connectivity related files in internal util

BUG: 73403966
Test: none
Change-Id: I7319394d4b02e6dcfa566192b2822cfc47e72926
2018-02-14 23:11:23 -08:00
Lucas Dupin
bf4646bf1f Fix race condition in GradientDrawable
Animation would be able to override subsequent setColors
if the color request was the same as the one in the current frame.

Test: Set lock wallpaper to black, lock device
Test: Unlock device, look at scrims
Change-Id: I22fa390bdc6d39eaf09974fcbc5f60bbc46f4f66
2018-02-14 21:16:33 -08:00
Calin Juravle
4bc8f4daf3 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-14 13:26:04 -08:00
Philip P. Moltmann
2ec6657362 Do not check isPortait on null mediaSize
If the mediaSize is null isPortrait causes a NPE, hence don't check it.

Test: adb shell dumpsys print
Fixes: 73126770
Change-Id: I98cfcfc79bac20ee2f1a2aee0f032d7e34075274
2018-02-14 12:33:39 -08:00
Sudheer Shanka
9bed261a30 Merge "Update BatteryStats cpustats collection to be asynchronous." 2018-02-14 18:34:59 +00: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
TreeHugger Robot
2b0d4b0b54 Merge "Zen upgrade notification" 2018-02-14 00:27:05 +00:00
David Brazdil
145ecabda2 Merge "Refactor runtime hidden API flag from negative to positive" 2018-02-14 00:10:28 +00:00
Sudheer Shanka
f7431febe0 Merge "Update the internal state before sending the deltas to callback." 2018-02-13 23:44:56 +00:00
Beverly
3bae4e5d86 Zen upgrade notification
Test: runtest --path /extra/master/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
Change-Id: Ia31f89af74d9bcee40e050bd6cc13f1e6a9a15d9
Fixes: 73000503
Fixes: 72876890
Fixes: 73110052
2018-02-13 17:29:59 -05:00
Sudheer Shanka
125e4ec2dd Merge "check if per-uid cputimes proc file has correct no. of freqs." 2018-02-13 21:04:08 +00:00