Commit Graph

14771 Commits

Author SHA1 Message Date
TreeHugger Robot
9920baf440 Merge "Add a command line interface to SystemUI" 2020-09-30 13:56:55 +00:00
Ioana Stefan
88cefeb2c9 Merge "Add proto-based client side dumping for IME tracing" 2020-09-29 15:27:30 +00:00
Anmol Gupta
cf9e5123ce Add proto-based client side dumping for IME tracing
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
2020-09-29 15:05:18 +02:00
TreeHugger Robot
0f3fbe3e9f Merge "Optimize getting time_in_state for threads of system server" 2020-09-28 22:56:24 +00:00
Dmitri Plotnikov
2237efed88 Optimize getting time_in_state for threads of system server
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
2020-09-28 15:32:42 -07:00
Alison Cichowlas
524de0729c Merge "When logging ranking positions, use the number of displayed targets in calculating offset rather than the total number available." 2020-09-28 17:32:41 +00:00
Nikita Dubrovsky
210c931b21 Merge "Update RichContentReceiver API (now OnReceiveContentCallback)" 2020-09-28 14:48:42 +00:00
Tiger Huang
b7d379147e Merge "Remove redundant logic about System UI visibility" 2020-09-28 13:30:22 +00:00
Tiger Huang
a9b8fa272c Remove redundant logic about System UI visibility
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
2020-09-28 02:04:21 +08:00
Alison Cichowlas
b17dbd20c3 When logging ranking positions, use the number of displayed targets
in calculating offset rather than the total number available.

Test: ChooserActivityTest; log inspection
Bug: 169344682
Change-Id: I40c841bf0f3e1cf90b0e4998bde1c9e8009c09c5
2020-09-25 21:58:37 -04:00
Nikita Dubrovsky
dd9869aa4c Update RichContentReceiver API (now OnReceiveContentCallback)
Bug: 163718378
Bug: 165632620
Bug: 152068298
Test: Unit tests
  atest CtsWidgetTestCases:TextViewOnReceiveContentCallbackTest
  atest CtsViewTestCases:ViewTest
  atest FrameworksCoreTests:TextViewProcessTextTest
Change-Id: I3fa65b47c920a9d1ddad88a79e60864dc8109753
2020-09-25 13:46:33 -07:00
TreeHugger Robot
343552e1fc Merge "Fix showing keyboard without editor focused in some cases (1-2/2)" 2020-09-25 13:31:09 +00:00
vadimt
36b9b0819e Adding CUJ types for Launcher
Test: compilation
Bug: 169220800
Bug: 169220955
Bug: 169221267
Bug: 169220924
Bug: 169220843
Change-Id: I57e70c310e17e860cce679eabd23a5b67bbcf50e
2020-09-24 16:58:00 -07:00
Ming-Shin Lu
9d63d35578 Fix showing keyboard without editor focused in some cases (1-2/2)
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
2020-09-24 23:23:47 +08:00
TreeHugger Robot
87696c9b8e Merge "SystemConfig: Tolerate absent native lib paths." 2020-09-24 13:35:25 +00:00
Alison Cichowlas
a0d41416fc Merge "Fix handling of bad image previews." 2020-09-24 13:18:01 +00:00
Tobias Thierer
8f036fd454 SystemConfig: Tolerate absent native lib paths.
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
2020-09-24 12:07:23 +00:00
Fiona Campbell
1cce0c2f38 Merge "Persist screen brightness setting through upgrade" 2020-09-24 07:24:39 +00:00
TreeHugger Robot
7fb1ba6ffd Merge "BatteryStatsImpl: Add mBatteryTimeToFull to parcel" 2020-09-24 05:56:06 +00:00
TreeHugger Robot
0e2927e75b Merge "Statsd logging: Fix UiEvent logging instance IDs." 2020-09-23 20:34:28 +00:00
Alison Cichowlas
ba027fad91 Fix handling of bad image previews.
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
2020-09-23 15:52:16 -04:00
Winson Chung
005bfa1186 Merge "Account for cutouts in system insets (as done previously)" 2020-09-23 19:30:13 +00:00
Fiona Campbell
af6cd6dc30 Persist screen brightness setting through upgrade
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)
2020-09-23 13:06:39 +01:00
Wu Ahan
3d90d978d9 Merge "Add cancel method to aot infrastucture" 2020-09-23 08:50:22 +00:00
Evan Rosky
f4f842b65f Merge "Added some protologs to BLASTSyncEngine" 2020-09-23 00:52:54 +00:00
Winson Chung
f95fad0461 Account for cutouts in system insets (as done previously)
Bug: 167389393
Test: atest DecorViewTest
Change-Id: I75554224171e1e6a32892db53e0243c38a7b5169
2020-09-22 14:39:37 -07:00
TreeHugger Robot
80cede3d78 Merge "Fix keeping track of binder native thread IDs" 2020-09-22 19:33:30 +00:00
Will Brockman
4a46eaf3dd Statsd logging: Fix UiEvent logging instance IDs.
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
2020-09-22 14:54:53 -04:00
Dmitri Plotnikov
9801ed118c Fix keeping track of binder native thread IDs
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsBinderCallStatsTest
Bug: 169094825

