Commit Graph

12767 Commits

Author SHA1 Message Date
TreeHugger Robot
653dd7b19f Merge changes I0677bca4,I7cad6529
* changes:
  Fix autolaunching.
  Create a PackageMonitor instance for each profile.
2020-01-30 18:15:07 +00:00
Muhammad Qureshi
a6b9b0724c Merge "Use FrameworkStatsLog instead of StatsLog" 2020-01-30 16:40:28 +00:00
Daniel Sandler
2f7640449b Merge "Cherry-pick "action chips in share sheet" from qt-qpr1-dev." 2020-01-30 15:39:19 +00:00
arangelov
7981b1236d Fix autolaunching.
We autolaunch in the following cases:
1. There is only a personal profile, and it has 1 launchable target
2. There are a personal and work profiles, they have 1 launchable
target each, which is the same app. If the app has declared support
for cross-profile interaction, we auto launch that app on the current
profile.

Test: manually tested combinations of test cases with 0/1/2 resolved
apps on personal, 0/1/2 resolved apps on work, with enabled/disabled
cross-profile intents for both directions (work-personal and
personal-work)
Bug: 142537267
Bug: 142538125
Bug: 148536212
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest

Change-Id: I0677bca4dd0ce0412c1c5d386157b94fd87b6706
2020-01-30 13:48:29 +00:00
arangelov
bdb4005601 Create a PackageMonitor instance for each profile.
Bug: 142537267
Bug: 142538125
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest

Change-Id: I7cad6529c168422f68a1366d5c6281af605ca230
2020-01-30 13:47:31 +00:00
Muhammad Qureshi
73107044ce Use FrameworkStatsLog instead of StatsLog
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by *StatsLog.java
that is autogenerated for each module.
This CL replaces some usages of StatsLog with FrameworkStatsLog.

Bug: 145952197
Test: m
Change-Id: Id3e0900a050441b9aef3ee6244759f5098afdfb1
2020-01-29 17:03:56 -08:00
Soonil Nagarkar
b6375a4f7f Create AppForegroundHelper
Create a new helper to deal with application foreground state changes.

1) Rename various Helpers.
2) Move GnssManagerService into location dir.
3) Use new AppForegroundHelper everywhere.
4) Move sendNiRequest to internal API
5) Some refactoring of NetInitiatedActivity

Test: atest AppForegroundHelperTest
Change-Id: Ifffe0e6a34452a18d017c6b190547b904d77b430
2020-01-29 15:23:06 -08:00
Winson Chung
75f5bf33b0 Merge changes from topic "winscope-sysui"
* changes:
  Add initial SysUI trace support
  Update trace buffer to support SysUI & Launcher
2020-01-29 05:04:48 +00:00
Dan Sandler
e3d1993e47 Cherry-pick "action chips in share sheet" from qt-qpr1-dev.
> Action chips in share sheet.
>
> Move the Copy button to a new row of chips below the
> (now larger) preview. Optionally, if a proximity-sharing
> service is installed, show that chip as well.
>
> Bug: 143229724
> Fixes: 144290152
> Test: atest SystemUITests frameworks/base/core/tests/coretests
> Change-Id: I0d6457df85bc937f72ca97da6b4b84b634a90daf
>
> ----------
>
> Exclude nearby_sharing_component from backup test
>
> Fixes: 146019461
> Test: atest SettingsBackupTest
> Change-Id: Ieb953284f2c00d69220e776f2b628f73013140e0
>
> ----------
>
> DO NOT MERGE: Fix alignment of share chips.
>
> Bug: 144290152
> Test: visual inspection in landscape & portrait
> Change-Id: Ib60b7b56bdf23a45c61416b8309a921451010e8e
>
> ----------
>
> Allow nearby sharing to substitute name & icon in chip
>
> meta-data bundle keys (values are resids):
>
>     CHIP_LABEL_METADATA_KEY = "android.service.chooser.chip_label"
>     CHIP_ICON_METADATA_KEY = "android.service.chooser.chip_icon"
>
> Test: manual, confirm that correct name & icon are used
>       and that custom icon is tinted in light/dark theme
>       (and that the copy chip is tinted right, too!)
> Bug: 144290152
> Change-Id: I57157e07630fa8bec3057e6d18336c59944fcb4f
>
> ----------
>
> DO NOT MERGE: Add another exception to the nearby-sharing chip code.
>
> Fixes: 146690046
> Test: Share from Chrome
> Change-Id: I41b3965ca2289f628a2d1de3a6da7daf01385a54

