Commit Graph

12887 Commits

Author SHA1 Message Date
Stanislav Zholnin
4b7fd29ff1 Merge "Stack Trace sampling and reporting." 2020-02-15 04:53:11 +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
Evan Rosky
12a75f325a Merge "SystemUI Split via TaskOrganizer" 2020-02-14 21:44:28 +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
Ivan Lozano
c69853642b Merge "Remove execute-only memory related code." 2020-02-14 18:39:51 +00:00
Stanislav Zholnin
90516b9200 Stack Trace sampling and reporting.
Sampling is done in cycles where length of single cycle is
configurable server side.
During one sampling cycle only one stack trace / message is reported.

Two sampling strategies are used in this CL.

1. Sampling uniformly packages and appops, and waiting only for
messages coming from sampled package (all other packages are
silenced to presereve system resources). All appops are recorded,
but sampled appop has preference and replaces any previous stack
trace / message. This strategy is created to focus on all packages
and all apps uniformly.

2. Creating list of rarely used packages - packages which were not
using any dangerous permissions for more than a week. Any newly
installed app is automatically added to this list, including apps
which were updated. Whenever message is received for rarely used
package, there is 50% probability that this message will replace
whatever is being sampled in current sampling cycle. This strategy
is created to focus on newly installed apps, on apps which are used
infrequently and on apps which use dangerous permissions infrequently.

Bug:136134050
Test: atest android.app.appops.cts.RuntimeMessageCollectionTest
Change-Id: I3109b38bf0482481acf945d5441a26bfe704c9b5
2020-02-14 18:33:30 +00:00
Evan Rosky
bed2d1b57c 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: I103f68030a170e2fd3d8f2125b81cf33af412793
2020-02-14 09:25:43 -08:00
Ivan Lozano
15bdfea216 Remove execute-only memory related code.
The kernel no longer enforces XOM layouts, and the build system no
longer generates XOM binaries. As a result, the zygote code to mark XOM
sections of memory readable for apps with targetSdkVersion<Q.

Bug: 147300048
Test: m -j
Change-Id: I0abb0abb54f8f5a538da9194a900e6a64e574bfe
2020-02-14 11:56:31 -05:00
Derek Sollenberger
db8164c0ac Merge "Move RenderNodeAnimator to android.graphics.animation package" 2020-02-14 16:32:50 +00:00
TreeHugger Robot
94dd284a57 Merge "Fix broken tests and add tests for empty state screens." 2020-02-14 15:31:58 +00:00
Evgenii Stepanov
45c350c0a8 Merge changes from topic "allowNativeHeapPointerTagging"
* changes:
  Add android:allowNativeHeapPointerTagging.
  Refactor NativeHeapTagging compat feature.
2020-02-14 01:41:37 +00:00
TreeHugger Robot
5de200eb17 Merge "Added OWNERS file for inputmethod" 2020-02-13 22:36:46 +00:00
Wale Ogunwale
ecf66058ea Added OWNERS file for inputmethod
Bug: N/A
Test: N/A
Change-Id: I0dd7bad55dec4f2332d7819d4ccb1e0da7a2d9b7
2020-02-13 13:14:24 -08:00
Derek Sollenberger
8c2f6b6e15 Move RenderNodeAnimator to android.graphics.animation package
A wrapper still exists at android.view.RenderNode animator
as it needs access to internals of the view that would violate
the package layering if moved into android.graphics.animation.

This CL also moves the Java and cpp files associated with creating
a native interpolator that can be run directly on the RenderThread.

Bug: 149293249
Test: CtsViewTestCases
Change-Id: I5260331fedbd634cf2f6d6d392941e7284527420
2020-02-13 16:14:06 -05:00
arangelov
34c6ff8436 Fix broken tests and add tests for empty state screens.
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest
Bug: 142537267
Bug: 142538125
Change-Id: Id0562b38fcd2dbdb5e3d58b45e726bafcaed2b31
2020-02-13 18:10:23 +00:00
Jack Yu
59e09ca52a Merge "Added telephony display info support" 2020-02-13 17:42:54 +00:00
Menghan Li
b9d84550d5 Merge "Remove the toast null pointer checker" 2020-02-13 14:49:53 +00:00
Antoan Angelov
be26a656e7 Merge "Autolaunch when active tab has 1 target and inactive tab has 0 targets." 2020-02-13 14:33:24 +00:00
menghanli
1cb9b23177 Remove the toast null pointer checker
The crash happens on the user long press volume key
3 seconds to trigger the accessibility service and pop up toast.

Bug: 142529032
Test: Manual test
Change-Id: I64b939b1efba772a5ea9ca55b00ee1e29ab26f37
2020-02-13 13:33:57 +00:00
Menghan Li
50c2ca9b41 Merge "Refines the hardware shortcut landing dialog behavior" 2020-02-13 06:28:42 +00:00
Jack Yu
73036c4075 Added telephony display info support
Added the new APIs allowing clients like System UI to display
network icons correctly based on the provided telephony display
info.

