Commit Graph

468813 Commits

Author SHA1 Message Date
Connor O'Brien
cd834de67c 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: Ie5fa2605007e8c5f70a0383bf8adbd81d479abfe
Merged-In: Ie962ddd9e30d96aa0fab6104a4164af9ad02f55e
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-02-19 00:22:14 +00:00
Connor O'Brien
57635c976b 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: Ia092e896028e5f647f6c182de05fa76c7e2e3180
Merged-In: Ie7c0b11a47289e16f72fd6868de4185e858c7e4f
Signed-off-by: Connor O'Brien <connoro@google.com>
2020-02-19 00:20:52 +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
Robert Carr
bf01a77453 SurfaceView: Fix BLAST Sync initialization.
When the SurfaceView is moved, we need to detect this and trigger
the ViewRootImpl to use a BLASTSync transaction for the next draw.
First we tried to do this from invalidate but parent invalidation won't
always lead to invalidate and so this doesn't work. Doing it from
updateSurface which is called from a PreDrawHandler ensures we
will be evaluated at least once per draw.

Bug: 146598493
Bug: 149251083
Bug: 149315421
Test: Flip the flag. Play with youtube.
Change-Id: I652eacf1a016f8b65fd754e47d468227bf8ecf1d
2020-02-18 16:17:37 -08:00
Nate Myren
865507a2d3 Add Auto Revoke Enabled settings constant
Add "AUTO_REVOKE_DISABLED" systemApi constant to Settings, which
will be used to read the global state of the auto revoke system.

Test: None
Bug: 146513245
Change-Id: I8072d124adf2808493f2eb4de5e52d87bef57508
2020-02-18 16:15:50 -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
Junyu Lai
cde5e170b0 Merge "[SP12] Remove the usage of getVtDataUsage" 2020-02-19 00:13:02 +00:00
Malcolm Chen
0d3a5aa2aa Add carrier config to skip validation if recently validate.
Bug: 148611362
Test: unittest
Change-Id: I4f4e1f698bf883e6eaf80959f3592562015c70f5
Merged-In: I4f4e1f698bf883e6eaf80959f3592562015c70f5
2020-02-18 16:10:02 -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
Lin Guo
07af69531c DO NOT MERGE Dismiss system dialog
This fixed the keypad remains ON when switch facet issue.

BUG: 130573446, 149228466
Test: Manual

Change-Id: Ia449fb41a03bc02498471ded660d573d5b1ad141
(cherry picked from commit 82298783683ebe82a5847dfd35fc8b3528709930)
(cherry picked from commit ebff32a5d6)
2020-02-18 16:03:49 -08:00
TreeHugger Robot
f51ae98a50 Merge "Separate icon sizes for sharesheet and resolver list." into qt-qpr1-dev 2020-02-19 00:00:15 +00:00
Treehugger Robot
42ab50d14b Merge "Improve BaseBundle#kindofEquals" 2020-02-18 23:56:30 +00:00
Ameer Armaly
cc13292c06 Add passthrough functionality for touch exploration and gesture detection.
Bug: 136131815:
Test: atest GestureManifoldTest AccessibilityGestureDetectorTest TouchExplorerTest
Change-Id: I8c6b7a333dcb9a4949387a7a683e2dc229d2b18f
2020-02-18 23:52:44 +00:00
Rajeev Kumar
bc79dcd87b Framework changes to enable Notification listeners on Android Go.
Bug: 148575561
Test: atest
com.android.server.notification.NotificationManagerServiceTest, atest com.android.server.notification.NotificationTest

Change-Id: I1b24b2c8e9c6dd96dcd7be209bae2df7c0ed76b5
2020-02-18 15:50:27 -08:00
Rambo Wang
ea38e9d935 Add Development option for vendor logging in Settings app
Bug: 148822215
Test: make && make RunSettingsRoboTests
Change-Id: I9f1b7fd4548b809659e4b2ba32d63266eec2e481
2020-02-18 15:41:29 -08:00
Darryl L Johnson
c36398e91a Revert creation of home stack from WindowState#getRootTask().
This causes an issue navigating back home after a restart. The root
cause is still being investigated.

Verified manually and w/ fix of launcher tests.

