Commit Graph

17725 Commits

Author SHA1 Message Date
TreeHugger Robot
1934e69afb Merge "Prefetch standalone system server jars before switching domain." 2021-12-03 22:10:37 +00:00
Dmitri Plotnikov
690f06ab1e Merge "Fix IndexOutOfBounds exception in dumpsys batterystats" 2021-12-02 21:48:14 +00:00
Dmitri Plotnikov
11f8f5267b Fix IndexOutOfBounds exception in dumpsys batterystats
Also, fix NPE caused by PowerProfile not being set on
BatteryStats during `dumpsys batterystats --checkout`

Bug: 208701409
Test: dumpsys batterystats --checkout
Change-Id: I2ec914610f9d61567eba8d4ff53e384f8390ceaa
2021-12-01 18:21:08 -08:00
Andrei-Valentin Onea
7c19895276 Merge "Allow privapp permission allowlist in apex" 2021-12-01 16:18:43 +00:00
TreeHugger Robot
99d84d42cd Merge "Add IMM#invalidateInput()" 2021-12-01 16:18:05 +00:00
Jiakai Zhang
281a2dfaa1 Prefetch standalone system server jars before switching domain.
In b/203198541, we start to compile standalone system server jars, but
the SELinux policy doesn't allow system_server to load the compiled code
at runtime. As a solution, this change creates class loaders for
standalone system server jars and caches them before switching to the
"system_server" SELinux domain, which essentially loads the jars and
compiled code into the memory.

Bug: 203198541
Test: manual -
  1. Patch aosp/1874113, aosp/1876173, aosp/1906158 (in order to have
     odrefresh compile a standalone system server jar).
  2. Build a system image and flash it to a device.
  3. Run "adb shell cat /proc/`adb shell pidof system_server`/maps" and
     see "apex@com.android.wifi@javalib@service-wifi.jar@classes.odex"
     being mmap'ed.
  4. Run "adb logcat | grep avc" and see no denial.
  5. atest odsign_e2e_tests

Change-Id: I365be766cfb77c6e240d5871f1b3d8ed7abae6f5
2021-12-01 13:54:30 +00:00
Dmitri Plotnikov
fd79667461 Merge "Drop TAG_FIRST_OCCURRENCE_FLAG when populating history tag array" 2021-11-30 19:34:30 +00:00
Evan Severson
e068cd5544 Merge "Implement Task Manager UI" 2021-11-30 12:27:04 +00:00
Dmitri Plotnikov
8af4657207 Drop TAG_FIRST_OCCURRENCE_FLAG when populating history tag array
When there are more than MAX_HISTORY_BUFFER of history events,
we store the history buffer and create a new one.  At that point,
we set the TAG_FIRST_OCCURRENCE_FLAG flag on all pre-existing indexes
in the history tag pool to indicate that those tags have not yet
occurred in the current history buffer and therefore would still
need to be written into the buffer if they occur in the future.
As a result, we end up with some indexes in the history tag pool
having the TAG_FIRST_OCCURRENCE_FLAG set.  We need to reset this flag
when adding tags to mHistoryTags in order to restore the natural
sequence of indexes.

Bug: 206823946
Test: atest CtsDumpsysHostTestCases:BatteryStatsDumpsysTest
Change-Id: I3affd09ea45accf3ac8706bd8114d0d7ca385a69
2021-11-29 18:13:22 -08:00
Evan Severson
1f6bb02a63 Implement Task Manager UI
This adds the dialog and a quicksettings tile entrypoint to show the
user apps which have foreground services running.

TODOs: Use security footer instead of quicksettings tile
       Implement the missing UX of the stopped FGS
       Tests

Test: atest SysetmUITests
Bug: 201579707

Change-Id: I2185a22b789404b97e98a16c11c0a296159ddd89
2021-11-29 17:39:40 -08:00
TreeHugger Robot
7a3825459d Merge "Adds the basic API of the attestation verification framework." 2021-11-29 23:15:34 +00:00
Dmitri Plotnikov
ae0596ccb0 Merge "Fix NPE caused by a null battery history tag" 2021-11-29 21:02:00 +00:00
Dave McCloskey
b9b25ef742 Adds the basic API of the attestation verification framework.
Bug: 201696614
Change-Id: I59d90091106db6e6343f3a6fb698f01559841137
Test: N/A (non-functional API definition)
CTS-Coverage-Bug: 201337503
2021-11-29 10:08:41 -08:00
Dmitri Plotnikov
b6d0af354b Fix NPE caused by a null battery history tag
Bug: 206823946
Test: atest CtsDumpsysHostTestCases:BatteryStatsDumpsysTest
Change-Id: I7a5d70137608bf80ec8a0ca4ee161a42a0d96f95
2021-11-29 09:56:06 -08:00
Treehugger Robot
250c59b35f Merge "Fix an issue when empty the usap pool." am: faf1b1cf0b am: 9078248b75 am: 80f41edf05 am: 81dd7537eb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893002

