If a notification is marked with category message, then
it is sufficient enough to be deemed a "message" notification.
However, to be considered an important message, we still
check if the message is from the default messaging app and has
category = message.
Change-Id: I4f2b502634b805919bdf8b82e3bdf475c0992bdd
Fixes:76019310
Test: AttentionManagementVerifierActivity
Test: atest services/tests/uiservicestests/src/com/android/server/notification/NotificationComparatorTest.java
Bug: 73299306
Fixes: 73299306
Test: Call LockPatternUtils.clearLock() with wrong password,
make sure device still unlocks after reboot
Change-Id: I640fc62cbe0c0c57e980455d4f499df02dee0832
This imports the keys directly into the keystore of LockSettingsService,
allowing them to be accessed via the RecoveryController getKey method.
This is better as it does not expose raw key material to any app.
Bug: 74345822
Test: runtest frameworks-services -p \
com.android.server.locksettings.recoverablekeystore
Change-Id: I4991b0cff1d2fa2e5bd0b53a71c096499e93e98b
Imagine the scenario where three IMEs are installed, and only the last
two are enabled:
IME A:
* a pre-installed IME
* has a subtype [mode="keyboard" && isAuxiliary=false]
* disabled by user (hence not included in ENABLED_INPUT_METHODS)
IME B:
* a pre-installed IME
* has a subtype [isAuxiliary=true]
* currently enabled (included in ENABLED_INPUT_METHODS)
IME X:
* not a pre-installed IME
* has a subtype [mode="keyboard" && isAuxiliary=false]
* currently enabled (included in ENABLED_INPUT_METHODS)
In this scenario, when the IME X is uninstalled, the current
implementation of InputMethodManagerService (IMMS) does not try to
hard reset enabled IMEs because there is still one enabled IME, even
though it is an auxiliary IME.
This can, however, be problematic because an auxiliary IME is just a
supplemental IME and user may not be able to easily access the UI to
re-enable non-auxiliary IME such as IME A. For instance, on the lock
screen there is no way to manually re-enable the IME A.
With this CL, every time the available IME list is updated, IMMS
ensures that at least one non-auxiliary IME is enabled. If no
non-auxiliary IME is enabled, then IMMS tries to pick up one from the
pre-installed IME by using the same logic when choosing the default
enabled IMEs for the hard-reset scenario.
Bug: 71509065
Fix: 71509065
Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodUtilsTest
Test: Manually verified in the above scenario
Change-Id: I88c69f548526b35f0e4ba37489365b2433373b04
This CL also adds an alias param to the RecoverySession#start method.
Bug: 76033708
Test: runtest frameworks-services -p \
com.android.server.locksettings.recoverablekeystore
Change-Id: I870f4f89bd6e319e1687a981aa04af0d23f3c922
The service is meant to replace the PendingIntent based API. Once all
users of the PendingIntent based API switched the PendingIntent based API
will be removed.
To have as little as possible impact on the whole SoundTrigger framework
the RemoteSoundTriggerDetectionService class implements the same
interface as the PendingIntent based class. Hence the exising code has
very little change. Further once the old code can be removed the amount
of changed (and added) code is limited.
The RemoteSoundTriggerDetectionService -> SoundTriggerDetectionService
is a vanilla as possible service implementation. The special behaviors
are:
- The system holds a wakelock while service operations are in progress
and the service is bound as foreground. Hence the service can e.g.
listen to the microphone.
- Service operations have a certain amount of time they are allowed to
run. Once every operation is either finished or the the operation
exceeded the allotted time, the system calls onStopOperation for each
still pending operation. This is a similar model as for the commonly
used JobService.
Please note that if the time allowed for an operation is 15s and
op1 was run as 0si, and op1 was run at 5s, the service is allowed to run
until 20s. Hence _both_ onStopOperations will happen at 20s. This is
done for ease of implementation but should not give the service more
power than calling onStopOperation exactly 15s after each operation is
triggered.
- If an operation is done before the allotted time is reached, the
service can declare the operation as finished manually by calling
onOperationFinished. This is a call back into the system, hence a
'client' binder is sent to the service. If the operation is finished
by calling this method onStopOperation will not be called.
- As the service instance might be killed and restored between
operations we add a opaque bundle 'params' to each operations. The users
of the API can use this to send data from the start command to the
operations. It can also just be set to null. The params are not meant to
store changing state in between operations. Such state needs to be
persisted using the regular methods (e.g. write it to disk)
- A service can be used for multiple recognition sessions. Each
recognition is uniquelity defined by its sound model UUID. Hence each
operation gets at least tree arguments: Operation ID, sound mode UUID, params
- As a small optimization the params are cached inside of the service
instance.
The time allowed for each operation is in a @SystemAPI global setting,
so the service can make sure it finishes the operations before they are
stopped. It might take some time to deliver the operations via the
binder, hence it is not recommended to try to use every last ms of
allotted time.
Test: atest SoundTriggerDetectionServiceTest (added in separate CL)
atest android.provider.SettingsBackupTest
Change-Id: I47f813b7a5138a6f24732197813a605d29f85a93
Fixes: 73829108
This change takes care of the flow from WindowManagerService to
PinnedStackController, all the way to PipTouchHandler. It also
introduces a WindowManager hook that allows Launcher to pass in
shelf visibility and height. A separate change is made to send
signals from Launcher to SysUI. (ag/3724896)
Bug: 73961893
Change-Id: I2ff54e78bc2dc35c806b902464048b051a4d6394
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerPinnedStackTests
Atom definitions for MobileConnectionStateChanged and
MobileRadioTechnologyChanged
Also cleans up batterystats.
Bug: b/72320589
Test: verified logs appear in adb logcat -b stats
Change-Id: I9feb258cf6dd4a8c8bf1cffc9566b5d0a851a9fa
Both STATSD and batterystats need to read uid cpu info. However, uid cpu
stats needs to be cleared from time to time to conserve memory. To
resolve this race condition, only batterystats will remove uid stats,
both from readers and from the kernel, also with a delay, so that STATSD
can access such info before it is removed.
Refactored readers to reuse some common code. Also removed string reader
from KernelUidCpuFreqTimeReader completely since binary reader has been
working fine for a while.
Change-Id: I209bdcec642e1a29a44b566ce98ebbfaaacb4e6a
Fixes: 72172569
Test: BatteryStatsCpuTimesTest
Test: KernelUidCpuActiveTimeReaderTest
Test: KernelUidCpuClusterTimeReaderTest
Test: KernelUidCpuFreqTimeReaderTest
It tracks binder calls into the system server and reports
statistics about CPU time spent per call on multiple dimensions,
e.g. uid or call description.
Usage: dumpsys binder_calls_stats
Overhead: ~0.5% per binder call (if enabled)
Test: manual
Bug: 75318418
Change-Id: I13b854f67f8fd1c9f985b8e45f74dcba2e73b9cb
When the user triggers lockdown the device is put into a secure state,
beyond disabling less secure unlock modalities this should also disable
notifications so that data is not leaked despite the device being
strongly locked.
Fixes: 74564088
Test: Entered lockdown, verified notifications are no longer displayed
on the lockscreen
Change-Id: I4188c36b11a1b0cd496b8032bd246f0413c911c5
In the kernel code, there is a constant FUSE_MAX_PAGES_PER_REQ which
limits the size of requests to 128KB.
Bug: 74725300
Test: atest android.os.storage.cts.StorageManagerTest
Change-Id: I6776a409ea68da946bb58e1a933f51c68cb1a99a
Extracts an abstract class to observe changes in backup parameter settings that
are stored as a comma-separated key value list. This class is
responsible for registering and unregistering a content observer on the
setting and updating local references to the parameters.
Refactor BackupManagerConstants and LocalTransportParameters to use this
implementation. This will also be used for the new backup timeout
setting.
Bug: 74346317
Test: 1) m -j RunFrameworksServicesRoboTests ROBOTEST_FILTER=BackupManagerConstantsTest
2) gts-tradefed run commandAndExit gts-dev -m GtsBackupHostTestCases -t com.google.android.gts.backup.TransportFlagsHostSideTest
Change-Id: Id4c50fbcf7479c925515887e3fa70e166dd9955c
Prepend relevant meta key names (such as Ctrl+) to the shortcut
displayed in a menu.
Do not prepend "Menu+" if the device does not have a hardware Menu key.
Bug: 31045453
Test: run ApiDemos (MenuInflateFromXml), select "Shortcuts", observe
Ctrl+ prepended to shortcuts.
Change-Id: I1a38bd1baf069dd1adb24a26f89c6db6390b8b8d
(cherry picked from commit 0cc2c6b190)
Remove the IPC interfaces so these APIs are only available to other
services running inside system server process only.
Bug: 62264551
Test: runtest frameworks-services -p com.android.server.locksettings
Change-Id: Ic7ac5df5fb977bc68a2c4daafaa3cdaf3ba66fcd
This CL updates both the magnifier and the floating toolbar to use the
dialogCornerRadius attribute for the corner radius of their windows. In
both we use its value defined in the default device theme, rather than
the value defined in the application's custom theme.
Bug: 70848492
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Ifcf4cff1f38fd18b7dbb4c1802390e3beb92cd3c
(cherry picked from commit 3dcbc2112d)
Merged-In: Ifcf4cff1f38fd18b7dbb4c1802390e3beb92cd3c
Vendors are allowed to customize these systemconfig tags only.
<library>
<feature>
<privapp-permissions>
This is because the systemconfig tags are essentially the part of system
<-> vendor interface and thus need to be stable (or evolve in a backward
compatible manner) across several Android releases and we would like to
keep the interface as small as as possible.
However, since vendors were allowed to use more tags (like <permission>,
<app-link>, <default-enabled-vr-app>) in Oreo and Oreo-MR1, this
limitation is applied only for newly launching devices whose first API
level is equal to or greater than P.
Bug: 70821981
Test: wahoo is bootable (launched with Oreo)
Test: crosshatch is bootable (launched with P)
Test: adb logcat -s SystemConfig does not show that a tag is not
supported
Change-Id: I371b93a80f3d9728ea6d35022081776a8658d9f3
/odm is a vendor partition other than /vendor. Both partitions are for
HW-specific modules such as HALs. The difference is that /odm is owned
by ODM (usually device manufacturer which designs the board), whereas
/vendor is owned by SoC manufacturer. In other words, /odm partition is
for board-specific customization to the /vendor partition.
Since apps can exist in /vendor/app and /vendor/priv-app, the same has
to be supported for /odm partition.
Bug: 71366495
Test: m -j
Teet: cd frameworks/base/tests/OdmApps; atest .
Change-Id: I1ec8b22b080efdefd67a45ce9c7aeaa2aef350e0
- Check audio attributes on the notificationrecord, not the
notification (to take into account the notification channel audio)
- Allow notifications that use messaging style to be considered a
message for dnd
Test: runtest systemui-notification
Change-Id: I8e6a86ed62089a53fe71000e6d9da00f1c54b59e
Fixes: 74243745
Fixes: 74311423
Bug: 74208750
Test: run android.widget.cts.PopupMenuTest on a large screen device
such as hikey960.
Change-Id: I1c4bca3cfecb012432e6cb89cb4cc0177ccc04f9
This reverts commit d5f7ed9fe9 [1].
Reason for revert:
This is the part 2 of a series of reverts to unlaunch Bug 25752812,
which aimed to improve UX but did not work well.
See I7a2ed6dd39dcd8207d3d94e12cd01d5d67ba4bb5 for the detailed reason
of revert.
[1]: Ie88ce1ab77dbfe03ab51d89c1dc9e0a7ddbb3216
Bug: 66498367
Test: Manually done
Change-Id: I207919e3cb081d77712371f58463a5d423717c8f