Test: Telephony sanity tests
Bug: 148540139
Change-Id: I4dfb6eb7a313539e0565a4239d555426f12e503e
2020-02-12 20:31:22 -08:00
Evgenii Stepanov
5750d3b153 Refactor NativeHeapTagging compat feature.
Move the logic to startProcessLocked so that it can use app info/flags.

Bug: 135754954
Test: NFC
Change-Id: Ief86185c6866640700e2548259df9ba1fb617e4d
2020-02-12 17:07:34 -08:00
Alex Buynytskyy
1580e1c391 Merge "Signature streaming from local file, property to disable incremental." 2020-02-12 22:31:01 +00:00
arangelov
f6986d4809 Autolaunch when active tab has 1 target and inactive tab has 0 targets.
Also fixes bug where we autolaunch without waiting for the inactive
tab list to load. If the inactive tab's targets are 0 since they
are not loaded, if the active tab's targets are 1, it would
incorrectly autolaunch.

Test: manually tried attaching a file in gmail with no cross-profile
intents
Fixes: 149383054
Change-Id: I1a2455088762dce7265ae4b7ad2c6bc8b217f99e
2020-02-12 22:12:18 +00:00
Adrian Roos
c80cc85c05 Merge "InsetsAnimation: Fix crash if disabling decor fitting before view is attached" 2020-02-12 21:17:54 +00:00
Alex Buynytskyy
8e9e6a3255 Signature streaming from local file, property to disable incremental.
+Tests

Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Bug: b/136132412 b/133435829

Change-Id: I826900e120c72e7cdd0549c70da28d817982dcd3
2020-02-12 11:24:47 -08:00
Philip P. Moltmann
0946037764 Merge "Revert "Revert "Activity start: Send featureId from context->AppOpsManager""" 2020-02-12 18:52:23 +00:00
Philip P. Moltmann
ee29509ecd Revert "Revert "Activity start: Send featureId from context->AppOpsManager""
This reverts commit e7421e92d9.

Exempt-From-Owner-Approval: revert-revert and only piping anyway
Test: 1:1 revert-revert
Bug: 136595429
Change-Id: I44e5fa2019f5604c6e2c08bdd1967129c64a90a7
2020-02-12 18:51:53 +00:00
TreeHugger Robot
0fe79c3fe2 Merge "Revert "System API used by telephony to bind to WapPushManager app."" 2020-02-12 18:23:59 +00:00
Florian Mayer
fab4628666 Merge "Do not disable tracing in zygote." 2020-02-12 17:28:07 +00:00
Florian Mayer
e38797be84 Do not disable tracing in zygote.
We now use the sequence number of the atrace tag rather than a Binder
transaction, so zygote can observe changes to the tags.

Test: m; flash; adb shell atrace dalvik | grep hprof
Bug: 137366208
Bug: 147667830

Change-Id: I50e32a19c538dd255097c035836504b4746b172b
2020-02-12 16:01:16 +00:00
Antoan Angelov
d60e103d80 Merge "Add empty state screens." 2020-02-12 14:25:02 +00:00
arangelov
590fba384a Add empty state screens.
The added screens are for the following scenarios:
- No resolved apps on the visible tab
- Sharing not enabled by admin for the visible tab for both
directions, work->personal and personal->work
- Work profile is disabled

Other changes in this CL:
- Make the intent resolver height suitable for the empty states
- Handle landscape mode gracefully by hiding the content preview
if the tabs are shown
- Show the content preview view as part of the list view if there
are no tabs present, and above the tabs if tabs are present
- Remove elevation if showing the tabbed view

What's left:
- Finalize strings

Test: manually tested all conditions for the empty state screens
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest
Bug: 142537267
Bug: 142538125

Change-Id: I4e5ab5fa368d2b907e3fa74b00a82d8739e4f229
2020-02-12 12:22:20 +00:00
menghanli
e83358b71b Refines the hardware shortcut landing dialog behavior
Let user can re-show if user click "turn off shortcut" when long press volume key.

Bug: 142529032
Test: Manuel test
Change-Id: I6fbcabcde07706999459c90318d2237b781431e8
2020-02-12 11:17:38 +08:00
Adrian Roos
ec8ac6ba2e InsetsAnimation: Fix crash if disabling decor fitting before view is attached
Bug: 149341851
Test: atest WindowTest
Change-Id: I6a688c493e79c0e95037dcc690c92fb33049dc95
2020-02-12 02:26:43 +00:00
PETER LIANG
0b2c26e421 Merge "Implement and add the bounce fragment type into shortcut menu." 2020-02-12 01:30:59 +00:00
Fiona Campbell
004e36da64 Merge "Add support for brightness as a float" 2020-02-11 18:51:02 +00:00
Peter_Liang
72048e32b2 Implement and add the bounce fragment type into shortcut menu.
Implementation for the bounce fragment.

Bug: 149268000
Test: manual test
Change-Id: Ic8365e0b8e1a860e73a7105e30ea39d78800a9f2
2020-02-11 15:00:00 +08:00
Fiona Campbell
d4eb295196 Add support for brightness as a float
Change the framework to handle brightness as a float rather than an int.

