Commit Graph

12940 Commits

Author SHA1 Message Date
Automerger Merge Worker
0bdf785b96 Merge changes from topic "settings-vpn" am: 70f90282ef am: ff39b8ba90 am: 752013f696
Change-Id: Idac6e83bab50b818e2776f28da380f08000e2a42
2020-02-19 23:08:32 +00:00
Feng Cao
6c821f6ea1 Merge "Introduces the Bundle to inline suggestions APIs to encode custom UI styling information." 2020-02-19 22:35:42 +00:00
Automerger Merge Worker
ed67786e6b Merge "Consume health HAL 2.1 values from framework" am: 217aadd0c2 am: 28c43860ea am: 8f9d77ae03
Change-Id: I60f9cee5e0ba74349a0448204b0e31d213151e5f
2020-02-19 22:16:25 +00:00
Winson Chiu
633cd037f7 Merge changes from topics "package-parsing-v2.1", "parsing-parsed-package-split"
* changes:
  Remove AndroidPackageWrite
  Migrate to new ParsedComponents and ParseResult
  Split ParsedComponents
  Add ParseResult infrastructure
  ParsingPackage/ParsedPackage test code migration
  ParsingPackage/ParsedPackage split source migration
  Important migration for new ParsingPackage/ParsedPackage split
  Separate ParsingPackage into core and ParsedPackage into server
2020-02-19 22:16:15 +00:00
Evan Rosky
2d88183bde Merge "SystemUI Split via TaskOrganizer" 2020-02-19 18:43:36 +00:00
Feng Cao
36960ee20e Introduces the Bundle to inline suggestions APIs to encode custom UI styling information.
* The bundle will be generated/consumed by the support library.
* More API documentation and example usage will be added later once we have the support library impl ready.
* The old style resource name approach doesn't work due to the potential mismatch in the support library version across the host IME and the platform renderer service, and the non-static nature of the public attribute int id in the support lib.
* The Bundle added to the onCreateInlineSuggestionsRequest() is intended for the platform/ExtServices to communicate the UI versions it supports.
* The Bundle added to the InlinePresentationSpec is intended for the IME to communicate the custom styles for the chosen UI versions.

Test: manual verification, and also atest CtsInputMethodTestCases:InlineSuggestionInfoTest CtsInputMethodTestCases:InlineSuggestionTest CtsInputMethodTestCases:InlineSuggestionsRequestTest CtsInputMethodTestCases:InlineSuggestionsResponseTest
Bug: 146454892

Change-Id: Id7fea32a7550fb924fec811b376790474a7b92eb
2020-02-19 09:42:22 -08:00
Winson
f00c755a23 Migrate to new ParsedComponents and ParseResult
Removes the massive old ComponentParseUtils in favor of
the new split classes.

Cleans up the parsing code to be uniform, removing the
String[] outError pattern in favor of ParseInput.

Bug: 135203078

Test: atest com.android.server.pm

Change-Id: I584ed37d4715300453dbe760d45d1eb4759b3dd3
2020-02-19 08:31:48 -08:00
TreeHugger Robot
d0f257ebb6 Merge "Show a line below the tabs in tabbed view to align with UX mocks." 2020-02-19 13:01:27 +00:00
Antoan Angelov
5562c7e87f Merge "Add metrics for work tab in intent resolver and share sheet." 2020-02-19 10:48:11 +00:00
arangelov
934c64ca39 Show a line below the tabs in tabbed view to align with UX mocks.
When tabs are disabled, the lines are still shown to be consistent
with Q.

Fixes: 149574743
Test: manual

Change-Id: I2307230e86da72a3f7c7d90d1454859490def679
2020-02-19 10:41:30 +00:00
Antoan Angelov
1c2e160fe9 Merge "Disable tabbed view support for UsbResolverActivity." 2020-02-19 10:41:03 +00:00
Winson
5e0a1d5ce2 ParsingPackage/ParsedPackage split source migration
Part of the Parsing/ParsedPackage split into core/server.

This migrates any core/services source with trivially reviewable
changes. Import changes, moving files around, or generally
small single line changes scattered throughout all code that
depended on the old state of the package code.

