The new service will intercept all activity starts in communal mode and
enforce that the activity is allowed by ensuring the user has enabled
the package and the activity has showWhenLocked=true.
Test: locally on device
Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest
Bug: 191994709
Bug: 191996331
Bug: 200324021
Change-Id: I1892881481cf055bd4938d4cf0b624027ec2be3e
Originated from CL[1] to fix a crash edge case that happened when
calling InputMethodPrivilegedOperationsRegistry#put that assumes there
is only one pair of window token and IInputMethodPrivilegedOperations
in the container.
However, InputMethodPrivilegedOperationsRegistry is a process-level
singleton instances that may run into a timing when there are 2
InputMethodService (IMS) instances, one is just created and the other
is in the way of destorying.
Before the destorying one calls
InputMethodPrivilegedOperationsRegistry#remove, IMS#initializeInternal
invoked for the new one with the same window token, that makes system
ignored the initialization process because CL[1] introduced
InputMethodPrivilegedOperationsRegistry#isRegistered(token) and system
thoughts the token has been registered before, but actually this method
is problemetic to aware this token registraction is for previous IMS.
As the result, IME will crash when SoftInputWindow.show because the
windowState is still under TOKEN_PENDING and lose the token attachment.
To fix this crash timing issue, making
InputMethodPrivilegedOperationsRegistry be able to maintain more than
one pairs of IME token and IInputMethodPrivilegedOperations makes more
sense and we can remove the ignore logic in initializeInternal to
fix the token attachment issue.
[1]: Ie6bfbae735724fe744590e715124d2737d2b665d
Fix: 202081442
Test: atest CtsInputMethodTestCases
Test: atest MultiDisplaySystemDecorationTests
Change-Id: I21cec3f228520ed703cd8ad68ea0ef59c966ed9d
Add screen on and doze timers for multiple displays.
For Battery history, charge/discharge logs and UnsupportedAppUsage, the
legacy screen state timers remain, as well. The legacy timers and
screen state tracking will now track overall screen state of the device.
The current overall screen state is the most "important" state currently
active.
Order of screen state importance is: on, doze, doze suspend, off.
Note: Utilizing per display measured energy will be handled in a follow
up CL.
Bug: 194107383
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: I4ad4f54b6897f406e4ec0f59834dd4762083e0d8
Before this change, we controlled wallpaper visibility on the Lockscreen
by combination of visibility of NotificationShade window and
setting/resetting FLAG_SHOW_WALLPAPER flag on its window. When the flag
was removed while NotificationShade was still visible (e.g. OCCLUDE
transition starts on the Lockscreen), the wallpaper became immediately
invisible and caused a flicker.
With this change, we keep the FLAG_SHOW_WALLPAPER on NotificationShade,
and only rely on its visibility weather the wallpaper should be visible
or not on the Lockscreen.
Bug: 191438572
Test: existing tests + manual (open GPay app from the lockscreen)
Change-Id: Id13ffbbd2c965e0dcc97effd3faf46fd7a8bb1a5
When switching users and attempting to lock the device, the sysui main
thread becomes overwhelmed with events, creating a significant lag
between the time a message is posted and processed on the main
thread. This can be dangerous when these events are critical for
security, such as calls coming from PhoneWindowManager#lockNow() that
call KeyguardViewMediator#doKeyguardTimeout(). On older devices with
slower CPUs and less memory, the delay in processing can be
significant (15 - 30s).
The result of not prioritizing these events leads to a window of time
where a guest user can switch back to the owner, and gain access to
the owner's homescreen without needing to unlock the device with the
owner's credentials.
As a mitigation, prioritize two events originating in two specific
methods to make sure the device locks as soon as possible as well as
have the system server preemptively update its local cache.
Bug: 151095871
Test: Very manual race condition - follow steps listed in bug
Change-Id: I7585a0a5eeb308e0e32a4f77f581556d883b5cda
The previous fix corrects startup, but crashes in
onDestroy because of null value assumed to be
initialized.
Bug: 201719995
Test: adb shell am start com.android.systemui/.usb.UsbResolverActivity
Change-Id: Ie255ece9e73db71cbb4468c59db6de79d8f659b5
Replaced the display related power constants with new ones that support
multidisply.
The legacy constants are marked as UnsupportedAppUsage, so they have not
been removed yet and they attempting to read them will return the power
constant values for the first display.
Fixes: 200226329
Test: atest com.android.internal.os.PowerProfileTest#testPowerProfile
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Id181443bd6f553ee37fc4a1647d31644fcad7912
This CL removes the logic related to the legacy ActivityView.
Bug: 179161778
Bug: 161810301
Test: build and boot to home.
Change-Id: I757769d3cac89ebddbdc467f533fed99c74941ee
Convert the return values to values that will be returned through the
callback. Separate the ranges by SUCCESS of the request or ERROR.
Test: CTS tests
Fixes: 199829900
Change-Id: If32083e52ed87a79953c952bbaadd8d977e0226c
The number and size of history tags can be very large, so they
would make the BatteryUsageStats binder parcel excessively large.
Now that they are written into the main buffer, the overall
size of the buffer, including the tags, is capped at 128k.
Bug: 198084535
Test: atest FrameworksCoreTests:BatteryUsageStatsProviderTest
atest FrameworksCoreTests:BatteryStatsHistoryIteratorTest
atest CtsDumpsysHostTestCases:BatteryStatsDumpsysTest
Change-Id: If7c54ab92f9ed92bd77d6a34ceee6e706a8db8fc
Instead of calling the normal path, this change creates
a path to call Activity#onCreate directly and avoid
initializing state when the activity is about to self
finish()
Bug: 201719995
Test: adb shell am start -n
com.android.systemui/com.android.systemui.usb.UsbResolverActivity
Change-Id: I40ee792e341b828a3e288b1fc713f6df13728b4a
To prevent deadlock, freezer had to skip all processes holding any file
locks. As SQLite is using exclusive locks, a lot of applications won't
be frozen. The new logic will detect the lock dependencies and only
unfreeze the processes that block others.
This patch also adds a rewind() function to ProcFileReader class so that
ProcLocksReader doesn't open/close procfs nodes and create new instance
each time /proc/locks is parsed.
Bug: 176927978
Test: atest ProcFileReaderTest
Test: atest ProcLocksReaderTest
Test: verified processes with file locks could be frozen
Test: verified processes with blocking file locks were unfrozen
Change-Id: Ic2c89e6dcc9ee186840731c911be2aa3247b1352
Created CUJ for monitoring jank when switching users, including guest
users, but excluding the "Add User" user journey.
Bug: 200160966
Test: switch users manually, look at logs
Test: atest KeyguardUpdateMonitorTest
Test: atest UserSwitcherControllerTest
Change-Id: I5570133a1f96a58d39a8f053f9f480cdaada8df1
Attributes added to the `library` tag used in AndroidManifest.xml.
They allow to easily and transparently include/exclude a library from
apps for compatibility purposes.
Bug: 191978330
Test: atest com.android.server.pm.parsing.library.ApexSharedLibraryUpdaterTest com.android.server.systemconfig.SystemConfigTest
Change-Id: Ibdde742a05fd670a9aaee5ee77ae25b9c0801f53
To enable more voice-oriented in-app user journeys, Google Assistant
needs to access more information regarding the visible activities
via the Voice Interaction Session. Thus, we provide the APIs to receive
the changed visible activities in Voice Interaction Session.
Bug: 178244510
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I019d09fee8105ae1eadbc76803f46fd8b1948f6b