Commit Graph

10451 Commits

Author SHA1 Message Date
Alison Cichowlas
7b6f3b60a9 Additional activity in new Chooser flow must also forward Results.
Re-enable new Chooser flow.

Bug: 120417119
Test: Attach files in Gmail; ApiDemos.apk Content > Storage > Docs > GET_CONTENT
Change-Id: I4dc093e24c7415e10bfae0598038c3eb87029d5b
2018-12-07 15:06:59 -05:00
Jorim Jaggi
c999d5ee84 Merge "A brave new world for window insets (2 and 3/n)" 2018-12-04 09:44:26 +00:00
Jorim Jaggi
b603095494 A brave new world for window insets (2 and 3/n)
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
2018-12-03 21:53:09 +01:00
Olivier Gaillard
7949061843 Adds an overflow mechanism for binder calls.
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
2018-12-03 11:12:39 +00:00
Lucas Dupin
086c6fc0ae Let launcher modify window corner radius
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
2018-12-02 04:32:13 -08:00
Jeff Sharkey
2ea404fd2a Merge "Method to determine isolated storage mode." 2018-12-01 22:37:35 +00:00
Kevin Chyn
3d9b0fc963 Merge changes from topic "biometric-refactor"
* 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
2018-12-01 05:04:02 +00:00
Eugene Susla
b9df101c9e Merge "Call roles granting only when packages changed" 2018-11-30 23:13:50 +00:00
Kevin Chyn
23289ef7b6 3/n: For passive modalities, add plumbing for "try again"
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
2018-11-30 11:34:35 -08:00
Eugene Susla
abdefbaeeb Call roles granting only when packages changed
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
2018-11-30 10:58:47 -08:00
Misha Wagner
3beb2e460a Merge "Revert "Filter threads that have low total CPU usage for CpuTimePerThreadFreq"" 2018-11-30 18:10:34 +00:00
Jeff Sharkey
10ec9d8a42 Method to determine isolated storage mode.
Mostly designed for use by tests, but start using it elsewhere in OS
for consistency.

Bug: 119713234
Test: manual
Change-Id: I803671fd84547b75337bebf00c2fa2bdaf0f72e7
2018-11-30 10:52:02 -07:00
Hyundo Moon
9a908db9f4 Rename KeyEvent.isMediaKey() to isMediaSessionKey()
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
2018-11-30 13:54:32 +09:00
Adam He
103e62a19f Merge "Added 8th and 9th argument to pooled lambdas" 2018-11-29 19:32:54 +00:00
Jorim Jaggi
9a94afc6ca Merge "A brave new world for window insets (1/n)" 2018-11-29 17:14:15 +00:00
TreeHugger Robot
8ce7d1d992 Merge "Add onActionClicked in NotificationAssistantService" 2018-11-29 15:43:29 +00:00
Jorim Jaggi
f96c90ac6c A brave new world for window insets (1/n)
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
2018-11-29 13:37:43 +01:00
Tony Mak
7d4b3a5f19 Add onActionClicked in NotificationAssistantService
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
2018-11-29 11:43:53 +00:00
TreeHugger Robot
296f530755 Merge "Add a maxHeight LayoutParams for ResolverDrawerLayout." 2018-11-29 00:06:37 +00:00
Adam He
f1fcd494d2 Added 8th and 9th argument to pooled lambdas
Needed for Autofill Field Classification implementation

Bug: 118681526
Test: atest CtsAutoFillServiceTestCases
Change-Id: I0ecebc391a93928618f349a1fd1af6304ee44006
2018-11-28 14:26:37 -08:00
Jeff Sharkey
c583071b97 Merge changes from topic "exifz"
* changes:
  Track attribute ranges, parse additional times.
  Sane undefined behaviors for XmlUtils.
2018-11-28 16:03:04 +00:00
Misha Wagner
ed3d6070c1 Merge "Change the UID filter in KernelCpuThreadReader to only select UID 1000" 2018-11-28 10:37:04 +00:00
Kevin Chyn
e92cdae277 1/n: Move BiometricDialog management to BiometricService
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
2018-11-27 16:26:19 -08:00
TreeHugger Robot
dbbcf07ec5 Merge "Removes ASEC-related logic from the framework" 2018-11-27 22:32:35 +00:00
Patrick Baumann
fc2851e4d5 Removes ASEC-related logic from the framework
This change removes remaining ASEC-related logic from the framework in
preparation for install refactoring.

Bug: 109941548
Test: install still works
Change-Id: Ic7322038e45c026bcc59800a5a9fafdbb461021f
2018-11-27 12:56:14 -08:00
Jeff Sharkey
9bc99f8e50 Sane undefined behaviors for XmlUtils.
They should treat empty strings as undefined, just like null values.