Change-Id: Ib59b0793f1bbcbb1a39ae15417598161550c95ff
2021-11-29 08:42:59 +00:00
Treehugger Robot
81dd7537eb Merge "Fix an issue when empty the usap pool." am: faf1b1cf0b am: 9078248b75 am: 80f41edf05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893002

Change-Id: Idbaa45d4871c7e6c1e15d7af4fb432a2b24a49cf
2021-11-29 08:28:34 +00:00
Treehugger Robot
80f41edf05 Merge "Fix an issue when empty the usap pool." am: faf1b1cf0b am: 9078248b75
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893002

Change-Id: Id444bd4f7b15a985fa026bde136a15c0efab7d38
2021-11-29 08:14:54 +00:00
Treehugger Robot
9078248b75 Merge "Fix an issue when empty the usap pool." am: faf1b1cf0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893002

Change-Id: I6d5e04471f756ee5544bb1f77cf1927f44d7715a
2021-11-29 08:00:57 +00:00
Treehugger Robot
faf1b1cf0b Merge "Fix an issue when empty the usap pool." 2021-11-29 07:46:36 +00:00
Adam Bookatz
67639c67e1 Merge "UM.canAddMoreUsers(userType)" 2021-11-24 18:51:14 +00:00
zhangjianqiu
1bc2b9c612 Fix an issue when empty the usap pool.
When empty the usap pool, the usap processes may be blocked by
usapPoolSocket.accept(), which cause the usap process fail to kill
immediately. So we can move the position of blockSigTerm after
usapPoolsSocket.accept() and delele the old blockSigTerm in the while
loop.

Test: manual test.
1.setprop persist.device_config.runtime_native.usap_pool_enabled true.
After 1 min, trigger fill usap pools.
2.setprop persist.device_config.runtime_native.usap_pool_enabled false.
After 1 min, trigger empty usap pools.
3.repeat step 1.

Signed-off-by: zhangjianqiu <zhangjianqiu@oppo.com>
Change-Id: I657940b30f71cdc717c673be6d70738e61e2bb68
2021-11-24 09:48:01 +08:00
Adam Bookatz
ac0a1235ee UM.canAddMoreUsers(userType)
Introduces an API for whether more users can be added of the given user
type.

Bug: 192577100
Bug: 175795666
Bug: 189937255
Bug: 205100630
Test: atest com.android.server.pm.UserManagerTest#testAddTooManyUsers
Change-Id: I1c705d65d1c083a60fd4e058456dcdc4ffa0fffb
2021-11-23 10:14:29 -08:00
Joshua Trask
554dcb5a72 System->Unbundled, AppPrediction availability bit.
The current logic in ChooserActivity depends on checking
for the presence of a particular AppPredictionService
component in AiAi, but that check always fails in the
unbundled Chooser. Instead, only check when we're
running on the system side, and hand off the bit in an
extra on the delegation intent.

Test: trivial (needs other changes for meaningful behavior)
Bug: 206831012
Change-Id: I86919d962ac25fc1a4dd4a25d672d400abc64ff2
2021-11-19 14:39:03 -05:00
Treehugger Robot
32928fecf0 Merge "Framework and system_server classes can access public vendor libraries" am: 8cb6d28329 am: 1f479b99ce am: 6d0d1ff1e6 am: aad398ed08
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885792

Change-Id: Ie41aef3be08b7a579e3fa24a1b21bd9057c9a45a
2021-11-19 01:22:56 +00:00
Treehugger Robot
aad398ed08 Merge "Framework and system_server classes can access public vendor libraries" am: 8cb6d28329 am: 1f479b99ce am: 6d0d1ff1e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885792

Change-Id: I46c8afc6889b9e01e0d48e011092b49f5cee5a12
2021-11-19 01:05:19 +00:00
Treehugger Robot
6d0d1ff1e6 Merge "Framework and system_server classes can access public vendor libraries" am: 8cb6d28329 am: 1f479b99ce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885792