Test: atest SystemUITests frameworks/base/core/tests/coretests SettingsBackupTest
Test: manual sharing
Change-Id: Ibcf36b3c216da8e55597fbd307c9a7780cf571c6
2020-01-28 22:49:13 -05:00
Mady Mellor
bd35832d9b Merge "Bubble API: post update when bubble notification suppression flag changes" 2020-01-28 22:04:38 +00:00
Qingxi Li
64fee3eb04 Merge "Update location permission check for ConnectivityUtil" 2020-01-27 21:50:07 +00:00
Mady Mellor
f44b68378c Bubble API: post update when bubble notification suppression flag changes
When bubbles are expanded or if the user dismisses the notification, the
notification associated with the bubble is suppressed from the shade, but
still technically active / in active notification list because of the
bubble.

We already have a concept of this with isNotificationSuppressed on
BubbleMetadata, this just ensures that the flag is properly updated when
the state changes in System UI. This allows other things showing
notifications (e.g. long press on launcher app icon -> see notifs) to
hide or show notifications consistently with the rest of system ui.

I'm re-using the flag that apps may set to suppress notifications when
they send a bubble that is foreground, since its the same concept.

When this flag state changes a new update is sent with the flag
adjusted.

Added a notification delegate method to communicate the suppression changes
back to NoMan. This is piped through a listener set on Bubble objects.

Test: atest NotificationManagerTest NotificationTest NotificationManagerServiceTest
Bug: 131926652
Bug: 144352570
Change-Id: I25e86849858cdfe2fb81ab51b1ff09980bf70944
2020-01-27 10:46:41 -08:00
Qingxi Li
38c37b5c1b Update location permission check for ConnectivityUtil
This CL does following updates for the ConnectivityUtil class:
1. Remove the current profile check from location permission
check since it's not related to location permission check.
2. Makes all the checking functions to static to avoid memory
allocation
3. Rename the class from util to checker.

Bug: 148180968
Bug: 148232681
Bug: 148233000
Test: atest FrameworksNetTest
Change-Id: Ibf8879fe7dbcecdf766b959cb052d4d825b9b24c
2020-01-27 10:16:51 -08:00
Winson Chung
b53b30cd26 Update trace buffer to support SysUI & Launcher
- Move TraceBuffer to sysui-accessible package, and make it generic
  to support both lite and nano proto callers
- Expose shell command to start/stop sysui tracing

Bug: 144854916
Test: atest TraceBufferTest

Change-Id: Id117024d943f148a91631fd9fcae1fd70fca8ab5
2020-01-27 10:04:58 -08:00
TreeHugger Robot
78ea2e1294 Merge "Sets the home handle default to always visible" 2020-01-27 17:49:46 +00:00
Govinda Wasserman
d21c45fc95 Merge "Add device config to show home over the lockscreen" 2020-01-27 17:17:45 +00:00
Govinda Wasserman
95331c4a90 Sets the home handle default to always visible
This will allow compose to use the handle as a visual cue.

Test: Tested locally
Change-Id: I384c9fba863754486a507f7b293f09a7ba9a6cdd
2020-01-27 11:11:55 -05:00
Winson Chung
b5f2849f4f Add device config to show home over the lockscreen
Test: Manual
Change-Id: I15275485807471e96d3345f10163e4b2dfa96cc0
2020-01-27 09:40:03 -05:00
Bernardo Rufino
ab338ac42c Move text toast creation to system UI
In order to do that, NotificationManager now calls
StatusBar.showToast(), which is in SystemUI. StatusBar then calls a new
component, ToastUI, which is responsible for rendering the toast. The
code for rendering the toast was extracted from the Toast class, so it
should behave identically.

Also refactored the code a bit on NotificationManagerService, creating
two children of ToastRecord (one for custom, other for text toasts).

The change is gated in Toast class in this CL, but it's also gated on
the system server, so apps can't circumvent the background block.

Bug: 128611929
Bug: 144754526
Test: atest android.widget.cts.ToastTest
Merged-In: Id0021cdc6f72f41b55ff1c5a4f09ae7687586460
Change-Id: Id0021cdc6f72f41b55ff1c5a4f09ae7687586460
2020-01-27 11:13:27 +00:00
Ruchir Rastogi
b03066d2b2 Merge "Delete CarStatsPuller class" 2020-01-25 01:16:56 +00:00
Vishnu Nair
f85c92f4f6 Merge "Switch to compositor shadows for PiP and Freeform windows (disabled by default)" 2020-01-25 00:44:04 +00:00
TreeHugger Robot
f82fd3dc81 Merge "Make direct share work with the work profile tab." 2020-01-24 23:50:28 +00:00
Suprabh Shukla
30295f5421 Merge "Add an unsuspend button option to SuspendDialogInfo" 2020-01-24 21:08:21 +00:00
Daniel Chapin
4cdb76143f Merge "Revert "Intercepting activites that could cause lock task mode violation in ActivityStartInterceptor."" 2020-01-24 20:13:15 +00:00
Ruchir Rastogi
f60603ccd7 Delete CarStatsPuller class
The CarStatsPuller class is not needed because CarStatsService will now
directly register the VMS_CLIENT_STATS puller with StatsManager.