Bug: 149753418
Test: atest NexusLauncherTests:com.android.quickstep.DigitalWellBeingToastTest
Change-Id: Ied638ccea8854c77d88a805ef79200d5bd46e383
2020-02-18 15:31:12 -08:00
Hui Yu
b1fa029b6c Merge "Create a white list to allow while-in-use permission in FGS." 2020-02-18 23:30:03 +00:00
TreeHugger Robot
3a67ac7f52 Merge changes Id701f7c7,I660bbcd1
* changes:
  Add Bitmap#getHardwareBuffer
  [HWUI] Remove private references to AHardwareBuffer
2020-02-18 23:29:14 +00:00
Hui Yu
ecf81fdc35 Merge "Change isProcStateBackground() cutoff to PROCESS_STATE_BOUND_FOREGROUND_SERVICE" 2020-02-18 23:28:36 +00:00
Jorim Jaggi
2981024f31 Merge "Fix unnecessary onApplyWindowInsets" 2020-02-18 23:12:28 +00:00
Jean-Michel Trivi
0e87bcaf5c Rename AudioDevice to AudioDeviceAttributes
Once AudioDeviceAddress, then AudioDevice, now AudioDeviceAttributes.

Bug: 148565943
Test: atest AudioServiceHostTest#testAudioDeviceAttributes AudioServiceHostTest#testPreferredDeviceRouting
Change-Id: I17b2b8fc6a5eda6ee1176d6aa27ada3cdd820acc
2020-02-18 23:10:46 +00:00
Dheeraj Shetty
08f001595c Revert "Add configs for ePDG"
This reverts commit 81a4f4ee28.

Reason for revert: b/149531704  IKE @SystemApi constants re-exposed (duplicate) as Public API
Bug that introduced the original change(ag/9987427): b/140873586

Bug: 149531704
Change-Id: I7d521269085a5937bd9252438571d5d45f40a1b2
2020-02-18 15:10:01 -08:00
Xiangyu/Malcolm Chen
76e63fe589 Merge "Add carrier config to skip validation if recently validate." 2020-02-18 23:00:15 +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
Nikita Dubrovsky
ac919b0e83 Use DeviceConfig flags for cursor drag and insertion handle gestures
Bug: 149751656
Test: Manually and ran automated tests
  atest FrameworksCoreTests:TextViewActivityTest
  atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: I431dd7c13b573d7acd9ce20e16a6476370202b5f
2020-02-18 14:58:52 -08:00
Jeffrey Huang
52e90024d3 Allow libstatsmetadata to be linked by statsd
Bug: 145923087
Test: m -j
Change-Id: I8ad5453be7aaefd8be9a20539f35de06209060e3
2020-02-18 14:57:20 -08:00
kwaky
3cc9758323 DO NOT MERGE Reflect the selection state that reflects the current task stack upon restarting the Navigation Bar.
Previously, while restarting the Navigation Bar, we omitted the step where we
apply the selection state that reflects the current task stack.

This omission caused CarFacetButtons to lose their selection state on
certain events, such as the day/night toggle.

Bug: 148211695
Test: Manual -- Verify that the selection state is preserved between
day/night toggle.
adb shell dumpsys activity service com.android.car/.CarService day-night-mode day
adb shell dumpsys activity service com.android.car/.CarService day-night-mode night

Change-Id: Ic07b8b66aa531436ce4f23d56bb3c11a79b7cb46
2020-02-18 14:57:00 -08:00
Zhen Zhang
af30b28ef2 Merge "Replace explicit intent with implicit ACTION_TETHER_SETTINGS intent" 2020-02-18 22:56:20 +00:00
Jeffrey Huang
b41dacd813 Allow statsd to link against libstatslog
Bug: 145923087
Test: m -j
Change-Id: I44f8a24284b4ef8445ebb17edac72c33f72e1e39
2020-02-18 14:52:54 -08:00
Sudheer Shanka
34c24fbb17 Read the sessionId value as long.
Bug: 149782008
Test: atest CtsBlobStoreHostTestCases
Change-Id: Ie3df317137fe1b88692e4a43744f66602cb17206
2020-02-18 14:52:28 -08:00
Mike Digman
481cfeaff1 Merge "Separate icon sizes for sharesheet and resolver list." 2020-02-18 22:52:12 +00:00
Robert Berry
a8c7d84013 Increase granularity of gesture dispatch to 60fps
This is essential if AccessibilityService instances want to animate the
gestures being dispatched (e.g., displaying an overlay showing where the
virtual "finger" is moving).

