Commit Graph

12873 Commits

Author SHA1 Message Date
TreeHugger Robot
614a7316f1 Merge "BatteryStatsManager: Address API council feedback" 2020-01-23 23:30:36 +00:00
Adrian Roos
1a585bec15 Merge "Window Manager Flag Migration (12/n)" 2020-01-23 16:29:44 +00:00
Roshan Pius
ed8b445e18 BatteryStatsManager: Address API council feedback
Bug: 144925883
Test: Compiles, device boots up & connects to wifi networks
Change-Id: If3e96428057232053b7edcf0442fdc001aa2dc89
2020-01-23 08:12:39 -08:00
TreeHugger Robot
03e931d330 Merge changes from topic "add-work-tab"
* changes:
  Tests for personal and work tab logic.
  Add personal and work tabs to share sheet and intent picker.
2020-01-23 15:30:11 +00:00
arangelov
cf26864a3b Add personal and work tabs to share sheet and intent picker.
Currently both tabs are disabled under the
ENABLE_TABBED_VIEW flag until other issues are fixed.

Things this CL does:
- Add personal and work tab if there is a work profile on device
- Load the sharesheet/intent resolver targets when we
open the relative tab, and only load it the first time
- Always first show the tab for the current profile, e.g. for
work profile we show the work tab first
- Disable ViewPager manual swiping
- Remove resolver list horizontal dividers
- Always show the current profile's last opened app
recommendation

Tests are in the follow-up CL.

Bug: 142537267
Bug: 142538125
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest
Test: manually share with personal and work apps from both
the personal and work profiles.

Change-Id: Ie02c6b1d46b30facc9f1b04691cbcdd4e06b0fa9
2020-01-23 13:55:22 +00:00
Tiger Huang
527244459c Window Manager Flag Migration (12/n)
- Unhide new APIs
- MaxInsets -> InsetsIgnoringVisibility
- Deprecate SystemUI flags
- Deprecate some other stuff

Bug: 118118435
Test: Build, CTS coming soon
Change-Id: I0a0cbdb48258b3779d536668b59e8c88f3c96d18
Exempt-From-Owner-Approval: Trivial rename
2020-01-23 14:11:39 +01:00
Jorim Jaggi
af30559dc3 Merge changes from topic "content_apply"
* changes:
  Force non-floating main app windows to not fit anything
  Introduce Window.setContentOnApplyWindowInsetsListener
2020-01-23 10:52:36 +00:00
TreeHugger Robot
1dfa08957b Merge "Call buildWorkingProcs in dumpProto" 2020-01-23 09:41:30 +00:00
TreeHugger Robot
2a8fae9828 Merge changes from topic "voiceinteraction-model-enrollment"
* changes:
  async enrollment support AlwaysOnHotwordDetector
  add KeyphraseModelManager
2020-01-23 02:46:50 +00:00
Mike Ma
b17f056cfc Call buildWorkingProcs in dumpProto
dumpProto() currently does not dump any processes unless "dumpsys
cpuinfo" is called first, because we did not call buildWorkingProcs
in dumpProto().

Bug: 146086163
Test: Build and dumpsys cpuinfo --proto
Change-Id: I992eff6f429397424165277b7145cef295571982
2020-01-22 18:33:48 -08:00
Nicholas Ambur
f771e6c9f6 async enrollment support AlwaysOnHotwordDetector
Added ability for AlwaysOnHotwordDetector to support async enrollment
performed outside of support detected through KeyphraseEnrollmentInfo.

Bug: 147159435
Test: tested enrollment and availability is updated when enrolling
outside of KeyphraseEnrollmentInfo

Change-Id: Ia5d71e90c062ac100d4c6df760acf0d41920853e
2020-01-22 16:40:18 -08:00
Jorim Jaggi
0da8fd165f Force non-floating main app windows to not fit anything
Since we have a better approach of fitting content instead of
setting them on the layout params
(Window.setContentOnApplyWindowInsetsListener), we can now
simplify forcing of filling the screen:

Instead of clearing the fit types when the private flag is set, we
unset the types and straight out reject any params when the client
would like to fit.

