Commit Graph

9333 Commits

Author SHA1 Message Date
TreeHugger Robot
8a36da32a1 Merge "Add CertPath to KeyChainSnapshot and startRecoverySession" 2018-02-24 10:19:21 +00:00
TreeHugger Robot
284786b9f6 Merge "Fix sleep time in Cellular" 2018-02-24 02:37:38 +00:00
TreeHugger Robot
4e056c8bfa Merge "Explicitly do not support SEARCH_SERVICE on UI_MODE_TYPE_WATCH" 2018-02-24 02:13:27 +00:00
TreeHugger Robot
3453ed8b0a Merge "BatteryStatsImpl: Fix parceling error" 2018-02-24 02:03:24 +00:00
Mike Ma
b90b162798 Merge "Fix strict mode violation" 2018-02-24 00:50:29 +00:00
Bo Zhu
7c1972ff71 Add CertPath to KeyChainSnapshot and startRecoverySession
CertPath will include a cert of the trusted hardware and necessary
intermediate certificates.

Bug: 73784851
Change-Id: Ic70616b8f119891a82402b91035456e404c5f6de
Test: adb shell am instrument -w -e package \
com.android.server.locksettings.recoverablekeystore \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
2018-02-23 16:44:41 -08:00
Erik Wolsheimer
ac5cecd85d Explicitly do not support SEARCH_SERVICE on UI_MODE_TYPE_WATCH
Bug: 69950606
Change-Id: Ia195e88d8652cd7875d0ce03875034698367001c
(cherry picked from commit 980ba14b921932e85cdc0447af0398778a1c0d64)
2018-02-23 23:45:18 +00:00
Adam Lesinski
1408208228 BatteryStatsImpl: Fix parceling error
Bug: 73818082
Test: manual
Change-Id: I6e25cfc3270e5af559a2d077ed7e9786aa1771a8
2018-02-23 21:05:23 +00:00
TreeHugger Robot
b6ca928e1f Merge "Provide the option to disable fading the pattern." 2018-02-23 21:05:23 +00:00
Mike Ma
ea357e5e38 Fix strict mode violation
Change-Id: I3c6391c52f06e4bb94162f8def1ab9b5f4c747fc
Fixes: 73549195
Test: KernelWakelockReaderTest
2018-02-23 11:07:53 -08:00
Christine Franks
5649922b7c Merge "Support forced Night Display auto mode" 2018-02-23 17:39:21 +00:00
Jeff Sharkey
f6ff0f88ee Merge changes Icdb40ee3,I4c239844
* changes:
  Knobs for connectivity experiments.
  Mechanical refactoring to improve job dumping.
2018-02-23 16:26:29 +00:00
Jeff Sharkey
fee8c7b42a Mechanical refactoring to improve job dumping.
First, JobStatusFunctor was really Consumer<JobStatus> before we
had the java.util.function APIs, so switch everyone over.  Replace
most usages with lambdas; no additional runtime cost, since existing
code was already creating classes.

Move dump() to accept Predicate<JobStatus> for their filtering
behavior, enabling more future advanced filtering using any
attributes of JobStatus.  Also move dump() to IndentingPrintWriter
to avoid passing around tedious prefix information.  Makes it much
easier to print sane-looking output.

Add IndentingPrintWriter support for initial prefix values.

Test: manual dumpsys output looks sane
Bug: 73019091
Change-Id: I4c2398443b42dfb48135ab900d4331ff6d2bb5c4
2018-02-22 16:12:07 -07:00
Robert Berry
428a59ab20 Merge "Remove package name parameter from setRecoveryStatus" 2018-02-22 16:40:12 +00:00
Robert Berry
bbe02ae8a3 Remove package name parameter from setRecoveryStatus
Package name is implicit. Recovery agent can only act for the same uid.

Bug: 73757432
Test: runtest frameworks-services -p
      com.android.server.locksettings.recoverablekeystore

Change-Id: I45abf4b956fa4e97d981614d9e61295e85d5669e
2018-02-22 10:45:32 +00:00
TreeHugger Robot
5d10883825 Merge "Binary Cpu Time Proc File Reader" 2018-02-22 01:26:09 +00:00
Mike Ma
2ab0144266 Binary Cpu Time Proc File Reader
Kernel now exposes cpu time proc files in binary format to save cpu
cycles. New proc files are:
Per uid freq time: /proc/uid_cpupower/time_in_state
Per uid active time: /proc/uid_cpupower/concurrent_active_time
Per uid cluster time: /proc/uid_cpupower/concurrent_policy_time
(See PowerProfile.java on how these data are used)
KernelUidCpuActiveTimeReader, KernelUidCpuClusterTimeReader and
KernelUidCpuFreqTimeReader are modified to use these new data.

Meanwhile, statsd needs these data too. So the actual reading
fuctionality is delegated to singletons in KernelCpuProcReader to
accomodate concurrent access of these proc files by more than one
party. When multiple read requests hit the singleton within the
throttle interval, the singleton will return stale data.

Optimization
KernelCpuProcReader reuses the same ByteBuffer to save results.
KernelUid***Reader all reuse the same long[] array to send results
back to BatteryStatsImpl. Estimated saving of ~200 KB GC effort
per read request.

Add a flag to control throttle interval:
kernel_uid_readers_throttle_time

Bug: 72763654
Bug: 71906435
Bug: 71905885
Bug: 70517018
Fixes: 73166477
Fixes: 72172569
Test: BatteryStatsCpuTimesTest
Test: KernelUidCpuActiveTimeReaderTest
Test: KernelUidCpuClusterTimeReaderTest
Test: KernelUidCpuFreqTimeReaderTest
Test: KernelCpuProcReaderTest
Change-Id: I1012667ce3b9eb35e37882a058bd4bceccabbbe9
2018-02-21 15:35:34 -08:00
Fyodor Kupolov
eb2c082e37 Merge "Verify last array's length in readFromParcel" 2018-02-21 22:03:37 +00:00
Christine Franks
8ad6f6d671 Support forced Night Display auto mode
Bug: 69973773
Test: make -j100

Change-Id: Ifc1cb5d35f5d5b4ad988b8add04008332cf37dbe
2018-02-21 10:51:57 -08:00
Mathew Inwood
4693a75eda 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
Change-Id: I94746b7f12dd9371d5068bb235eb853f63ee4d97
2018-02-21 12:50:45 +00:00
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
Fyodor Kupolov
e82f19d94d Verify last array's length in readFromParcel
Length of the last array in readFromParcel should be the same as
value of mNextIndex.

Test: PoC app in the bug
Bug: 73252178
Change-Id: I69f935949e945c3a036b19b4f88684d906079ea5
2018-02-20 17:02:35 -08: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
Siddharth Ray
ed754705b6 Fix sleep time in Cellular
Sleep time for cellular is based on information sent by the modem.

Sleep time added to ControllerActivityCounterImpl. This field applies
to Cellular, Wifi, BT. This change is for cellular only.

BUG:72177330

Test: Manual
Change-Id: Ia2b35204094edd3972abb43cc16889116ddedabc
2018-02-16 15:07:05 -08:00
Vishwath Mohan
8c8b9fb02a Provide the option to disable fading the pattern.
This CL adds a setPatternFade() method that allows enabling or
disabling the pattern fade (it's enabled by default).

Test: Pattern fades everywhere else but during the setup flow.
Bug: 72798512
Change-Id: I2bb87975b1e50eb1add9e18a224a81f3448ec91a
2018-02-16 12:41:43 -08: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