Change-Id: I924242f514458f53cfb71ef83b5084646c8b1b73
2021-11-19 00:47:09 +00:00
Treehugger Robot
1f479b99ce Merge "Framework and system_server classes can access public vendor libraries" am: 8cb6d28329
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1885792

Change-Id: Ia8fe285e3668fac4c2d6ca8ffff2976df88f90c3
2021-11-19 00:29:06 +00:00
Treehugger Robot
8cb6d28329 Merge "Framework and system_server classes can access public vendor libraries" 2021-11-19 00:08:57 +00:00
Joshua Trask
622adb8ffe Merge ""Springboard" from system to new chooser." 2021-11-18 22:41:14 +00:00
Issei Suzuki
69700e2f2b Merge "Stop output WM_DEBUG_WALLPAPER logs to logcat" into sc-v2-dev am: 8dfb06f117 am: b6bb0424f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16283220

Change-Id: If81d94312dfbaf5814ab8b4256626a03e2bb4591
2021-11-18 20:31:53 +00:00
Issei Suzuki
b6bb0424f0 Merge "Stop output WM_DEBUG_WALLPAPER logs to logcat" into sc-v2-dev am: 8dfb06f117
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16283220

Change-Id: I2e622e390e341f1ef11088eff9265bb53ed39ed1
2021-11-18 19:51:05 +00:00
Joshua Trask
83c3ba2809 "Springboard" from system to new chooser.
These changes are somewhat hacky, but they allow
us to conditionally hand over to the new unbundled
chooser with minimal impact if the experiment
is disabled.

For a safer implementation, we could consider
starting with a separate springboard activity that
launches a normal (reverted) version of the
"bundled" chooser if we intend to show the UI
from the system side, but that would incur some
latency even when the flag is disabled.

Test: manual, as described in ag/16286296.
Bug: 202165481
Change-Id: I4073776b293806052e9ff66c50fea1181afd642a
2021-11-18 12:24:16 -05:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Prabir Pradhan
be380be6dd Remove focus change callbacks from IWindow
Since window focus changes are dispatched by InputDispatcher, remove
focus change callbacks from IWindow so that WM cannot dispatch focus
changes without going through InputDispatcher.

Bug: None
Test: presubmit
Change-Id: Idff4c18084f35febf2bb6e5622b7e987130e8c76
2021-11-18 08:38:34 -08:00
Andrei Onea
13673883d7 Allow privapp permission allowlist in apex
Read priv-app permission allowlists from APEX file and warn if
they're in the /system partition instead.

Test: boots
Bug: 190375768
Change-Id: I37d6deb60f0dffb75dd634075cd95bcf7ddf9684
2021-11-18 15:09:07 +00:00
Jiyong Park
24c57c33ea Framework and system_server classes can access public vendor libraries
This CL fixes a regression caused by [1] which introduced
<uses-native-library> tag [2]. With the change, public vendor libraries
[3] became accessible only when they are listed in the caller's
AndroidManifest.xml using the new tag. However, this caused a problem to
the places where AndroidManifest.xml doesn't exist: framework and
system_server classes. For those cases, [1] incorrectly used a null list
as the requested native libraries, and as a result, no public vendor
libraries were accessible.

This CL fixes the issue by not doing the filtering for the class loaders
created for non-app contexts like zygote or system_server. Specifically,
it uses the magic keyword "ALL" which let libnativeloader.so
accept all public vendor libraries.

[1] 6a5b8b1f6d
[2] https://developer.android.com/guide/topics/manifest/uses-native-library-element
[3] https://source.android.com/devices/tech/config/namespaces_libraries#adding-additional-native-libraries

Bug: 205164833
Test: libcuttlefish_fs.so is loaded when built with the other CLs in the
same topic

Change-Id: Id92c59642773851d70d05a05f43eb5873e9de86b
2021-11-18 23:09:27 +09:00
Yohei Yukawa
daa6695c2e Add IMM#invalidateInput()
Historically TextView#setText() has internally called

  InputMethodManager#restartInput(View)

simply because the text seen from the IME is going to be out-of-sync.

Although this behavior is semantically helpful for IMEs, especially
after the initial surrounding text information became available in
EditorInfo, issuing a sync IPC from the calling thread (UI thread
actually) is not plausible from the performance perspective.

This CL fills this gap by adding a new API

  InputMethodManager#invalidateInput(View)