Test: m -j
Bug: 148123503
Change-Id: Icd46af829c8f559315f72feab1eda3b687c57148
2020-01-24 12:05:37 -08:00
TreeHugger Robot
ef1a79f91a Merge "Fix sharing files cross-profile from sharesheet and intent resolver" 2020-01-24 17:26:24 +00:00
arangelov
5fc9e7ddee Make direct share work with the work profile tab.
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: Icdda0e760898d895f69befa963d14c370374d1a1
2020-01-24 17:05:35 +00:00
Automerger Merge Worker
3d072827fd Merge "Disable heap pointer tagging on Q or earlier." am: 372a9b99e2 am: d465863e3d am: 0552cba90a
Change-Id: I46616ca8979628e22d4974e915995bdc035b8305
2020-01-24 08:08:28 +00:00
Automerger Merge Worker
54b1d34fc0 Merge changes from topic "add-ikev2-vpn-types" am: adb79e3b39 am: 1ebbd0bb6b am: bb3d6e2e9c
Change-Id: I4ff406efcaada5a9306afc79290cb37bdeef71f2
2020-01-24 07:59:53 +00:00
Zak Cohen
43d858805b Merge "Screenshot helper - add method that allows the caller to supply bitmap." 2020-01-24 03:57:54 +00:00
Automerger Merge Worker
d465863e3d Merge "Disable heap pointer tagging on Q or earlier." am: 372a9b99e2
Change-Id: Id3705a9e0b5d9cc732aac405fa1164c65f7fd7ff
2020-01-24 00:39:03 +00:00
Vishnu Nair
f6ef1c7071 Switch to compositor shadows for PiP and Freeform windows (disabled by default)
Shadows are generated on PiP and Freeform windows by setting an
elevation on the window's DecorView. The elevation is passed back
to wm as surface insets to generate a large enough surface for the
client to draw its content and render shadows around it.

This cl introduces a new settings which overrides the setElevation
call in DecorView and sets a shadow on the task surface. The
elevation of the DecorView and the surface insets will remain unset.

Add a surface crop to the task surface so we have proper bounds
to draw shadows.

Test: go/wm-smoke
Bug: 136561771

Change-Id: Icc45e4fac3d495df5272d2e5f37163b9e7caeb4c
2020-01-23 16:31:02 -08:00
Evgenii Stepanov
372a9b99e2 Merge "Disable heap pointer tagging on Q or earlier." 2020-01-24 00:26:32 +00:00
TreeHugger Robot
614a7316f1 Merge "BatteryStatsManager: Address API council feedback" 2020-01-23 23:30:36 +00:00
Zak Cohen
ebd3b8b1e9 Screenshot helper - add method that allows the caller to supply bitmap.
Add a method to screenshot helper that allows the caller to provide the
bitmap to be treated as a screen shot.
First use Overview can provide a task snapshot to use as a screenshot.

Test: update tests, local
Bug: 145297320

Change-Id: I4d21906212797bf394094d7a29208be02a6bfd7e
2020-01-23 14:59:31 -08: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
Benedict Wong
1ebbd0bb6b Merge changes from topic "add-ikev2-vpn-types"
am: adb79e3b39

Change-Id: I205121bbd8ef8adbe5e7a5ea1c57bbcac0efae0e
2020-01-22 22:09:41 -08:00
Benedict Wong
50b147d827 Add additional fields to VpnProfile for profile-based IKEv2/IPsec VPNs
This commit adds the fields required to support IKEv2/IPsec VPNs. Other
fields will be reused where possible.

Bug: 143221465
Test: Compiles, new tests written for parcel/unparcel, encode/decode
Change-Id: I4c0e8fb934e75548424a15bbfb35c2ea9a3a57bc
2020-01-22 19:23:00 -08: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
Evgenii Stepanov
cba0c36535 Disable heap pointer tagging on Q or earlier.
For testing, this feature can be enabled per-application with
  adb shell am compat 135754954 <app.name>

Bug: 135754954
Bug: 147147490
Test: malloc() returns tagged pointer with the feature enabled

Change-Id: I067b4ba6f5fbfcb8287f0cc07d17978dbe708806
2020-01-22 15:20:54 -08:00
TreeHugger Robot
c4035ef38d Merge "Show RemoteInput images in notification history." 2020-01-22 22:05:00 +00:00