This CL implements a mechanism to dump IME related client states into
a proto file which can later be imported to winscope to allow easy
debugging. A new abstract class ImeTracing.java declares the methods
related to scheduling, collecting and dumping logs. Two child class
implement these methods for server and client separately.
The Design Doc for the IME tracing project is: go/ime-tracing
Bug: 154348613
Test: start trace by calling "adb shell ime tracing start"
end trace by calling "adb shell ime tracing stop"
pull trace using "adb pull /data/misc/wmtrace/ime_trace.pb ime_trace.pb"
Change-Id: Ia89f11d5ef8a220ea7746191b18769cea5a8359d
Prior to this change, we would iterate over _all_ UIDs in
the system, select the one for SystemServer and then iterate over
_all_ threads in _all_ processes running under that UID.
This iteration involves reading many directories in /proc and
many files in those directories.
In the new implementation, we only read time_in_state for the
threads in the system server process itself, identifying them by
the PID. This optimization reduces the cost 5:1 to 8:1 in terms
of CPU time, number of files read and amount of RAM used.
Bug: 167994570
Bug: 163063901
Test: atest FrameworksCoreTests:com.android.internal.os.SystemServerCpuThreadReaderTest
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Test: atest FrameworksCoreTests:com.android.internal.os.KernelSingleProcessCpuThreadReaderTest
Change-Id: Iaa2eabc9f39999b2867bbffbac93b282cde74165
This CL removes
- mSeq
- System UI flags used to communicate between WMS and System UI
- redundant AIDL methods
- redundant fields and methods
- redundant tests
- PolicyControl
This CL also
- refines the format in DisplayPolicy#dump
- sends a boolean to InputManager to indicate if System UI is in a low
profile mode instead of sending the legacy system UI visibility
Bug: 149813814
Fix: 169105126
Test: presubmit
Test: dumpsys window displays
Test: See if the layout of ImmersiveModeConfirmation is as expected
Change-Id: I8c8df509355bebc9b560af57d5458614557bcd2f
in calculating offset rather than the total number available.
Test: ChooserActivityTest; log inspection
Bug: 169344682
Change-Id: I40c841bf0f3e1cf90b0e4998bde1c9e8009c09c5
As CL[1] mentioned window focus behavior changes from R,
ignoring STATE_VISIBLE or STATE_ALWAYS_VISIBLE request doesn't enough
to fix unexpected keyboard visible issue when same window focused with
the above softInput flag without editor focus, since there is no
additional unspecified window focus to hide the current soft-input
as prior to R's behavior.
To fix that, we introduced new SoftInputShowHideReason to hide
soft-input when the same window focused without valid editor focus
after screen unlock, in order to align with the behavior prior to R.
[1]: I37ae6e30d1de581ba15131c2a90396b3a522a4d6
Bug: 161506356
Test: atest CtsInputMethodTestCases
Change-Id: I20e8076acc5fec3c055af0740e2e2a64b1fb6f0d
SystemConfig.readPublicNativeLibrariesList() has some hard-coded
paths containing public.libraries*.txt files; these are not
present when this code runs outside of an Android device, for
example in a Robolectric test on host.
This CL changes the code to log a warning, rather than crash,
when one of those folders is missing or inaccessible. Note that
this increases the chance that a future breakage will be missed,
but there already was not test coverage for the method behaving
correctly.
Fixes: 169017157
Test: Checked that the following fails before this but passes
after this CL: atest BackupManagerServiceRoboTest
Change-Id: Id8430ea68901ce60dcc855f7013bafadea823297
When the image preview fails (eg for permissions or timeout) the entire
system area is removed. This prevents the user from using Nearby.
Instead, when the image preview fails, we should hide only the image
preview and leave the rest of the system area intact.
Bug: 168557188
Test: ChooserActivityTest; manual inspection
Change-Id: I49190c1fbc4e25b3d2e2802a90de355bff297f7e
The screen brightness float setting initially did not exist when upgrading the device software. This change ensures the float and int values are synchronised on the system start-up.
Bug: 167651957
Test: manual - set autobrightness off, upgrade from Q to R, and check brightness value in settings.
Change-Id: I2a3b996c8747e3c5f1d181bbdd438c70bf23d08b
(cherry picked from commit 96f43f21b3a3021762c2d213d8958590127cae36)
Add the instance ID field to statsd UiEventReported calls that lacked
it, because all statsd writes should write all fields.
Fixes: 168760953
Test: atest NotificationManagerServiceTest
Change-Id: I8a6fb7a9e52c2fd818e2b92c62ea5902583b6f9f
This CL adds some basic support for a command line interface in
SystemUI, using `adb shell cmd` as the jump-off point.
The basic design is kind of as follows:
[ shell ] -> [ system_server ] -> [ StatusBarService ] -> [ SystemUI ]
|
[ shell output ] <- [ sbm service ] <- [ CommandRegistry ]
Where StatusBarManagerService implements a new `passthrough` interface and
forwards all remaining arguments to SystemUI. SystemUI then spawns a new
thread and sends the commands off to the CommandRegistry. Commands are
parsed and executed from there, and all output is written to the given
ParcelFileDescriptor, which is piped back to SBMService using a
TransferPipe.
Commands will by default run on the main executor, but can register with
an executor in order to send work off to any other thread. The command
registry thread will block on the completion of the command.
Implementing new commands as of now is trivial: create a new concrete
implementation of CommandLine and add it to the command map inside of
CommandRegistry.
Test: `adb shell cmd statusbar prefs list-prefs` should have output
Change-Id: I189fa55df6caabe25d693c2241a4d994e7473a2c
* changes:
Demote AlwaysOnHotwordDetector to SystemApi
Sessionize VoiceInteractionManagerService
Sessionize the SoundTriggerService layer.
Use standard API in SoundTriggerTestApp
Fix bug in dumpsys
Require identity information in SoundTrigger.java
Associate an originator identity to sessions
Extract permission checking as a separate aspect
Correctly handle HAL death
-Store tag string in multiplexer rather than duplicating in every
registration.
-Add support for failure callbacks at listener operation submission
time, in addition to within the listener operation itself.
-Extract request out of ListenerRegistration and into subclass, so that
the multiplexer does not need to have any knowledge of requests.
-New multiplexer specific execute and failure callbacks within
registrations objects, with strongly typed listener operation objects.
-Fixed resetService() to work properly even if the service is still
registered.
-Added registration info as an argument to registerWithService() so that
this doesn't need to be duplicated if a client wants access to this
information.
-Narrow exception handling so that only the proper exception
(RemoteException for binder calls for instance) results in registration
removal, and other unexpected checked exceptions should still crash the
process.
-Various other minor fixes.
Test: manual + presubmit
Change-Id: I6fdec313222ff1ef01a1aa4d27d8ee56b4be25d4
This CL also refines the color view logic which checks the system bar
appearance instead of system UI flags.
Bug: 149813814
Test: atest InsetsAnimationControlImplTest InsetsControllerTest
InsetsStateTest InsetsPolicyTest InsetsStateControllerTest
Change-Id: I26d93b3508c84e436133085bd316ade54d00d76a
When a binding is disconnected, it is expected that binderDied() is
called after onBindingDied(). But, there exists a corner case where
the order is reversed. In this case, binderDied() cancels the
scheduling of MSG_UNBIND message, which blocks the chance of changing
mBinding value as false. As a results, mBinding value remains as true
even though the binding is disconnected. This would make the service
as unresponsive when a client tries reconnecting to the service.
This change ensures that mBinding becomes false even though binderDied()
is called before onBindingDied().
Bug: b/162753393
Test: compile & verify basic functions working
Change-Id: I66c5b130674a4355123fbac27f574d0d081e7b63
Add cancel method that we can cancel an ongoing trace from app side.
Also implement a timeout mechanism to avoid missing end() call.
Bug: 158756171
Test: atest FrameworksCoreTests:InteractionJankMonitorTest
Test: atest FrameworksCoreTests:FrameTrackerTest
Change-Id: Ie7a23ac9fcd710a221675b1a15c6ebd68efb9a44