Bug: 135203078

Test: enumerated in first commit of change ID
		Ib4fe51d729a56bfb0ea1316e577358ba0dfceccf

Change-Id: If091641a81be2d943d1d3e4a3d654e200d0ce59d
2020-02-19 00:29:05 -08:00
Winson
e23ae20e30 Important migration for new ParsingPackage/ParsedPackage split
Part of the Parsing/ParsedPackage split into core/server.

This splits all the "important" changes, or those which change
significant code/logic and that requires a closer look during
review.

Bug: 135203078

Test: enumerated in first commit of change ID
		Ib4fe51d729a56bfb0ea1316e577358ba0dfceccf

Change-Id: Ie0e4394de2b3063121d850060fcd58622511c59d
2020-02-19 00:29:05 -08:00
Automerger Merge Worker
ff39b8ba90 Merge changes from topic "settings-vpn" am: 70f90282ef
Change-Id: If7e8310306889b38527bfab65316a50807814372
2020-02-19 07:51:20 +00:00
Benedict Wong
70f90282ef Merge changes from topic "settings-vpn"
* changes:
  Minor cleanup
  Add support for starting IKEv2/IPsec VPNs from settings
  Add always-on VPN support for platform VPNs
2020-02-19 07:39:41 +00:00
Ryan Mitchell
f2392c6f56 Merge changes from topic "rro_config"
* changes:
  Make overlay config work with immutable non-android overlays
  Add xml configuration of RROs
  Extract system partitions into standalone class
2020-02-19 04:37:26 +00:00
Benedict Wong
24a2be8275 Add support for starting IKEv2/IPsec VPNs from settings
This commit allows the startLegacyVpn() call to start Platform VPN
profiles, allowing Settings to use the IKEv2/IPsec VPN options

When using an aliased private key, the
Ikev2VpnProfile.KEYSTORE_ALIAS_PREFIX must be prepended to the front of
the alias. This will in turn result in the fromVpnProfile() function to
pull the key from the KeyStore, as opposed to the inline-key that the
VpnManager API uses.

Bug: 148991741
Test: FrameworksNetTests passing, new tests added in subsequent CL
Test: Manually tested
Change-Id: Icbca695c353b2e12e99305676404dbf1a4495949
2020-02-19 02:44:34 +00:00
TreeHugger Robot
df0edf1aac Merge "Enable compositor shadows for PIP" 2020-02-19 00:23:56 +00:00
Evan Rosky
af9f27cdc2 SystemUI Split via TaskOrganizer
Use the early TaskOrganizer concepts to implement Split-screen
in system-ui.

This includes changes to both FW and SystemUI. The changes to
FW involve removing the use of split-screen specific behavior (like
minimize dock and direct ordering) and also reducing things that
care about primary vs secondary. It also changed ActivityStack
to inherit bounds from parent** when in split-mode so that sysui
only needs to manipulate the tile and/or reparent stacks to
effect their geometry.

This means a lot of layout logic moves to SystemUI. The bulk of
the work done in ActivityStack which is split-screen related is
moved into SplitDisplayLayout. This basically takes a snapshot of
display configuration and manages the sizes of splits and their
snap targets.

Intermediate dragging of divider bar now only moves root task leashes
around rather than talking to WM. This includes position as well
as crop (which used to be stack crop). Once the user releases
the divider bar, it will calculate (based on snaps) the new
root task sizes and update their configurations via
WindowContainerTransaction. Because the interim updates are only
on the leashes, no configuration updates occur until the end.

Entering/Exiting split-mode is now handled by SplitScreentaskOrganizer#
onTaskInfoChanged. This is effectively a state-machine that
looks at the current split task membership vs. previous and then decides
when to move things into/out-of split tasks and how to coordinate with the
DividerView.

Minimized dock is relegated to a purely system-ui concept. To
accomplish this, **the home *stack* is set to the minimizedhomebounds
by systemui. This means that it's relative position to its parent is
negative! This allows us to leave the split sizes constant, have
their children inherit the "actual" split sizes, but keep the
home stack unchanging in its minimized size. We just adjust the crop
negative to reveal it.

