Adds diskio information to statsd. The puller queries the
proc/uid_io/stats file to get cumulative counts since boot.
Bug: b/116331466
Test: unit test
Test: manually verified that the puller and "cat /proc/uid_io/stats"
returned almost identical output when executed at the same time
Change-Id: Iac446f8dd879ab6bf859eed6e779cc16fdee6c5b
- Also update vold to create sandboxes for secondary storage devices.
- Since bind mounts are created in the process specific namespaces, we
don't need /mnt/storage anymore which we were using it to prevent
some bind mounts from propagating onto /mnt/runtime/write.
- Create bind mounts for {media,obb} dirs similar to data dir in
per process namespace.
- Also fix a bug where we are not passing correct packages to vold when
a new user starts.
Bug: 111890351
Test: manual
Change-Id: I1abbafabc58993860305e5a928c980420f89f289
Updating the CPU stats can be quite slow and blocks the ActivityManager
handler thread.
Bug: 115506775
Change-Id: I9f67acfe2724c11d117703b2c4ccdbcc1f61c5ab
Test: manual - dumpsys batterystats | grep CPU
Add api to collect committed procstats data.
Use highwatermark from the user to filter which files to include. This
way multiple users in the system can use this api.
Also allow ProcessStats.java to dump optional ProcessStatsSectionProto
so that other users can use it.
Test: will add cts test
Change-Id: If37c0fd25814460a1c8d5996d24d138295ff6421
This CL effectively reverts the following 3 CLs.
* Reduce window resizing during IME transition
I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
792faa2c16
* Clear the inset of previous IME when necessary
Ib04967f39b2529251e4835c42e9f99dba2cf43f2
2977eb7b6c
* Make IMS#clearInsetOfPreviousIme() reliable
Ib567daa009c1139858dccadcfc6a04465ebecf36
833bdcedce
The main idea behind the first CL is that the target application can
skil avoid layout resizing if the following two conditions are met.
A. WindowManagerService (WMS) can remember the last IME's inset until
the next IME's window is fully shown.
B. Both the last IME and the new IME have the same inset.
Basically the first CL implements the above A part with an assumption
that some IMEs would do the B part. However, in reality it is quite
unlikely that two random IMEs have the same inset size. At the same
time, maintaining this kind of special optimization is getting harder
and harder as more and more use cases and form factors need to be
supported.
Let's remove this optimization given that no one is benefited by it.
Fix: 116492038
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: do not see any noticeable visual difference
Change-Id: I8ffbf9bf7c3a8be54df0ca8eac1a1f041ef7d3c9
resolveColor() now considers that black backgrounds should have
monochromatic icons. Ambient style is an exception because we
do want colors in there.
Change-Id: Ia21202bb354babb77013feda67c313323ec1e070
Fixes: 115887386
Test: visual
This change adds plumbing from <Biometric>Service to SystemUI for requiring
user confirmation (or not). This change also fixes some layout bugs
that were hard to notice.
Bug: 111461540
Fixes: 113130114
Fixes: 116135579
Test: With confirmation, crypto operation does not work until token
is added to Keystore
Test: Without confirmation, crypto operation works when biometric is
authenticated
Test: BiometricPromptDemo works, UI elements are all correct
Test: Talkback messages are correct
Change-Id: I2c05577699a29c09777cae4db6c7334c1e6bc179
This should reduce the size of the data, because we will
not track the very rare calls unless we are collecting
a detailed sample.
Test: Manual and UTs
Change-Id: If217a9a848935878a6efcdfac9df723c6ce54361
Add ThreadLocalWorkSourceUid and Message.workSourceUid
which will store the UID which caused, directly or
indirectly, the Message to be enqueued.
This was needed because using Binder.getCallingUid() does
not give us enough data since quite a few Binder services
call Binder.clearCallingIdentity() when processing the
call.
Test: UT and manual
Change-Id: I35af3a9ca5193477070990b41ff5d9c52f420069
This is the last step to remove the dependency on IInputMethodClient
from WindowManagerService.
With my previous CL [1], now WindowManagerService (WMS) depends on
IInputMethodClient just because it implements lifecycle management of
IInputMethodClient on behalf of InputMethodManagerService (IMMS).
This CL mechanically moves that responsibility from WMS to IMMS for
better separation of concerns. It is a bit ironic that this CL is
partly undoing my previous CLs [2][3] that removed
IInputMethodManager.addClient() though.
This CL aims to preserve the current observable behavior (e.g. when
InputMethodManager instance is being created) as much as possible.
Most likely there would be no observable behavior difference when seen
from other components.
[1]: I444077b1e4af4033f67ab72c181fac85b601e08a
41f89c3bcc
[2]: I453200fd5847e9a78876affb6a1caec221525e1d
e24ed79edb
[3]: Id91dd600120e4981aa1d9005ce644728968430c9
fffc0e53c6
Fix: 115993358
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I7726c70613ea72d6e78fa5754e9fc840f0a40f11
This is a preparation to remove the dependency on IInputMethodClient
from WindowManagerService.
What inputMethodClientHasFocus(IInputMethodClient) is currently doing
is basically equivalent to comparing PID (and UID), because
InputMethodManager is a per-process instance and comparing two
IInputMethodClient Binder proxies is no more or less than comparing
PID (and UID pair). We can just change its method signature to
achieve the same behavior by taking a PID/UID pair instead of taking
IInputMethodClient.
Note that we can later add display ID to this method to support
multi-display scenario.
This CL also renames inputMethodClientHasFocus() to
isInputMethodClientFocus() for better consistency with other methods.
There should be no observable behavior difference in this CL anyway.
Bug: 115993358
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I444077b1e4af4033f67ab72c181fac85b601e08a
This is a preparation to allow InputMethodManager to have per-display
instances rather than the current per-process singleton instance.
When I introduced InputMethodPrivilegedOperationsRegistry [1], there
was an assumption that InputMethodManager was a per-process global
singleton object.
Now that we are going to break up that global per-process instance
into multiple per-display instances, having multiple
InputMethodPrivilegedOperationsRegistry instances probably does not
make much sense, because it would likely to increases the risk of
compability issues in existing IMEs. Although IME developers soon
really need to use the right Context to obtain the right instance of
InputMethodManager anyway, unnecessarily introducing compatibility
pitfalls that can be avoided in the Framework side is not my
intention.
With this CL, following 9 methods can continue to work no matter
whether InputMethodManager is a per-process singleton or not.
This is fine because those APIs had been mistakenly exposed in
InputMethodManager and already deprecated in favor of newly added ones
in InputMethodService.
* InputMethodManager.hideSoftInputFromInputMethod
* InputMethodManager.hideStatusIcon
* InputMethodManager.setInputMethod
* InputMethodManager.setInputMethodAndSubtype
* InputMethodManager.shouldOfferSwitchingToNextInputMethod
* InputMethodManager.showSoftInputFromInputMethod
* InputMethodManager.showStatusIcon
* InputMethodManager.switchToLastInputMethod
* InputMethodManager.switchToNextInputMethod
[1]: If762714b2003fa6477e1318110f63e13968c1d7e
eec552e9e9
Bug: 115893206
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I4a61470f06ffac5f7a512536f8431489db0108f4
KernelCpuProcReader used FileChannel to dump bytes into a large enough
ByteBuffer. However, FileChannel#read stops as soon as there is nothing
left to read. Since the kernel may not deliver all parts of a proc file
simultaneously, previous read mechanism would possibly read only a
portion of the proc file. The impact is that KernelUidCpuFreqTimeReader
gets an incomplete UID list.
New mechanism uses a loop to turn non-blocking FileChannel#read into a
blocking operation. It does not return until hitting EOF. The reason
not to use Files#readAllBytes is that we want to reuse the byte[].
Bug: 111805985
Test: atest KernelCpuProcReaderTest
Test: compared KernelCpuProcReader#readBytes against Files#readAllBytes
locally
Change-Id: If0d2b6742489632e22c8fec34c627851cda875f2
- call LooperStats.reset() from StatsCompanionService
- add screen_interactive to the LooperStats atom
- temporarily set uid = 1000 to avoid statsd warnings that the uid is invalid
Bug: 113651685
Test: Manual and UTs
Change-Id: Iacf45fcb746c6bb9837456a2a0c74f5a073ff822
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e