Commit Graph

12283 Commits

Author SHA1 Message Date
Zhen Zhang
4bd260ae68 Create a method for top K targets by using min heap algorithm
This is a in-place sorting method. After sorting, top K targets will be at the first K indexes. Order for other elements will remain same. The method is meant for getting top K ranked targets for Share-sheet.

Bug: 142558305
Test: Passed all unit tests in ResolverActivityTest, ChooserActivityTest
and ResolverListControllerTest
Change-Id: I1b096bb0d7f7bbc102c2fb588c55ace6a20bfc5d
2019-10-16 20:42:36 +00:00
Anna Trostanetski
9969d260ca Merge "ADD owners to compat framework code." am: 2bbb78b5c0 am: 9f074ee036 am: fc581db1d6
am: ca6ea8ffdd

Change-Id: Ia7dd0e8767f9f652b01aaaf319c36e06c41db512
2019-10-10 12:17:44 -07:00
Anna Trostanetski
ca6ea8ffdd Merge "ADD owners to compat framework code." am: 2bbb78b5c0 am: 9f074ee036
am: fc581db1d6

Change-Id: I5f4dd5ff7fdfc4c3c54c6dffd0aff4d7bddeafda
2019-10-10 12:11:11 -07:00
Anna Trostanetski
fc581db1d6 Merge "ADD owners to compat framework code." am: 2bbb78b5c0
am: 9f074ee036

Change-Id: I60d021055eb5df79c71f74c546994670c8cb9b5b
2019-10-10 12:04:06 -07:00
Anna Trostanetski
9f074ee036 Merge "ADD owners to compat framework code."
am: 2bbb78b5c0

Change-Id: I5f89a8141ec57c153fb798cf368f02ecbe2dbbdf
2019-10-10 11:57:04 -07:00
Anna Trostanetski
2bbb78b5c0 Merge "ADD owners to compat framework code." 2019-10-10 18:42:25 +00:00
Anna Trostanetski
3503054191 Merge "Reset app reporting on app launch." am: ccaea274c0 am: 3be71b9df6
am: 7cf4b95c22

Change-Id: I44853dba5d86e799a7b40fdf14d70f8f8b96aaaf
2019-10-10 09:55:27 -07:00
Anna Trostanetski
7cf4b95c22 Merge "Reset app reporting on app launch." am: ccaea274c0
am: 3be71b9df6

Change-Id: I6b7126c8bbbfc010f5b0834b8bc3bd4adb8419d8
2019-10-10 09:49:08 -07:00
Anna Trostanetski
3be71b9df6 Merge "Reset app reporting on app launch."
am: ccaea274c0

Change-Id: I2696f954666aecf22ea8ea77bf5d5ddfaac1461a
2019-10-10 09:42:26 -07:00
Anna Trostanetski
f030c7e31b Merge "Reset app reporting on app launch." 2019-10-10 14:56:47 +00:00
atrost
dd7c8025cd ADD owners to compat framework code.
Test: none
Change-Id: I4f395bbceef1face1e9bb85817ce4c78563d06e8
2019-10-10 14:32:57 +01:00
atrost
893f84d353 Reset app reporting on app launch.
Store the reported changes by app and clear the app info on app launch.
This means that changes reported to the system server would be logged
once per app launch instead of once per device boot.

Bug: 138374585
Test: flash device, run test app
Change-Id: I24f5dc125488c6af3164b6503f236bc3a24e6292
Merged-In: I24f5dc125488c6af3164b6503f236bc3a24e6292
2019-10-10 14:09:30 +01:00
atrost
8e437d45df Reset app reporting on app launch.
Store the reported changes by app and clear the app info on app launch.
This means that changes reported to the system server would be logged
once per app launch instead of once per device boot.

Bug: 138374585
Test: flash device, run test app
Change-Id: I24f5dc125488c6af3164b6503f236bc3a24e6292
2019-10-10 13:44:27 +01:00
Tri Vo
46f79cfd4e Merge "KernelWakelockReader: reuse buffer when parsing" am: 89e09c3918 am: cce09fd862 am: 18f8293574
am: 4c3fb4e648

Change-Id: I9183f3519923ae2fe55229d60b3740c27730c126
2019-10-09 16:32:17 -07:00
Tri Vo
4c3fb4e648 Merge "KernelWakelockReader: reuse buffer when parsing" am: 89e09c3918 am: cce09fd862
am: 18f8293574