IME handling is done through the same mechanism as app-driven IME
animation... only Divider receives the control instead of the app.
This allows synchronized animation of split tasks with IME. To
account for insets, though, when IME is opened, the bottom stack
will be repositioned in WM.

Bug: 133381284
Test: Manual, use split-screen, rotate device, launch unresizable
      apps in split, use divider snap to close/maximize apps, etc.
Change-Id: I7133e151a1037c42b275b97857936437a7a6725f
2020-02-18 16:19:39 -08:00
Ryan Mitchell
b538e5b021 Make overlay config work with immutable non-android overlays
This change renames staticness to mutability and changes the OMS to
query OverlayConfig. Changing the enabled state of immutable overlays
and changing the mutability of overlays causes the overlays to be
reinitialized and the default-enabled states to be reapplied. The
default-enabled state is applied whenever the settings for the overlay
is initialized.

Bug: 135048762
Test: use package manager to dump overlay paths of package with
      static/immutable overlays
Test: verify "cmd overlay dump"
Test: atest OverlayManagerServiceImplTests
Test: atest OverlayManagerServiceImplRebootTests

Change-Id: I791befee7f4c7c6ab5ad69cd5d1f3d85e7424f96
2020-02-18 16:13:28 -08:00
Ryan Mitchell
9b93942a80 Add xml configuration of RROs
This change adds the ability to configure the priority, default enable
state, and mutability (previously know as staticness) of an overlay.
Rather than overlays configuring themselves, the system can configure
overlays relative to each other.

An example configuration file looks like:
<config>
    <merge path="auto-generated.xml" />
    <overlay package="com.example.one" mutable="false"
             enabled="true"/>
    <overlay package="com.example.two" mutable="false"
             enabled="true"/>
    <overlay package="com.example.three" enabled="true"/>
</config>

The <overlay> tag configures the overlay while the <merge> tag allows
additional configuration files to be included at a position within
the configuration file.

If the configuration file is not present for a partition, the legacy
android:isStatic and android:priority will continue to configure the
overlays in the partition. Once at least one configuration file has
been defined in any partition, strict partition precedence will be
enforced and overlays on separate partitions will no longer be able
to use android:priority to reorder themselves conversely from the
overlay partition precedence.

The order of the system partitions from least to greatest precedence
is system, vendor, odm, oem, product, system_ext.

Bug: 135048762
Test: atest OverlayConfigTest
Change-Id: If57e8caa9b881f9d424ef48bba80b18cc8b7b943
2020-02-18 16:13:22 -08:00
Connor O'Brien
1746a6df24 Merge changes Ie962ddd9,Ie7c0b11a
* changes:
  Use bpf data when available for single-UID cpu stats
  Use bpf data when available for per-UID cpu stats
2020-02-19 00:06:33 +00:00
TreeHugger Robot
7ae03eb898 Merge "Be more consistent with Q when the tabs feature flag is disabled." 2020-02-18 22:59:16 +00:00
arangelov
f163a88595 Disable tabbed view support for UsbResolverActivity.
UsbResolverActivity extends ResolverActivity, but it should never
show a tabbed view if there is a work profile on the device.

Test: none
Fixes: 149749166
Change-Id: I4ea713a32d4b85820e42b4e3ab60c9da54814fdc
2020-02-18 21:44:34 +00:00
Treehugger Robot
28c43860ea Merge "Consume health HAL 2.1 values from framework" am: 217aadd0c2
Change-Id: I5cf49ce94dcb28566bb37edb2583a300630f618e
2020-02-18 21:12:32 +00:00
Evgenii Stepanov
79b70781fd Merge "Refactor NativeHeapTagging compat feature." am: 077e78a71f
Change-Id: I6e51200ae57c78c45c503d481ef66b14eb8544c3
2020-02-18 20:53:51 +00:00
Treehugger Robot
217aadd0c2 Merge "Consume health HAL 2.1 values from framework" 2020-02-18 20:45:15 +00:00
arangelov
4bf1747be7 Add metrics for work tab in intent resolver and share sheet.
Also includes a metric for cross profile app autolaunch.