Bug: 111892141
Test: manual
Change-Id: Ia3eadb1cd1562e73cfa786bfa7fec29994e60a7c
2018-11-27 13:38:58 -07:00
TreeHugger Robot
20dbbf22b8 Merge "Add onSuggestedReplySent in NotificationAssistantService" 2018-11-27 19:51:55 +00:00
TreeHugger Robot
fa2b85579e Merge "New Kernel Per-UID CPU Time Readers" 2018-11-27 19:28:24 +00:00
Tony Mak
2999670406 Add onSuggestedReplySent in NotificationAssistantService
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
2018-11-27 18:18:21 +00:00
Misha Wagner
e211934104 Change the UID filter in KernelCpuThreadReader to only select UID 1000
This will significantly reduce the amount of data we currently collect
with CpuTimePerThreadFreq

Test: build
Change-Id: I3558536a1bda9fb75d652320612cd7ec9ce3bdd0
2018-11-27 10:37:48 +00:00
Misha Wagner
9a30c11b47 Revert "Filter threads that have low total CPU usage for CpuTimePerThreadFreq"
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
2018-11-27 10:33:06 +00:00
Jeff Sharkey
9787a9459d Iterate on storage permissions model.
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
2018-11-26 12:00:35 -07:00
Misha Wagner
474e7bece0 Filter threads that have low total CPU usage for CpuTimePerThreadFreq
Test: KernelCpuThreadReader::testReader_filtersLowTotalCpuUsage
Bug: 120016054
Change-Id: If09c8c01e6efffd0d7315613dc7425138528d39c
2018-11-26 16:25:59 +00:00
Marcin Oczeretko
8e90ada67e Merge "LooperStats - add debug entries to output for data validation" 2018-11-23 14:11:40 +00:00
Nicolas Geoffray
850f109ec8 Merge "Start using shared libraries class loader." 2018-11-22 10:24:38 +00:00
Nicolas Geoffray
8d144eb8bd Start using shared libraries class loader.
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
2018-11-22 10:06:41 +00:00
Marcin Oczeretko
d32a513541 LooperStats - add debug entries to output for data validation
Test: UT and manually verified that debug entries are included in
adb shell dumpsys looper_stats

Change-Id: Ie2166974cffd18a719aaa06f6e3525eb0337d2a1
2018-11-21 11:51:16 +00:00
Misha Wagner
b96bd1a7d7 Add Pixel 3 time_in_state format parsing to KernelTimeInStateReader
Bug: 119090941
Test: Unit tests in ProcTimeInStateReaderTest

Change-Id: I598672809ccd44e6035ff7baf9f372a6d6cf211a
2018-11-21 10:37:37 +00:00
Misha Wagner
dc797543b8 Add retrieval of thread CPU data for processes owned by specified UIDs
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
2018-11-21 10:37:37 +00:00
Ben Lin
058ab3eb1e Add a maxHeight LayoutParams for ResolverDrawerLayout.
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
2018-11-20 10:03:32 -08:00
Eugene Susla
9734fa5330 Merge "Remove exclusive OWNERS for BitUtils" am: 26aff41aa5 am: 60e62c4e20
am: 6b833a4df8

Change-Id: I118be8a8b35a860192aeaebbd7364cd1a3cbf28f
2018-11-19 17:54:04 -08:00
Eugene Susla
6b833a4df8 Merge "Remove exclusive OWNERS for BitUtils" am: 26aff41aa5
am: 60e62c4e20

Change-Id: I5ff9051230f1f24277f8c864ab99a400accd4c3d
2018-11-19 17:44:39 -08:00
Treehugger Robot
26aff41aa5 Merge "Remove exclusive OWNERS for BitUtils" 2018-11-20 01:20:44 +00:00
Eugene Susla
a931f9eec0 Remove exclusive OWNERS for BitUtils
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
2018-11-19 14:38:12 -08:00
Misha Wagner
4f8bb6665c Merge "Add frequency bucketing to per-thread CPU usage reading" 2018-11-19 14:45:18 +00:00
Olivier Gaillard
e7ce49d152 Merge "Rename WorkSource methods on Binder and IPCThreadState." 2018-11-19 11:01:23 +00:00
Misha Wagner
0c5edc3647 Add frequency bucketing to per-thread CPU usage reading
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
2018-11-19 10:24:38 +00:00
Peter Collingbourne
31b9aa5d54 Merge "Preserve x18 while preloading SP-HALs in the zygote." am: 23fd045842 am: e03a81cce8
am: ceebc76cb2

Change-Id: Ib2472f7f1d6068f1b232a459a748c441b47e7637
2018-11-15 16:25:47 -08:00
Peter Collingbourne
ceebc76cb2 Merge "Preserve x18 while preloading SP-HALs in the zygote." am: 23fd045842
am: e03a81cce8

Change-Id: I577e0964abbf758234af6f80dcc69a55ee57d736
2018-11-15 16:10:08 -08:00
Peter Collingbourne
23fd045842 Merge "Preserve x18 while preloading SP-HALs in the zygote." 2018-11-15 23:38:36 +00:00