Test: DisplayPolicyTests
Bug: 118118435
Change-Id: I845e6b1c81e29ab66a770891d03c62a32418e8cc
2020-01-23 00:27:58 +01:00
TreeHugger Robot
c4035ef38d Merge "Show RemoteInput images in notification history." 2020-01-22 22:05:00 +00:00
Aran Ink
2e3cc4169d Show RemoteInput images in notification history.
For cases where we can't show images, show "Image inserted" text instead. This will happen for work profile notifications, and for notifications that don't use MessagingStyle.

Test: Updated unit tests for NotificationRemoteInputManagerTest to use new RemoteInputHistoryItem structure, and to ensure support for URIs and mime types. Manual testing to ensure images appear in notification history for MessagingStyle notifications under the primary user, and that "Image inserted" appears for work-profile and non-messaging notifications.

Change-Id: I254b579aa710337039a7def6880f14a61bbd4d53
2020-01-22 15:22:19 -05:00
Jorim Jaggi
7fb715c425 Introduce Window.setContentOnApplyWindowInsetsListener
When root-level content containers fit insets, they used to just
apply and consume the entire system insets. However, with the new
Inset APIs, and with deprecating ADJUST_RESIZE IME flag, we want
to give apps an easy way to customize this behavior.

For that, we introduce Window.setOnContentApplyWindowInsetsListener
that returns what kind of margins/padding should be applied and
what should be dispatched to the content views. This is essentially
a replacement for SYSTEM_UI_FLAG_LAYOUT_* as well as
SOFT_INPUT_ADJUST_RESIZE: It allows apps to choose which insets
should be handled on the window level vs view level.

For that, we mark the window decor views as
FRAMEWORK_OPTIONAL_FIT_SYSTEM_WINDOWS, in order to distinguish the
case when support library calls makeOptionalFitSystemWindows(). This
is because of two reasons:
- We don't want the listener to be invoked twice.
- We can not do the compat ping-pong between onApplyWindowInsets
and fitSystemWindows. This is because during the ping-pong, the
result of the OnContentApplyWindowInsetsListener would be lost.
However, we still need to do the compat ping-pong for
ActionBarOverlayLayout in the support library (until that gets
migrated to use onApplyWindowInsets), so we have this separate
dispatching path that only gets used for framework optional
fitting views.

Test: WindowTest
Bug: 118118435
Change-Id: I4b514addd9e094163062d651972f85615b4a35db
2020-01-22 18:09:04 +01:00
Will Brockman
427b412abf Merge "Add instance IDs to UiEventReported atom." 2020-01-22 14:01:21 +00:00
Tarandeep Singh
bb0e2f753b Pipe windowToken of window requesting IME
It takes time from when IME is requested to the time when IME is ready
to be shown. When its ready to be shown, we need to make sure that
window that requested IME is still the IME target in DisplayContent. The
only realistic way of knowing originating window is passing windowToken
from IMM API.

Bug: 111084606
Test: CtsInputMethodTestCases

Change-Id: Ia49e23dd077d264a58d28a7b8acffde54b7db187
2020-01-21 17:02:22 -08:00
Will Brockman
12282ace8c Add instance IDs to UiEventReported atom.
Also adds InstanceIdSequence infrastructure for generating them, and
fakes for testing.

Bug: 144022566
Test: atest SystemUiTests
Change-Id: Iac524f50a177a77224711585d5127b8f5bb280f1
2020-01-21 11:56:08 -05:00
Peter_Liang
492e70d906 Multiple shortcut menu for android R (8/n).
1. Fix that magnification has different access format from others into setting provider.
     - Replace String with ComponentName
2. Remove legacy png and replace it with vector drawable.
3. Revise strings.
4. Fix that shouldn't remove legacy target item when software button triggered.

Bug: b/147389656
Test: manual test
Change-Id: I733959702b2d520f73a759ec90a20b39193a417b
2020-01-21 14:55:39 +08:00
Shawn Lin
d459dc237c Merge "Add a new flag ALWAYS for layoutInDisplayCutoutMode" 2020-01-20 14:02:57 +00:00
Jorim Jaggi
0865f08f5a Merge "Migrate LAYOUT_STABLE in new insets world" 2020-01-20 13:33:26 +00:00
Jing Ji
e29afc9b7f Add support to send notification from Zygote to system_server
Zygote will send message to system_server on SIGCHILD now.