Change-Id: If503327bd6f7fa022a1d261edb0746f710b1410c
2020-09-22 10:35:20 -07:00
Evan Laird
d053302e0d Add a command line interface to SystemUI
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
2020-09-22 11:59:49 -04:00
Stephane Lee
4b967a454e BatteryStatsImpl: Add mBatteryTimeToFull to parcel
Bug: 163342637
Test: Ensure that both Settings/SystemUI ttf are synchronized
Change-Id: I844149d4787e3aef7808bb4f85b0f08d179c5c41
2020-09-21 18:07:27 -07:00
Ytai Ben-tsvi
189d6050da Merge changes from topic "new-perm"
* 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
2020-09-21 19:07:04 +00:00
Tiger Huang
a7c40017ff Merge "Remove the legacy insets mode" 2020-09-19 17:07:56 +00:00
TreeHugger Robot
c4c1de307e Merge "Refactor ListenerMultiplexer with new capabilities" 2020-09-18 21:06:02 +00:00
Evan Rosky
4e8518a43b Added some protologs to BLASTSyncEngine
To enable easier debugging of sync-related issues

Bug: None
Test: adb shell wm logging enable-text WM_DEBUG_SYNC_ENGINE
Change-Id: Id5b6e47de6958a5b81ac3bf5617038831282165e
2020-09-18 13:43:16 -07:00
Maryam Karimzadehgan
7d395e2ee9 Use ML model for the Back Gesture in EdgeBackGestureHandler.
Change-Id: I2fd5255e903932c03a35ae463b0eff3840dc81bd
Test: manual model test and getting the results
b: 150170384
2020-09-18 18:31:23 +00:00
Soonil Nagarkar
87b8cc3866 Refactor ListenerMultiplexer with new capabilities
-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
2020-09-18 10:08:11 -07:00
Tiger Huang
6ef3b6e137 Remove the legacy insets mode
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
2020-09-18 15:13:12 +08:00
Sanguk Jeon
761e81f6a8 Ensure that binding state is false when handling dead binder
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
2020-09-17 20:09:23 -07:00
Hall Liu
a471b1966e Merge "Update PhoneStateListener#onOutgoingEmergencySms" 2020-09-17 19:59:23 +00:00
Ahan Wu
e2659297dd Add cancel method to aot infrastucture
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
2020-09-17 23:40:47 +08:00
TreeHugger Robot
34cb1e1519 Merge "Link wm shell command to enable protolog in shell" 2020-09-15 21:28:57 +00:00
Jeff Sharkey
4b5b0174d0 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570 am: 487d394296
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: Id01f468b43fd5b2aada78608010625b392c1b647
2020-09-15 21:01:48 +00:00
Winson Chung
d2b6017684 Link wm shell command to enable protolog in shell
- Pass through unhandled logging commands to SysUI to simplify
  enabling/disabling logging for the shell.

Bug: 168497382
Test: adb shell wm logging enable-text WM_SHELL_TASK_ORG
Test: adb shell wm logging enable-text WM_DEBUG_RECENTS_ANIMATIONS
Change-Id: I37942eaee82fdcf545212b18375f3d3e2638b8ee
2020-09-15 12:18:50 -07:00
Jeff Sharkey
487d394296 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I79488866c538bf9e76d0a6429e30262978f6fdab
2020-09-15 00:13:08 +00:00
Jeff Sharkey
da7478b570 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I9b79dbf3e9983523db11599d8ae289b05aabf80c
2020-09-14 23:42:34 +00:00
Jeff Sharkey
741c0a78cc Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I7da537200efe31e803234bd1a0236843064186c8
2020-09-14 23:10:42 +00:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Jeff Sharkey
6516a83886 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
2020-09-14 10:00:02 -06:00