Commit Graph

9353 Commits

Author SHA1 Message Date
Bo Zhu
0f0d1ab1d3 Merge "Check the public-key signature of the whole certificate file before accepting the certificates" 2018-03-02 08:52:36 +00:00
Adrian Roos
90c27c332a Merge "DisplayCutout: Add xml wrapper for layoutInDisplayCutoutMode" 2018-03-01 13:57:22 +00:00
TreeHugger Robot
06b1df657a Merge "Use start/finish app ops in window manager" 2018-03-01 01:11:25 +00:00
TreeHugger Robot
364eb30647 Merge "addModemTxPowerToHistory() made synchronized" 2018-03-01 01:06:38 +00:00
Siddharth Ray
a67fb56329 addModemTxPowerToHistory() made synchronized
BUG:73818082
Change-Id: Ie0cce10d993a696c5e915e8ef62a66f2cd453197
2018-02-28 13:54:43 -08:00
Bo Zhu
7f414d94fc Check the public-key signature of the whole certificate file before
accepting the certificates

This change requires an additional param to the initRecoveryService()
API to take in the public-key signature.

Bug: 73904566
Test: adb shell am instrument -w -e package \
com.android.server.locksettings.recoverablekeystore \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I2aeead1fda51b6cd8df71ed3b5066342ebc8d5ea
2018-02-28 11:58:30 -08:00
Mike Ma
d2f8eca334 Toggle READ_BINARY_CPU_TIME
Test: N/A
Change-Id: I41403c16feffa61dd4e3ae13498ff63b26a1d4b2
2018-02-28 11:51:56 -08:00
Adrian Roos
2292031e3d DisplayCutout: Add xml wrapper for layoutInDisplayCutoutMode
Allows native apps to request a layoutInDisplayCutoutMode without
having to implement a custom NativeActivity subclass.

Change-Id: I0b7fd4624e89fabe177462d615360442f72a1e11
Fixes: 73807928
Test: atest PhoneWindowTest
2018-02-28 16:43:16 +01:00
Bo Zhu
2c8e5383c8 Add a new API to import a key provided by the caller, such that this key
can also be synced to the remote service

This API may be useful for backward-compatibility work, e.g., recovering
a key that's backed up in Android Q+ to Android P without updating the
Android P Frameworks code. This API may also be useful for other use cases.

Bug: 73785182
Change-Id: I1022dffb6a12bdf3df2022db5739169fcc9347d2
Test: adb shell am instrument -w -e package \
com.android.server.locksettings.recoverablekeystore \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
2018-02-27 09:18:59 -08:00
TreeHugger Robot
837d2076ad Merge changes I7ce670f5,I0bd2de38
* changes:
  Preload with RELRO sharing in the WebView zygote.
  Make WebViewLibraryLoader interface more flexible.
2018-02-27 16:11:02 +00:00
TreeHugger Robot
bf4e3bc1bd Merge "Refactor KernelUidCpuTimeReader" 2018-02-27 10:24:28 +00:00
TreeHugger Robot
dcd6ae8bc8 Merge "Atom: TemperatureReported" 2018-02-27 07:00:45 +00:00
Tej Singh
4029831e36 Atom: TemperatureReported
Makes the temperature reported atom pulled, and adds CPU, GPU, and SKIN
temperatures. Pulls information from the thermal hal.

Test: CTS test on cl in this topic
Change-Id: I0a8e2d1135bdd77e1cc510f24ff5214ce9e14ead
2018-02-26 20:55:26 -08:00
Mike Ma
69d8b3e050 Refactor KernelUidCpuTimeReader
Refactor KernelUidCpu*TimeReader, all extends KernelUidCpuTimeReaderBase.
Refined logging of these classes, avoid spamming system log.

Change-Id: Id8e149ce5be2595292a31de7fe6e1a94cef28bc1
Fixes: 73825907
Test: KernelUidCpu*TimeReaderTest
2018-02-26 15:39:52 -08:00
Phil Weaver
0f9aa4c3a5 Make a11y shortcut robust to services w/no summary
Fixes: 73254116
Test: Configure shortcut for TestBack. Now works.
Also adding test to internal test that fails without
this change.

Change-Id: I6bb1359f80c5e0145997bc107fe1580686edb30e
2018-02-26 13:49:41 -08:00
Svet Ganov
f7b4725375 Use start/finish app ops in window manager
Add infrastructure to app ops to specify how to treat mode_default
(for now only for startOp) allowing the caller to decide of this
mode should be treated as success - this is useful if the caller
already performed the default permission checks which determined
that the caller would perform the operation if the mode is default.
This way there is a record in the app ops history that this op
was performed. This is now used by the window manager service
which starts/finishes ops when an alert window is shown/hidden.
The window manager allows adding the window if the mode is default
but the caller has the fallback permission. In this case the
alert window would be shown and we want that noted in the op
history.

Now the window manager properly starts/finishes alert window op
when an alert window is shown/hidden. This is required to allow
SystemUI to badge notifications from apps showing alert windows
or add a dedicated notification if the app has no notifications.

Test: cts-tradefed run cts-dev -m CtsWindowManagerDeviceTestCases

      Added android.server.wm.AppOpAlertWindowAppOpsTest

      cts-tradefed run cts-dev -m CtsPermissionTestCases
          -t android.permission.cts.AppOpsTest

bug:64085448

Change-Id: I9041b1ac287bc5f9ed11d39bb203beba80f3f0f6
2018-02-26 13:29:13 -08:00
Torne (Richard Coles)
f4f647e2e0 Preload with RELRO sharing in the WebView zygote.
Now that the WebView zygote is a child of the system zygote it has the
smae address space layout and can use the existing WebView native
library RELRO file.

Preload the native library using the RELRO file in the zygote, to share
this data with applications which are using WebView. This can save up to
1-2MB of dirty memory, replacing it with clean pages that are shared
with more processes and thus have a smaller impact on PSS.

Bug: 63749735
Test: CtsWebkitTests
Change-Id: I7ce670f5fcddae9e98631e21329840ef3ad52f9a
2018-02-26 16:23:09 -05:00
Robert Berry
a3b994798d Remove account param from generateKey method
Bug: 73811828
Test: runtest frameworks-services -p
      com.android.server.locksettings.recoverablekeystore
Change-Id: If2f4174beea9cfb8c852139a7594815c377dbe7a
2018-02-25 14:48:42 +00:00
Robert Berry
f34ad9509d Merge "Remove packageName from getRecoveryStatus" 2018-02-25 14:08:47 +00:00
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
Robert Berry
56f06b4d11 Remove packageName from getRecoveryStatus
This parameter is unused.

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

Change-Id: I153a84d71b0ebaed8ce3a1f0f33c70036dd960b2
2018-02-23 15:12:06 +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