Bug: 136036078
Test: atest CtsWebkitTestCases
Test: atest CtsHostsideWebViewTests
Test: atest CtsAppTestCases
Change-Id: Ifb385d907018bbe76b2aa81eb09209a77ea9224d
2020-01-17 20:47:53 -08:00
Jorim Jaggi
7f7618748d Migrate LAYOUT_STABLE in new insets world
WindowInsets.getSystemInsets returns the stable insets if the
window has set SYSTEM_UI_FLAG_STABLE set.

Furthermore, consuming stable will also consume system insets, and
consuming system insets will consume stable. However, DecorView
will not longer consume stable.

Bug: 118118435
Test: InsetsStateTest, WindowInsetsTest
Change-Id: I232e90a6ec34036e830a53437cf32a2b794c5257
2020-01-17 22:42:02 +00:00
Automerger Merge Worker
fa5006b7eb Merge "Implement the ThreadPrioritySetter interface" am: 28aec752bd am: dc2aaef2e6 am: e6f0fa0b63
Change-Id: Ie2ea9aa627f2eb187b68af1226bf541458485455
2020-01-17 22:10:49 +00:00
Automerger Merge Worker
dc2aaef2e6 Merge "Implement the ThreadPrioritySetter interface" am: 28aec752bd
Change-Id: I5af163cfa65bd14cf5575d541ac84b84b4d78f23
2020-01-17 20:16:36 +00:00
Christian Wailes
c39334a805 Merge changes from topic "manual-zygote-snap"
am: 391bc94404

Change-Id: I068bfd198f2a3951fca07d623127c7cb1371b80f
2020-01-17 11:51:06 -08:00
Chris Wailes
c57c1c3356 Improved timekeeping logic for USAP Pool refill mechanism.
am: d8ef116993

Change-Id: I4754866a6740ec7dbe0ae46d4b2c463416f08155
2020-01-17 11:50:31 -08:00
Chris Wailes
0186924384 Resets the refill action/timing info after a pool fill event.
am: b28db4abbc

Change-Id: Iab655d93eabe1331d5166365a82dcb7c7e9275ca
2020-01-17 11:49:54 -08:00
Chris Wailes
d5c2d5d792 Make the USAP Pool refill delay configurable.
am: eabbf8720c

Change-Id: Ie07333bd97ba8cbd92744d68e17bbd2a84fe77a1
2020-01-17 11:49:06 -08:00
Chris Wailes
16d1a78e67 Re-adds a trace point that was accidentally removed.
am: 7e9f83e18a

Change-Id: I3a194f8adb2e35280e13c36baffaaa0c5f4c5f87
2020-01-17 11:48:16 -08:00
Chris Wailes
bbfa310ef2 Moved some thread priority changes.
am: 9091be3eb7

Change-Id: Id983d66927e51633742476776d23ce33978e01d1
2020-01-17 11:47:05 -08:00
Chris Wailes
13839cfe41 Adjust Java Language thread priority in new processes.
am: 80993a6e60

Change-Id: I9fc2a68681eb3f39980c45f707581c3a19cdf0d4
2020-01-17 11:45:03 -08:00
Katsiaryna Naliuka
66cd0568e6 Passing shared media URI along with the shared media type to the App Predictor. The URI can be used to generate app/direct share targets by the app prediction services.
Test: flashed locally, verified that Uri gets passed to the locally installed prediction service in the
intent filter; atest IntentTest

Bug: 147206065
:

Change-Id: I948d6a2e9d15dd3d9ab955571412c0f5922c1e23
2020-01-17 15:36:50 +01:00
Rick Yiu
28aec752bd Merge "Implement the ThreadPrioritySetter interface" 2020-01-17 13:32:54 +00:00
shawnlin
d0e23be2e7 Add a new flag ALWAYS for layoutInDisplayCutoutMode
In R, we will allow cutouts on long edges of a display.
We need to add a new flag for this.

Test: atest PhoneWindowTest
Bug: 146875740
Change-Id: Iebb5f14c0a693f8229fef67d80f2afc3029c3deb
2020-01-17 16:29:46 +08:00
Rhed Jao
18dcc695de Merge "Fix a11y shortcut failed to be disabled by the warning dialog." 2020-01-17 08:11:56 +00:00
Chris Wailes
119508293b Adjusts the USAP pool refill mechanism.
This patch adjusts the USAP pool refill mechanism so that it is less
disruptive to launching applications.  Refill events are now delayed
by several (3) seconds if delaying wouldn't cause the pool to be below
the minimum population size.