Change-Id: I3cefb52654d9482c3fcfb059a5de3ddb493b88d6
2019-10-09 16:24:46 -07:00
Tri Vo
18f8293574 Merge "KernelWakelockReader: reuse buffer when parsing" am: 89e09c3918
am: cce09fd862

Change-Id: I1fb06848129620e985084b1efe375232dc6b0d2e
2019-10-09 16:17:37 -07:00
Tri Vo
cce09fd862 Merge "KernelWakelockReader: reuse buffer when parsing"
am: 89e09c3918

Change-Id: I91a9577d618c64239dd7755d710a98ce085c05ba
2019-10-09 16:10:44 -07:00
Tri Vo
b9ad9a68fb KernelWakelockReader: reuse buffer when parsing
Eliminates 32 kb buffer allocation every time readKernelWakelockStats()
is called.

Test: atest FrameworksCoreTests:KernelWakelockReaderTest
Test: "dumpsys batterystats --checkin" contains kernel wake lock
information.
Change-Id: Ifc7254ab3a5272b056cbc75233aa2dfa8219ea84
2019-10-09 12:40:01 -07:00
TreeHugger Robot
88bfff3262 Merge "Fix "Set as Default" error in ResolverActivity" 2019-10-08 19:22:34 +00:00
hh83.kim
1dcb9f3d9d Fix "Set as Default" error in ResolverActivity
Sometimes, we have seen cases that 'set as default' feature does not work properly in ResolverActivity.
This issue occurs when an activity, with 'exported=false' attribute, is included in the list returned by PackageManager.queryIntentActivities().
By the logics in ResolverListController.java#getResolversForIntent(), the activity is removed from the list.
This creates a difference between the list that ResolverActivity sends to PackageManager when calling addPreferredActivity() and
the list PackageManager maintains. Due to the difference, PackageManager does not set preferredActivity requested from ResolverActivity,
which results the showing of ResolverActivity the next time with same action(even though user has set preferred activity).
To handle this issue, we recommend that the removal logic should be removed from getResolversForIntent() method
because it is already handled in ResolverListController.java#filterIneligibleActivities() through ActivityManager.checkComponentPermission() api.
As the result of that, the list which will be delivered to PackageManager is not changed.

Bug: b/135738126
Test: 1. Install 'JustDial' application via Play store
      2. Try below command to launch ResolverActivity
         adb shell am start –a android.intent.action.VOICE_COMMAND
      3. Pick an item on ResolverActivity, then press 'Always' button
      4. Repeat the second step again.
         (you will see ResolverActivity comes again)
(cherry picked from commit 5cdfeeaca5516a6d64fa259f9a4ffd2955f8d2ab)
2019-10-08 10:32:01 -07:00
Kevin Chyn
f8ff281ae0 Merge changes from topic "biometric-ui-credentials"
* changes:
  Animate panel to transparent if profile is managed
  17/n: Show credential UI if setDeviceCredentialAllowed(true) and no biometrics
  16/n: Add PIN/Password
  15/n: Allow Auth UI to start in credential UI
  14/n: Animate to device credential UI when lockout occurs
  13/n: persist device credential across configuration changes
  12/n: Add LockPatternView for setDeviceCredentialAllowed(true)
  11/n: Animate panel to full-screen when "Use Password" is pressed
  Removing old confirm device credential logic
2019-10-05 02:37:26 +00:00
Kevin Chyn
86f1b8e335 15/n: Allow Auth UI to start in credential UI
If the user is locked out of biometrics, and
BiometricPrompt#setDeviceCredentialAllowed(true), the user should be
shown the credential UI.

This change gives BiometricService the ability to request SystemUI
to show AuthCredentialView without first showing AuthBiometricView.

Bug: 140127687

Test: atest BiometricServiceTest
Test: atest com.android.systemui.biometrics

Change-Id: Ic26986ba044b7992641676c3d3b99fc1395a45b7
2019-10-04 13:13:12 -07:00
Evan Laird
367b6142a6 Move the people filtering to DeviceConfig flag
This way it can be turned on/off without a recompile, and checking the
flag doesn't require a context

Test: adb shell device_config put systemui notifications_use_people_filtering false && adb shell kill $(pid com.android.systemui)
Bug: 140232781
Change-Id: I8ba5e7809dc58e9493397db8447456601a398540
2019-10-04 15:10:10 -04:00
Tobias Thierer
c4ff79cf8a Merge "Construct default MimeMap lazily rather than eagerly." am: 7dbc7ed543 am: 59d2c429bb am: bfd4e55a48
am: b12401b24d

