This flag is temporary, just want to make sure we like the state of the world without these targets as we continue down this path.
Test: manual via adb: adb shell device_config get systemui share_use_service_targets false
Bug: 170144291
Change-Id: I8f1ef4b98e7068ff5ee7dbe12827ec4ec034e126
These were uncovered by the recently added EfficientCollections
Error Prone detector, and several of them are in hot codepaths.
Bug: 155703208
Test: make
Change-Id: I4cff2d6b846edc9a7482d21a803117132cbcdadf
Since FUSE in R, there are only 4 mount modes that are used
from IVold.aidl:
REMOUNT_MODE_NONE
REMOUNT_MODE_DEFAULT
REMOUNT_MODE_INSTALLER
REMOUNT_MODE_PASS_THROUGH
REMOUNT_MODE_ANDROID_WRITABLE
Bug: 148454884
Test: Manual
Change-Id: I62b66083f2099b429474872b6f9c7cffb9fb906d
We've fixed the one remaining example of code that accidentally
crosses UID with userId, so this change upgrades the check to become
a fatal build error to prevent future bugs.
Bug: 155703208
Test: atest error_prone_android_framework_test
Change-Id: I3bc46f8039a88b5f3d5f89dc9b5fda785d5c654f
Migrate logs for States and Tasks
Remove DEBUG_PAUSE flag
Remove DEBUG_SAVES_STATE flag
Remove DEBUG_STATES flag
Remove DEBUG_TASKS flag
Bug: 153162675
Test: n/a
Change-Id: I3811f58ff5c904dab0b1ff61d29d83d78ec1a121
There was a regression in the AIDL compiler recently that removed the
requirement that, like in Java, .aidl unstructured parcelables (these
parcelable declarations) are in directories and files which match their
packages and file names. This CL moves relevant files to the correct
directory required by their type.
Bug: N/A
Test: build
Change-Id: I71f6f714e98e184a02b6bbf3d4f8b0b8c8aee30b
ArrayUtils.filter is only supposed to return elements that satisfed the
predicate but it was incorrectly returning everything if nothing
satisfed the predicate.
Bug: 169854982
Test: Android builds
Change-Id: Ia6bd553922ff5823778e5865b6431c6f07aca334
Initial rough implementation of Shell Transitions.
Shell Transitions can be enabled by setting ENABLE_SHELL_TRANSITIONS
via `adb shell setprop persist.debug.shell_transit 1`
The main structure behind this is:
- TransitionController in Core responsible for handling the
collection of transition participants and communicating with
the TransitionPlayer in Shell.
- Transitions in Shell responsible for starting transitions
and playing associated animations.
This initial version only supports task open/show/close and does
a simple fade. The flow is:
1. activityStarter calls to Transitions.requestStartTransition
2. Transitions will prepare to start and then call
WindowOrganizerController.startTransition().
2. Various operations in Core call TransitionController.collect()
to track participants. This collect() acts as a replacement for
adding to mOpening/ClosingApps.
3. The legacy executeAppTransition() is wired into
TransitionController.setReady() for now. This signal
is used to ready a BLASTSyncEngine.
4. When all participants are done drawing, TransitionController
will commit any showing visibility changes and then will construct
a TransitionInfo object summarizing all the changes needed for
animation. This gets sent to Transitions.onTransitionReady()
5. Transitions then plays the transition animation and on
completion will call WindowOrganizerController.finishTransition()
which will tell TransitionController to do any finishing
work (like commiting deferred hide changes).
Bug: 161980187
Test: enable the flag and try opening/closing tasks. Also added
TransitionControllerTests
Change-Id: I80c3a241fc12004a894c26523a1e5828e0c533ff
The GIDs returned by the original permission state implementation in R
actually was never unique, but simply all GIDs from granted permission
concatenated together, and PERMISSION_OPERATION_SUCCESS_GIDS_CHANGED
was returned when the length of the GIDs changed. This is equivalent
to simply checking whether the permission whose grant state changed
has GIDs or not, and can greatly simplify the
logic. PERMISSION_OPERATION_SUCCESS_GIDS_CHANGED was only used in two
places anyway.
The original permission actually would never return
PERMISSION_OPERATION_FAILURE as well because it checks hasPermission()
beforehand and returns PERMISSION_OPERATION_SUCCESS if there's nothing
to change in grant/revokePermission(). The name
PERMISSION_OPERATION_FAILURE isn't a great name for unchanged anyway,
so grant/revokePermission() is now changed to simply return a boolean
for whether the permission state is changed.
The cache for isPermissionReviewRequired() is removed because it's
broken in subtle cases and iterating over an ArrayMap isn't a terrible
trade-off anyway, in exchange for simpler code and correct behavior.
Made removePermissionState() public so that code that actually wants
to erase the state permission doesn't need to perform a revocation
followed by updating all flags to 0.
Non-null arrays are preferred in APIs, the same as non-null
collections, so the GIDs-related APIs are updated to return non-null
int arrays as well. EmptyArray.INT is used instead of null so there
shouldn't be any performance penalty. Also ensured that the APIs are
returning copies instead of the original array to guard against
accidental mutation.
Bug: 158736025
Test: presubmit
Change-Id: I606210e18e5f8f87b8f8408fe476a72c2b7ed1c1
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
Resolve SearchViewTest and InputMethodServiceTest failure when
landing CL[1] in QPR branch.
Also, 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: Id51863a5b67d5d79d903adf43f19b52bd139e03f
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