This patch also adjusts the process priorities for the USAPs and other
processes spawned from the Zygote so that they behave better in the
context they are spawned in.

Bug: 131362095
Bug: 146614089
Test: booted & launched apps & checked logs
Change-Id: I7328f304c9b744cfdbfbdbe522a5f9aeea5233bb
Merged-In: I7328f304c9b744cfdbfbdbe522a5f9aeea5233bb
2020-01-16 15:38:00 -08:00
Chris Wailes
67c2d6c0a9 Change USAP name to application name as soon as possible.
This patch changes the location where the process's name is changed to
that of the application being launched.  It also attempts to use the
package name if the "nice name" is missing.

Test: m & flash & boot
Bug: 146614089
Change-Id: Id3a3d0b2b66d31c48274f8a986e86e9ed1d28f34
Merged-In: Id3a3d0b2b66d31c48274f8a986e86e9ed1d28f34
2020-01-16 15:37:48 -08:00
Christian Wailes
391bc94404 Merge changes from topic "manual-zygote-snap"
* changes:
  Fixed an issue Zygote initialization.
  Improved timekeeping logic for USAP Pool refill mechanism.
  Resets the refill action/timing info after a pool fill event.
  Make the USAP Pool refill delay configurable.
  Re-adds a trace  point that was accidentally removed.
  Moved some thread priority changes.
  Adjust Java Language thread priority in new processes.
  Adjusts the USAP pool refill mechanism.
  Change USAP name to application name as soon as possible.
2020-01-16 19:00:00 +00:00
TreeHugger Robot
8da97bddbd Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master" into stage-aosp-master 2020-01-16 18:29:18 +00:00
PETER LIANG
75d45584a1 Merge "Multiple shortcut menu for android R (7/n)." 2020-01-16 12:05:58 +00:00
TreeHugger Robot
0ca2f2a8bc Merge "Update FLAG_DIR_BLOCK_TREE to FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE" 2020-01-16 09:49:02 +00:00
Peter_Liang
fdc7ecdddf Multiple shortcut menu for android R (7/n).
Support the legacy hardware shortcut can be deleted and
  software shortcut still keep be disabled.

Test: manual test
Change-Id: I0d2d48daa47a3b6f84e108966c8a4e5573cf06e9
2020-01-16 17:38:21 +08:00
Automerger Merge Worker
acc4f31393 Merge "Remove phoneId from ImsUceManager" am: 8478802be5 am: 9995982748 am: 2cd8af1d78
Change-Id: I8c0309448a8abb1a8094b4a82a11db812bfd3ff6
2020-01-16 01:57:01 +00:00
Automerger Merge Worker
2cd8af1d78 Merge "Remove phoneId from ImsUceManager" am: 8478802be5 am: 9995982748
Change-Id: I4f11280d7130d9185615e2ba2116eb06de92fd27
2020-01-16 01:44:39 +00:00
Treehugger Robot
8478802be5 Merge "Remove phoneId from ImsUceManager" 2020-01-16 01:33:03 +00:00
Automerger Merge Worker
a7a2825aeb Merge "Create an until function to check location permission" am: 948c4086af am: b896ed6e19
Change-Id: Ic868fbfa4d9b9199e754c5b6aacf97990245e95e
2020-01-16 01:14:53 +00:00
Treehugger Robot
948c4086af Merge "Create an until function to check location permission" 2020-01-16 00:30:39 +00:00
TreeHugger Robot
2b9e33d039 Merge "Adds a flag to force the Nav Bar handle to remain visible" 2020-01-16 00:25:44 +00:00
Chris Wailes
ce55f80e17 Fixed an issue Zygote initialization.
An assignment to a flag and a call to a function that uses that flag
were in the wrong order.

Bug: 146614089
Test: Treehugger
Change-Id: If046aa62084892b8dae10497f15cf4c685d226db
Merged-In: If046aa62084892b8dae10497f15cf4c685d226db
2020-01-15 16:20:45 -08:00