Fixes: 149696928
Test: manual
Change-Id: Ic8f9819819d9d18d8616eb974580696fcbc26c36
2020-02-18 20:32:54 +00:00
Connor O'Brien
103a7bb6e1 Use bpf data when available for single-UID cpu stats
Update KernelSingleUidTimeReader to read BPF data rather than per-UID
proc files when the BPF data is available. This is implemented by
calling libtimeinstate functions via JNI.
Extend KernelSingleUidTimeReaderTest to exercise both the BPF and proc
file code paths.

Bug: 138317993
Test: KernelSingleUidTimerTest passes
Test: no regression in BatteryStatsTests
Change-Id: Ie962ddd9e30d96aa0fab6104a4164af9ad02f55e
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-02-18 12:25:21 -08:00
Patrick Baumann
f2fe03f588 Adds app enumeration feature
This change adds a new app enumeration feature to system features.

Test: atest AppEnumerationTests
Bug: 149399359
Change-Id: Iaf181a54819343d5531d14142a844acda02b10e5
2020-02-18 12:01:03 -08:00
arangelov
db0c1f18c9 Be more consistent with Q when the tabs feature flag is disabled.
This change involves 2 things:
- Check when there are apps on the other profile when deciding
whether to autolaunch with the tabs disabled
- Only take into account the rebuildInactiveTab result when
the tabbed view is enabled. Otherwise it's always false and
that always calls postRebuildList with false.

Fixes: 149031386
Test: manual
Change-Id: I166b3abca3c0da38b3c496b34f139107f6b56410
2020-02-18 19:53:07 +00:00
Evgenii Stepanov
077e78a71f Merge "Refactor NativeHeapTagging compat feature." 2020-02-18 18:47:55 +00:00
Chalard Jean
b3c546ce0c [NS D03] Migrate the bad wifi avoidance policy
Test: ConnectivityServiceTest
Bug: 113554781

Change-Id: I688593cc0379a0d2042e30fbe83e549dcb02723e
2020-02-18 16:06:10 +09:00
Jorim Jaggi
8ac64bc013 Merge "Revert "SystemUI Split via TaskOrganizer"" 2020-02-17 21:11:06 +00:00
Jorim Jaggi
2a3002a54f Revert "SystemUI Split via TaskOrganizer"
Revert "Update CTS tests for tile-based split-screen"

Revert submission 9964969-sysui_split_screen

Reason for revert:
- Random SysUI crash (ag/10335781)
- Breaks IME tests with new_insets set to 2
- Crashes SysUI in split screen with new_insets set to 2.

Reverted Changes:
I103f68030: SystemUI Split via TaskOrganizer
If6740b7ee: Connect split-screen things to systemui divider
I44f497e7d: Update CTS tests for tile-based split-screen

Change-Id: Ife6878044ff19905ed97b599d8c67f80cb8e399e
2020-02-17 17:10:11 +01:00
Calin Juravle
9fd9baab38 Merge "Pass system server class loader context when asking GetDexOptNeeded" am: d42527b844 am: 7d3380d672 am: 2d5242b680
Change-Id: Ib59bf9c16f7f13a1cbf7cce48e9b56f77364f073
2020-02-17 14:17:41 +00:00
arangelov
7f8743d50c Refresh list on work profile state change.
When the work profile is enabled or disabled
from anywhere on the device, the share sheet and
the intent picker will refresh to either show
the list of work targets or show the empty state
screen that the work profile is not enabled.

Showing that empty state screen also has a
button to enable the work profile. Pressing
it enables the work profile and also refreshes
the list.

Fixes: 149497248
Test: manually toggled the work profile from quick
settings, from the empty state screen button and
from launcher for both share sheet and intent picker.

