Also, fix NPE caused by PowerProfile not being set on
BatteryStats during `dumpsys batterystats --checkout`
Bug: 208701409
Test: dumpsys batterystats --checkout
Change-Id: I2ec914610f9d61567eba8d4ff53e384f8390ceaa
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
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
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
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
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
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
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
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
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
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
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