for the scenario where apps independently modify the text with keeping
other text metadata such as input-type to be the same.

All the observable behaviors from the IME remain to be the same as

  InputMethodManager#restartInput(View).

For instance, any pending tasks that are already issued with

  InputMethodService#getCurrentInputConnection()

will be effectively cancelled by using a recently added mechanism [1].

 [1]: I383c3958d2ac1a8d217706509fa12a92b381bbb3

Fix: 203086369
Test: atest -c CtsInputMethodTestCases:InputMethodStartInputLifecycleTest
Change-Id: I3161755779080f98bcef0e47dd0c5247d8a3a256
2021-11-17 15:21:32 -08:00
Maciej Żenczykowski
fe2dfc5037 Merge "switch to using OWNERS from master branch of Connectivity module" am: b86ab4ae44 am: 0700ad89f8 am: 95b11d997d am: 9dab125ae7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1894917

Change-Id: Iab231e59251cc81f93dc48aed37e54e1cf7f4f33
2021-11-17 22:57:47 +00:00
Maciej Żenczykowski
9dab125ae7 Merge "switch to using OWNERS from master branch of Connectivity module" am: b86ab4ae44 am: 0700ad89f8 am: 95b11d997d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1894917

Change-Id: Ib56d12889921c9238e68942d6fff004e5b7de18e
2021-11-17 19:36:42 +00:00
Maciej Żenczykowski
95b11d997d Merge "switch to using OWNERS from master branch of Connectivity module" am: b86ab4ae44 am: 0700ad89f8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1894917

Change-Id: I649bf90ff9d7c20eaeb32963c3f5c5bfc9be3ea1
2021-11-17 19:13:50 +00:00
Issei Suzuki
d2f718cbf3 Stop output WM_DEBUG_WALLPAPER logs to logcat
Bug: 202392340
Test: manual
Change-Id: I0e1c06182f57a195896142f6bcdaafeb7001fb74
2021-11-17 14:22:05 +01:00
Maciej Żenczykowski
7069443319 switch to using OWNERS from master branch of Connectivity module
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifa4a38522ac3aa830e2a7f8b23ad190a334458bc
2021-11-17 00:37:40 -08:00
Dmitri Plotnikov
03fca4a0ef Merge "Reduce object allocation in procstate CPU attribution" 2021-11-16 21:10:12 +00:00
Treehugger Robot
0bc08965b2 Merge "Fix typo in BaseIWindow.java owners file" am: b2f814064e am: 6d5a079682 am: 063df04968 am: 2d3bb1c042
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893295

Change-Id: I2c26d2b1d978fe2e03388a6ce72480caf9c6896b
2021-11-16 18:48:14 +00:00
Treehugger Robot
2d3bb1c042 Merge "Fix typo in BaseIWindow.java owners file" am: b2f814064e am: 6d5a079682 am: 063df04968
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893295

Change-Id: I1531bdbe8f5201b6265709005924aaef09e16b39
2021-11-16 18:34:24 +00:00
Treehugger Robot
063df04968 Merge "Fix typo in BaseIWindow.java owners file" am: b2f814064e am: 6d5a079682
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893295

Change-Id: Ie4a7b7432d7da4b7b5f2efc1e1eb8ee01d3ba582
2021-11-16 18:10:39 +00:00
Treehugger Robot
b2f814064e Merge "Fix typo in BaseIWindow.java owners file" 2021-11-16 17:57:38 +00:00
Treehugger Robot
295e48eb99 Merge "remove PROP_QTAGUID_ENABLED" am: 999147b4ab am: 8d888d92ed am: b3135ed72d am: fa6d0cfdb1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1888335

Change-Id: I74c9ca7b74391d9c365ba39e4ad8471f827c7f0c
2021-11-16 05:05:54 +00:00
Treehugger Robot
fa6d0cfdb1 Merge "remove PROP_QTAGUID_ENABLED" am: 999147b4ab am: 8d888d92ed am: b3135ed72d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1888335

Change-Id: Ic0b15f0fa54ceb4f62114fd29248e7427fa5f86b
2021-11-16 04:47:59 +00:00
Treehugger Robot
b3135ed72d Merge "remove PROP_QTAGUID_ENABLED" am: 999147b4ab am: 8d888d92ed
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1888335

Change-Id: Ib9e2b3e5c248b3acbfea21e6eeda1ec879acd31c
2021-11-16 04:30:08 +00:00