Change-Id: I85934d988f022491b232525f92997c50e7a4ec39
2019-10-04 10:37:44 -07:00
Tobias Thierer
b12401b24d Merge "Construct default MimeMap lazily rather than eagerly." am: 7dbc7ed543 am: 59d2c429bb
am: bfd4e55a48

Change-Id: I8110cd6d464b5d0b79498cb68cf1267402b139d8
2019-10-04 10:15:24 -07:00
Tobias Thierer
bfd4e55a48 Merge "Construct default MimeMap lazily rather than eagerly." am: 7dbc7ed543
am: 59d2c429bb

Change-Id: I023b1d784814499319c62db7e7647ce14e7c0fba
2019-10-04 10:00:29 -07:00
Tobias Thierer
59d2c429bb Merge "Construct default MimeMap lazily rather than eagerly."
am: 7dbc7ed543

Change-Id: I60c43606e536872455e8220745bf9094b0d9f56c
2019-10-04 09:47:38 -07:00
Tobias Thierer
4435606858 Construct default MimeMap lazily rather than eagerly.
A side effect of CL topic r.android.com/q/topic:bug136256059_attempt2
was that the default MimeMap instance is now loaded eagerly (pre-fork)
regardless of whether any app process ends up using it, whereas
previously it was loaded lazily (post-fork) the first time an app
process used it.

This traded off CPU and memory use post-fork vs. pre-fork. Because it
isn't known / hasn't been proven whether and how many app processes
use that instance, the net CPU and memory impact is not known: if at
least one process makes use of a relevant API, the net impact will be
neutral or positive, or else negative.

Until this can be investigated and undergo system health review, this
CL topic changes the behavior back to post-fork lazy loading of the
default MimeMap instance.

Bug: 142019040
Test: Treehugger

Change-Id: I2a3f244240c51e7ada1f41a8abadb946ebcab40b
2019-10-04 16:34:18 +00:00
Tobias Thierer
0cfa891678 Merge "Track MimeMap moving to libcore.content.type." am: 0801b7c222 am: 093c1e4eaa am: b43f746cdc
am: 0935b64e5b

Change-Id: I13997bf4f330d2ceb2d871b291729b4d78569ba2
2019-10-04 06:46:14 -07:00
Tobias Thierer
0935b64e5b Merge "Track MimeMap moving to libcore.content.type." am: 0801b7c222 am: 093c1e4eaa
am: b43f746cdc

Change-Id: Ib18214d3bd9a295a792025cae58102ebf187b0bf
2019-10-04 06:33:10 -07:00
Tobias Thierer
b43f746cdc Merge "Track MimeMap moving to libcore.content.type." am: 0801b7c222
am: 093c1e4eaa

Change-Id: If2b46820dc9ba3d8ba6b8f542521f3818b0074c9
2019-10-04 06:20:07 -07:00
Tobias Thierer
093c1e4eaa Merge "Track MimeMap moving to libcore.content.type."
am: 0801b7c222

Change-Id: I63889b3eedb8f98c99d71172dc5cc32025a8afd4
2019-10-04 06:07:03 -07:00
Tobias Thierer
0801b7c222 Merge "Track MimeMap moving to libcore.content.type." 2019-10-04 12:54:17 +00:00
Tobias Thierer
8edd837b79 Track MimeMap moving to libcore.content.type.
Another CL in this topic moves libcore.net.MimeMap to package
libcore.content.type. This CL updates associated references.

Bug: 136256059
Bug: 124232146
Test: Treehugger
Test: CtsMimeMapTestCases
Exempt-From-Owner-Approval: move affecting imports only
Change-Id: I30aac8b28a1740180ea01834a2bb66b61cb255d4
2019-10-04 12:52:38 +00:00
atrost
f60120aaa2 Merge "Add UID APIs to PlatformCompat." am: 2f44b1ebbd am: db25a1bcf4 am: 6d6dc567d7
am: 448e515ea9

Change-Id: Ibfcb6e4b97d57002cc5d807b29a47f98cc04df54
2019-10-04 05:46:51 -07:00
atrost
448e515ea9 Merge "Add UID APIs to PlatformCompat." am: 2f44b1ebbd am: db25a1bcf4
am: 6d6dc567d7