Test: manual
Bug: 149753602
Change-Id: Ic508c6bd8b4cefa052be9adcac749859c382147a
2020-02-18 17:37:30 -05:00
TreeHugger Robot
e49a32946f Merge "Add missing information to dumpsys." 2020-02-18 22:37:06 +00:00
TreeHugger Robot
5f8c6f8828 Merge "Fix ConcurrentModificationException in SyncManager." 2020-02-18 22:36:39 +00:00
Rob Carr
d201386460 Merge "ViewRootImpl: Fix overlapping BLAST Sync issues." 2020-02-18 22:28:17 +00:00
Wei Wang
8fe72a21f1 Revert "Add feature ids to system server services that requset location."
This reverts commit edd1981400.

Reason for revert: Broke git_master mainline_modules.

out/soong/.intermediates/frameworks/base/core/res/framework-res/android_common/manifest_fixer/AndroidManifest.xml:4044: error: unexpected element <feature> found in <manifest>.

Bug: 149778724

Change-Id: Ib743cd9d1f22bbcd9fda885ef4f7e14b2c15f11a
2020-02-18 22:22:16 +00:00
Automerger Merge Worker
ac23b2292d Merge "RingtoneManager: Don't crash if the ringtone doesn't have a numerical ID" am: ff78aab391 am: 0396aae65b
Change-Id: If350c620f7536a3d31adfad503bcbb9d851eac8d
2020-02-18 22:18:49 +00:00
TreeHugger Robot
65ac963706 Merge "Move SBTouchableRegion out of HeadsUpManagerPhone" 2020-02-18 22:16:39 +00:00
Julia Reynolds
dc07d049f6 Sort VICs to the top of the conversation section
Test: atest
Fixes: 149486189
Change-Id: Ic5fe4c6d7d9c910300b4b16cb664ea84c3b2d13a
2020-02-18 22:14:39 +00:00
Benedict Wong
522f3c932d Add always-on VPN support for platform VPNs
This commit allows Platform VPNs to be started as part of always-on
mode.

Test: FrameworksNetTests passing, new tests added in subsequent CL
Test: Manually tested.
Change-Id: I5eda88e5b406a0e425eb7424665cf702e0979324
Merged-In: I5eda88e5b406a0e425eb7424665cf702e0979324
2020-02-18 22:13:31 +00:00
Julia Reynolds
908201e1b0 Optionally make VICs bubble
Test: atest
Bug: 149696991
Change-Id: Iec86ac860a51bcecde70d7abd7feeb5f9319ebfa
2020-02-18 17:13:16 -05:00
Benedict Wong
03bced0a1f Merge "Add always-on VPN support for platform VPNs" 2020-02-18 22:12:51 +00:00
Automerger Merge Worker
0396aae65b Merge "RingtoneManager: Don't crash if the ringtone doesn't have a numerical ID" am: ff78aab391
Change-Id: Ia4af051076066cb3cd66cb5d95162339b989dad4
2020-02-18 22:06:22 +00:00
Patrick Baumann
6565f9636a Merge "Adds app enumeration feature" 2020-02-18 22:02:24 +00:00
Sudheer Shanka
87a88bb886 Add CtsBlobStoreHostTestCases to test_mapping.
Test: atest --test-mapping apex/blobstore
Change-Id: I5f854de9cef8f597fac1a5fa033a5561555f6173
2020-02-18 14:01:50 -08:00
TreeHugger Robot
c7d6a8c1aa Merge "Re-add compile_multilib to statsd apex" 2020-02-18 22:00:58 +00:00
Makoto Onuki
2cddb8a891 Add WTF when a system server wrapper can't be found
Context.getSystemService() shouldn't return null, but sometimes we observer it.
Add WTFs to investigate it.

Bug: 149406139
Test: Boot with "adb logcat | grep -i wtf" and make sure no wtf is logged
Change-Id: I64c6776cedaeb534d98621db2955d585e6846b8d
2020-02-18 13:55:43 -08:00
TreeHugger Robot
36d149c025 Merge "Fix wm test rule to rethrow exceptions and update StubTransaction" 2020-02-18 21:53:49 +00:00
TreeHugger Robot
51ed232c4c Merge "Improve AppOpsManager documentation" 2020-02-18 21:50:46 +00:00