Implements basic API's to control windows generating insets in
the new insets world.
Test: CTS tests will be added at some point in the future
Bug: 118118435
Change-Id: I722d2e58c68734ac131b12da3d9978e946292130
This logic will ensure that we have a limit for the number of items we
track to make sure we do not use too much memory.
We still have an overflow per uid in order to properly attribute the cpu
usage to the uids.
Test: atest BinderCallsStatsTest
Change-Id: Ife9f7249bae35d5c61a6d35ac9d25437d213e959
Test: Manualy launch an app
Test: Press home when activity is on top of the stack
Test: Quick scrub
Test: Swipe up on the home button, swipe down
Test: Tap on notification on the shade
Test: atest ActivityLaunchAnimatorTest
Bug: 111514493
Change-Id: Ib7e29e7e07bf2a245ff949373af700b319e273fc
* changes:
3/n: For passive modalities, add plumbing for "try again"
2/n: Multi-modal support for BiometricPrompt
1/n: Move BiometricDialog management to BiometricService
When "try again" is showing, authentication is canceled internally.
BiometricService caches the client's info so that authentication can
be restarted when "try again" is pressed. Because authentication
is not running when "try again" is showing, BiometricService also needs
to have a TaskStackListener so that BP can be dismissed and an error can
be sent to the client when the app loses focus.
IBiometricServiceReceiver has been split into two. One for BiometricPrompt
to receive messages from BiometricService, and another for BiometricService
to receive messages from SystemUI/<Biometric>Services.
When we get locked out, don't send the last onAuthenticationFailed
to the client, since "Authentication failed" will be shown briefly
and be replaced by "Device locked out" which is janky
Bug: 111461540
Test: Tested with requireConfirmation enabled/disabled
Test: Tested onConfigurationChange corner cases, e.g. when "try again"
or "confirm" buttons are showing, rotate the device. Buttons
persist correctly and don't appear when unexpected
Test: Tested task stack corner cases, e.g. when "try again" is showing,
press home button. BP dismisses and client receives ERROR_CANCELED
Test: BiometricPromptDemo receives all callbacks
Change-Id: I62126708ce8db8b358c666a07aa7c39607642c9d
This computes and stores a hash of significant (for PermissionController)
packages state for the time when granting last ran.
Test: - enable DEBUG flag
- using logcat ensure roles granted on first bootloader
- adb reboot
- ensure roles granting skipped
- disable a package
- adb reboot
- ensure roles granting ran on boot
Change-Id: Idaea40c0ea34feaedfbe357627201f85e66876d5
Mostly designed for use by tests, but start using it elsewhere in OS
for consistency.
Bug: 119713234
Test: manual
Change-Id: I803671fd84547b75337bebf00c2fa2bdaf0f72e7
Since not all KEYCODE_MEDIA_* keycodes return true in isMediaKey(),
the naming can give confusion. This CL renames the method to
isMediaSessionKey() and revises its Javadoc.
Bug: 119789707
Test: make -j
Change-Id: I36786ccf5606977e6d971c13d77d950356561bda
This CL starts a journey to discover a brave new inset world. The
path to get us there may be rocky, but it's going to be rocky.
One of the main pledges of the new API is that an app can retrieve
what is causing a certain inset easily. For that, we need to
dispatch metadata who is causing what inset, such that we can query
it from the client side.
Furthermore, the client will be able to manipulate insets directly,
but also listen to animation changes. We don't want to go through
window manager for that, thus, there needs to be a local codepath
from (global window state -> WindowInsets).
Because we have these two requirements, we dispatch the relevant
global window state for insets, represented by InsetsState, and
dispatch it to the client. On the client side we take the frame
and the InsetsState and generate WindowInsets out of it.
Bug: 118118435
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest,
InsetsStateControllerTest
Change-Id: I2bfe9dda376512916261823fc2ee35cbedeb6731
This is added to report clicks on actions buttons to NAS.
BUG: 119010281
Test: atest SystemUITests
Test: atest RemoteViewsTest
Test: atest NotificationManagerServiceTest
Test: Manual. Tapped on the action (both normal and contextual) and
observed the log.
Change-Id: I381994737d8c3185d3fabf9b6c481fd01a89a634
The BiometricDialog management was done in AuthenticationClient, but
this is not great for the following reasons
1) The dialog lifecycle should not be 1:1 tied to the client monitor,
since this restricts flexibility
2) Devices with multiple biometrics implemented on BiometricDialog
will require extra work. Moving the dialog management up one layer
should solve this limitation
BiometricService now sends both its own receiver and the client's receiver
to the appropriate <Biometric>Service. When the client is actually started
by the <Biometric>Service, it will forward the client's (BiometricPrompt's)
receiver to BiometricService. Lifecycle management is currently still in
<Biometric>Service since the platform still uses <Biometric>Service
directly. AuthenticationClient for BP is now started with the wrapper
receiver, which allows BiometricService to handle messages before deciding
if it should forward the message to the client.
Moving lifecycle management to BiometricService is currently not a great
idea since framework doesn't always go through BiometricService.
Also merged IBiometricPromptReceiver with IBiometricServiceReceiver
Bug: 111461540
Test: Negative button works (error received by demo app)
Test: Cancelling via back or tapping gray area works (error received
by demo app), and hardware is no longer authenticating
Test: Dismissing BP via negative button or gray area returns only a single
error and is not followed by ERROR_CANCELED (as expected)
Test: Error messages are delayed when BP is showing, not delayed
when BP is not showing (pre-auth check errors e.g. no hardware)
Test: Lockout works
Test: Lockout counter resets upon successful auth
Test: Keys are unlocked properly for both implicit and explicit modes
TODO: Figure out multi-modal BiometricService / <Biometric>Service
synchronization. Likely we keep the bundle in BiometricService
and send random numbers (identifier) to <Biometric>Service. When
each <Biometric>Service is ready, it should return the number. Once
BiometricService receives all identifiers, it can then notify
all <Biometric>Service to start authenticating.
Change-Id: I2b6fa57ed3c3cbccc7b0be30279f80fa46a8e917
This change removes remaining ASEC-related logic from the framework in
preparation for install refactoring.
Bug: 109941548
Test: install still works
Change-Id: Ic7322038e45c026bcc59800a5a9fafdbb461021f
This is added to report clicks on smart reply buttons to NAS.
Also refactored the code a bit by having SmartReplyView to use
SmartReplies and SmartActions object, rather than passing a long list
of arguments.
Test: atest SystemUITests
Test: Manual. Tapped on the reply and observed the log.
BUG: 111437455
Change-Id: I897fb46a304f4f7b80b2a6bc4db0ac39f6dc6e8f
This will significantly reduce the amount of data we currently collect
with CpuTimePerThreadFreq
Test: build
Change-Id: I3558536a1bda9fb75d652320612cd7ec9ce3bdd0
This reverts commit 474e7bece0.
Reason for revert: Thresholding could cause confusion in data, and doesn't reduce data enough to solve problems.
Change-Id: I5bc8774212aced24e3a07fc3096402708e0d6418
This change updates the permissions design to use app-ops for
controlling write access, which is only extended to the default app
for a particular collection type.
Bug: 119713234
Test: atest android.appsecurity.cts.PermissionsHostTest
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I40811ff175b3b8410b58ed901948a23a56f8a8c2
Change 1/2. Change 2/2 will setup the class loader namespace for
shared libraries.
This change sets up shared libraries class loaders for applications
and for dexopt.
bug: 111174995
Test: DexoptUtilsTest, device boots
Change-Id: Ie9a2b4eaa85cda59951703433f7a2d03bc12095d
By default, the UIDs collected are all system users, i.e. UIDs in the range
[1000, 2000).
Bug: 119089294
Test: KernelCpuThreadReaderTest#testReader_byUids
Change-Id: I162916f2238aad975b657c9299cb9035718768bb
This way when laying out the child views, each view can specify that
they don't want to grow past a certain height.
Bug: 73819520
Test: atest com.android.internal.app.ResolverActivityTest#setMaxHeight
Change-Id: Ibff3609746b4b6ec7b4debd8433487c7fc9ce0fa
BitUtils is a fairly generic place where all framework engineers should
be able to contribute reusable code.
Test: test after merge in gerrit UI
Change-Id: Ibd00f0618e3e85aab466cedc43605115994cca4f
This means that instead of returning all frequencies, we return
KernelCpuReader#NUM_BUCKETS frequencies.
Test: Unit tests for bucket creation and usage in KernelCpuThreadReaderTest
Change-Id: Iea0996f642deecae8ce66e5122045a0694fac03b