Change-Id: Ifd4227647321278a67938979a3eb55ef00d09ba5
2019-10-04 05:40:08 -07:00
atrost
6d6dc567d7 Merge "Add UID APIs to PlatformCompat." am: 2f44b1ebbd
am: db25a1bcf4

Change-Id: Ife2d0e4ee60739fecb11035e05f9eb9bb805db28
2019-10-04 05:33:38 -07:00
atrost
db25a1bcf4 Merge "Add UID APIs to PlatformCompat."
am: 2f44b1ebbd

Change-Id: I185109ad67af2bc7ce3e62e14b12bede13afb561
2019-10-04 05:21:05 -07:00
Treehugger Robot
2f44b1ebbd Merge "Add UID APIs to PlatformCompat." 2019-10-04 11:52:54 +00:00
TreeHugger Robot
17d6539e48 Merge "Added Dec and Undec (10 and 11 args) omni functions." 2019-10-04 02:39:51 +00:00
Adam He
8770dc8017 Added Dec and Undec (10 and 11 args) omni functions.
Bug: 141703197
Test: manual verification
Change-Id: I21fd8a854a54383f2debc8f81c64d6af36219f93
2019-10-03 16:18:58 -07:00
Kevin Chyn
8429da2596 14/n: Animate to device credential UI when lockout occurs
Test: manual test with BiometricPromptDemo
Test: atest com.android.systemui.biometrics
Test: atest BiometricServiceTest

Change-Id: I83547c28f1b164dc772b01861430f0d479e47a75
2019-10-03 14:00:17 -07:00
Josh Gao
30641f56c6 Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036 am: 15f8fb42d6 am: 332a53756d
am: cca303ecd9

Change-Id: Iaf3ab6f8baa3cf1e57b546fc9d00b428ad2a6811
2019-10-03 11:18:38 -07:00
Josh Gao
cca303ecd9 Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036 am: 15f8fb42d6
am: 332a53756d

Change-Id: If284835a381f6f7c300c62edc59d1cf9743ac815
2019-10-03 11:11:44 -07:00
Josh Gao
332a53756d Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036
am: 15f8fb42d6

Change-Id: I57ba0d7b301ac4652b3df54672c91dedfe1bb16c
2019-10-03 11:05:21 -07:00
Josh Gao
15f8fb42d6 Merge "zygote: respond and wait for reply to --boot-completed."
am: d34e18c036

Change-Id: I47819fa73d07ecc3507b03ef446f606407830b29
2019-10-03 10:58:24 -07:00
Josh Gao
273613653f zygote: respond and wait for reply to --boot-completed.
The zygote handles requests by polling on its sockets, and then handling
one request for each active socket. However, it does so by reading from
a socket via a BufferedReader, which means that if multiple requests are
written into the socket before the zygote gets a chance to read them,
the zygote reads multiple requests into its BufferedReader, it handles
one request, and then never responds to the request that's buffered,
leaving its client stuck waiting for a response that will never happen.

For most requests, this can't happen, because the client will wait for a
response to be sent from the zygote before sending another request, but
this isn't true for --boot-completed until this patch.

Bug: http://b/141767463
Test: forrest runs of apct/text/text_native_test-cloud-tf
Change-Id: I8b7a80abfd9443d98f8cf5aedb7669b82c0cb84a
2019-10-03 17:18:04 +00:00
atrost
64cacec12b Add UID APIs to PlatformCompat.
Needed for scoped storage (to be used from MediaProvider).
IsChangeEnabled returns true if there are no installed packages for the
required UID, or if the change is enabled for ALL of the installed
packages associated with the provided UID.

Bug: 138275545
Test: Test app
Change-Id: I6785f57e4fcfb92ed7529f4da0a6db6ffe8b3ad4
2019-10-03 15:21:24 +01:00
Taran Singh
c0263d94a1 Merge "Add showInsets method in IWindow" 2019-10-03 11:10:02 +00:00
Tarandeep Singh
0bedd94994 Add showInsets method in IWindow
Add showInsets(types, fromIme) in IWindow in order for WM to be able to request
show for any of the InsetTypes.
Note: This will be used in followup CLs.

Bug: 139487540
Bug: 118118435
Test: Build passing

Change-Id: Ie988d0a234befa530ca236a3bb32c77d8a4dce21
2019-10-01 13:22:55 -07:00