Test: AutomaticBrightnessControllerTest
BrightnessConfigurationTest
BrightnessMappingStrategyTest
BrightnessUtilsTest
DevicePolicyManagerTest
DisplayManagerServiceTest
DisplayTest
DozeScreenBrightnessTest
PowerManagerTest
PowerManagerVrTest
SettingsProviderTest

Exempt-From-Owner-Approval: Changing param from int to float

Change-Id: I413641cd987c5ec8f82753c0388a33f85a9682de
2020-02-10 23:44:40 +00:00
Ben Lin
04c83f6d87 Implement stretch-free resizing for PIP (input side).
This is a feature of two components:
1) Input code that takes user input around the PIP window border and
starts resizing
2) The actual resizing of the PIP task/stack that currently lives in WM,
but will live in SystemUI once migration is done to using Task Organizer

The CL only takes care of #1, the input side living in SystemUI.

Bug: 111426176
Test: Manually drag the corner of PIP window

Change-Id: If4b5e6ea5c482f4fa6eb571b441cf9e6966fbf4b
2020-02-10 15:20:38 -08:00
Meng Wang
9c99325b87 Revert "System API used by telephony to bind to WapPushManager app."
This reverts commit e6a40697e1.

Reason for revert: API review comments

Bug: 148179277
Change-Id: I729e1c27492b25cfcdb4244e294672ba34a7e7ea
2020-02-10 14:42:41 -08:00
Philip P. Moltmann
41308eced1 Merge "Revert "Activity start: Send featureId from context->AppOpsManager"" 2020-02-10 16:31:33 +00:00
Philip P. Moltmann
e7421e92d9 Revert "Activity start: Send featureId from context->AppOpsManager"
Revert "Adjust monkey to changed internal APIs"

Revert "Test featureId is correctly used in startActivity"

Revert submission 10111030-activityStarter_featureId

Reason for revert: presubmit test breakage
Reverted Changes:
Ic7056b492: Activity start: Send featureId from context->AppOp...
I8e2a07da7: Adjust monkey to changed internal APIs
I7a6af6fb1: Test featureId is correctly used in startActivity

Change-Id: I48c55a962c990b22ea49e923baa7c73b121d179b
2020-02-10 16:14:12 +00:00
TreeHugger Robot
f0e9300080 Merge "Statsd logging of notification cancels." 2020-02-09 20:37:30 +00:00
Philip P. Moltmann
6e406c8ae7 Merge "Activity start: Send featureId from context->AppOpsManager" 2020-02-08 22:54:50 +00:00
Philip P. Moltmann
9c5226fe36 Activity start: Send featureId from context->AppOpsManager
The expected usage pattern for noteOp is to get the
Context#getOpPackageName() and Context#getFeatureId() in the calling app
and the call

noteOp(callingPackageName, Binder.getCallingUid(), callingFeatureId)

As the featureId parameter is new this parameter has to been piped all
through from the ...Manager classes running in the app all way deep into
the bowels of the system server.

There is a special featureId==null for the "default" feature. This is
used in two cases:
- In case the system server (packageName == null || packageName ==
  "android") makes a call
- In the case there is no caller. In this case I left annotations in the
  code to make clear that the default feature is used

Raw binder interfaces (defined in AIDL files) are not supposed to be
used by apps. Still historically this has happened and we ended up with
@UnsupportedAppUsage tags in these files. Also AIDL does not support
two methods with the same name but different parameters. I.e. in the
case when I had to add a paramater to a method tagged as UnsupportedAppUsage I
- created a new method ...WithFeature with the additional paramter
- set a maxTargetSDK for the old method and mention the public API to
  use in the deprecation method
This is really not pretty. Once there is no more app using the old
internal API this hack can be removed.

Additionally this change removed all internal calls to
AppOpsService.noteOperation and AppOpsService.checkOperation and
replaces them with the public API equivalent. This sometimes means to
move the resolution of the mAppOpsManager to be lazy.

Exempt-From-Owner-Approval:: Just piping through arguments
Bug: 136595429
Test: atest --test-mapping frameworks/base/services/core/java/com/android/server/am/
      atest CtsAppOpsTestCases added test to cover activity start
      atest WmTests
Change-Id: Ic7056b492cb1c9a79158e6c2b4864898a0eb5b2a
2020-02-08 22:53:43 +00:00
Ben Lin
ec10bfa32d Merge "Refactor TaskPositioner resizing logic into a shareable class." 2020-02-08 05:51:03 +00:00
Songchun Fan
4889c7a823 Merge "Incremental native lib extraction" 2020-02-07 23:32:00 +00:00
TreeHugger Robot
2f2cae9438 Merge "Fix tag skip and add tests for component-override" 2020-02-07 23:28:57 +00:00
Ryan Mitchell
1ba81d6fcf Fix tag skip and add tests for component-override
Add SystemConfig parsing tests for component-override. Also fix an
issue where component-override causes the next tag to be skipped.

Bug: 148297212
Bug: 138458609
Test: atest SystemConfigTest
Change-Id: Ifc0d02f705f3f0ffe710729310779a1d41226acb
2020-02-07 14:13:41 -08:00