Change-Id: I25e38b0cb5824ebdcf6255ed1959e9d7c6fac445
2020-02-17 11:52:05 +00:00
arangelov
b20749400c Only change the intent resolver height in tabbed view.
Fixes: 149489404
Test: manual
Change-Id: Idf801794923f249d58bd1caf4ec34f31179c0dd6
2020-02-17 11:50:17 +00:00
Howard Ro
231f41bfcb Merge "Limit metricslogger call into statsdw for events" 2020-02-17 09:00:54 +00:00
TreeHugger Robot
92d21839f3 Merge "Remove FLAG_SHOW_FOR_ALL_USERS to avoid crash in a11y" 2020-02-17 07:29:45 +00:00
Stephane Lee
90bf87449f Consume health HAL 2.1 values from framework
Bug: 148816661
Test: Ensure that there are no issues with the time to full when
charging
Change-Id: Ie21d451432cd65a91303a8faf40df64935f5c4bb
2020-02-15 16:51:02 -08:00
Connor O'Brien
5065db0572 Use bpf data when available for per-UID cpu stats
Update KernelCpuUidTimeReader and its subclasses to support reading
frequency, active & cluster times from BPF maps rather than proc files
on devices that support this approach. BPF-based accounting offers
improved accuracy as it can detect every context switch, whereas the
proc files attribute a full tick period to whatever happens to be
running when the tick occurs.
Add a KernelCpuUidBpfMapReader class modeled on
KernelCpuProcStringReader, with singletons for reading each distinct
set of data. These follow the locking approach used by
KernelCpuProcStringReader to ensure thread safety, but they collect
data by calling libtimeinstate functions via JNI rather than reading
text from proc files. They also provide a getDataDimensions() function
to retrieve information currently provided by the header rows of the
proc files, such as the list of available freqs or the number of cores
on each cluster.
Extend the KernelCpu*TimeReaderTest classes to exercise the BPF path
for each reader class, and add a KernelCpuUidBpfMapReaderTest modeled
on KernelProcStringReaderTest.

Bug: 138317993
Test: KernelCpu*TimeReaderTests and KernelCpuUidBpfMapReaderTest pass
Test: no regressions in BatteryStatsTests
Change-Id: Ie7c0b11a47289e16f72fd6868de4185e858c7e4f
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-02-14 21:01:45 -08:00
Stanislav Zholnin
4b7fd29ff1 Merge "Stack Trace sampling and reporting." 2020-02-15 04:53:11 +00:00
Calin Juravle
7d3380d672 Merge "Pass system server class loader context when asking GetDexOptNeeded" am: d42527b844
Change-Id: I3d8b53f7e039d8d6eb3c8cf7e9bf8e5662ccff49
2020-02-15 01:37:12 +00:00
Calin Juravle
d42527b844 Merge "Pass system server class loader context when asking GetDexOptNeeded" 2020-02-15 01:18:03 +00:00
TreeHugger Robot
1e154d1d63 Merge "Draw shadows in root task instead of leaf task and use EffectLayer to draw shadows" 2020-02-14 23:49:52 +00:00
Calin Juravle
4cae6f7fd0 Pass system server class loader context when asking GetDexOptNeeded
Test: reboot and check system server jars are not dexopted
Bug: 147208643
Change-Id: I6a612d04b08be23984b04e71e1c8938025d5e4ea
2020-02-14 15:05:38 -08:00
Evan Rosky
12a75f325a Merge "SystemUI Split via TaskOrganizer" 2020-02-14 21:44:28 +00:00
Vishnu Nair
1f03c5017a Enable compositor shadows for PIP
Exercise some of the code path while we wait for system health reviews to be finalized.

Test: go/wm-smoke
Change-Id: Ifddd2286ade9683a7d34a74e9075549f9605fa0b
2020-02-14 21:36:55 +00:00
Vishnu Nair
fd6fb67466 Draw shadows in root task instead of leaf task and use EffectLayer to draw shadows
Temporarily disable compositor shadows for freeform until root task has the correct/non-fullscreen bounds.

Fixes: 148807641

Test: adb shell settings put global render_shadows_in_compositor 1
Test: go/wm-smoke
Change-Id: I10371d2a2977bc4d10204d3cf4b052da5165e0e6
2020-02-14 21:36:10 +00:00