Commit Graph

19459 Commits

Author SHA1 Message Date
TreeHugger Robot
ea4af47814 Merge changes I8e5fe162,Ic780f98a,I8973907c
* changes:
  Collapsed DecoratedCustomView notifications show app name instead of title.
  Fix snooze/bubble button padding
  Fix Gmail undo state.
2020-11-21 00:44:43 +00:00
TreeHugger Robot
76e3e7682a Merge "Allow preload voice recognition service can blame app." 2020-11-20 22:40:16 +00:00
Ashwini Oruganti
cb5e8c5087 Merge "Update the docs for FLAG_UPDATE_CURRENT and FLAG_IMMUTABLE" 2020-11-20 21:30:14 +00:00
Jeff DeCew
fa5c76c245 Collapsed DecoratedCustomView notifications show app name instead of title.
Previously, we never showed a title in the decorations, and
we still don't in the expanded decorations.  Rather than
making devleopers deal with the discrepancy, it's easier to
just show the app name for these views.  It makes them a
tad less desirable, but we could potentially give developers
a flag to opt into the title in the future.

Bug: 163626038
Bug: 173528244
Bug: 173742646
Test: manual
Change-Id: I8e5fe162c1ccdddcd39ea36f2b28fcc6aefd1f83
2020-11-20 14:39:44 -05:00
Jeff DeCew
4d19b03fd5 Fix Gmail undo state.
We forced all notifications to have an expanded
state, but the Gmail undo notification is totally
broken in that case.  This check exempts an obviosuly
bad expanded state from having to exist, fixing
Gmail's undo flow in the process.

Fixes: 173774694
Bug: 163626038
Bug: 173550917
Test: manual
Change-Id: I8973907ceb06ccf06c0a685fc0f2a2d283794fe5
2020-11-20 14:39:43 -05:00
Garfield Tan
943f93a8b7 Merge "Add window focused state to TaskInfo." 2020-11-20 18:33:19 +00:00
Joanne Chung
16617b0d50 Allow preload voice recognition service can blame app.
1. allow preload voice recognition service can blame app.
2. refine duplicate method

Bug: 170795434
Test: manual.
Change-Id: Ided2b19661d937ff0b4ec881f2e629afe47435e5
2020-11-20 12:55:48 +00:00
Stanislav Zholnin
d250fced40 Merge "Migrate PermissionState and AppOps tests to new owners" 2020-11-20 09:40:17 +00:00
Garfield Tan
f677d826f9 Add window focused state to TaskInfo.
Add a helper method Task#dispatchTaskInfoChangedIfNeeded to avoid
checking for isOrganized() every time we need to dispatch a task info
change.

Bug: 165794880
Test: Window focused state is pushed to WM shell.
Change-Id: I3e1272884f4ca9021c82b0df71ff2f7c5a6fea83
2020-11-19 17:46:07 -08:00
Ashwini Oruganti
11a9f15e5f Update the docs for FLAG_UPDATE_CURRENT and FLAG_IMMUTABLE
to add how they interact with each other. This seems to be a common
confusion for users. This change adds more context around what the two
flags mean in terms of allowing changes to a PendingIntent and that it
should be fine to use both together.

Bug: 160794467
Test: Green builds
Change-Id: I66f3744ca95252bdfebf8c9711eec7e8bfd059c8
2020-11-19 15:42:10 -08:00
TreeHugger Robot
4e3d12dd50 Merge "Add PeopleSpaceTile object for UI functionality" 2020-11-19 20:15:38 +00:00
Nate Myren
6156e9810f Merge "Allow exemption for VoiceRecognitionService if no VoiceInteraction" 2020-11-19 19:09:22 +00:00
Anna Zappone
7d7a8b6fa8 Add PeopleSpaceTile object for UI functionality
Primarily based off ShortcutInfo.

Test: PeopleSpaceTileTest
Change-Id: I2292bca47f52d36c3e85cc5c9e10a3b280358253
2020-11-19 17:44:22 +00:00
Bernardo Rufino
f48a5e3d13 Merge "Optionally wait animations on syncInputTransactions/injectInputEvent" 2020-11-19 14:07:13 +00:00
Mariia Sandrikova
08cea83323 Merge "Move TaskInfo comparison from TaskOrganizerController to TaskInfo" 2020-11-19 09:32:32 +00:00
Bernardo Rufino
ab008846a8 Optionally wait animations on syncInputTransactions/injectInputEvent
I need to perform a touch while animating in CTS to test ag/13067140,
but current methods all wait for animations to complete, which defeats
the purpose.

Creating new methods that optionally wait for animations to complete.

Test: atest WindowUntrustedTouchTest on child CL
Bug: 172787052
Change-Id: I4832ea2c62531a73098d2817930638ccb5f40765
2020-11-19 08:30:08 +00:00
Riddle Hsu
6e4f57488d Merge "Add a new launch type for hot start with relaunched activity" 2020-11-19 06:52:27 +00:00
TreeHugger Robot
6b4c503a24 Merge "Adapt margin for actionless notifs with snooze button" 2020-11-18 23:03:51 +00:00
Mariia Sandrikova
1b44edeea9 Move TaskInfo comparison from TaskOrganizerController to TaskInfo
Bug: 170216257
Test: atest WMShellUnitTests
Change-Id: I7ef6913172f57fbfad116a04e9e324ed9dc6535a
2020-11-18 17:09:03 +00:00
Lyn Han
3ff7884df3 Adapt margin for actionless notifs with snooze button
Bug: 171817112
Test: visual
  Expanded hun/shade/ls notif bottom margin looks good
    - with and without snooze button
    - with and without actions

Change-Id: Ifbd57fcf699c431a51c0713ef54126e72d648614
2020-11-18 06:24:20 -08:00
Tiger Huang
2af48c7f99 Merge "Don't handle the system UI visibility at server side" 2020-11-18 13:30:06 +00:00
Treehugger Robot
e02785ee8a Merge "Migrate CALLBACK_ON_CLEAR_CHANGE" am: 6f7c5e0914 am: 62d7bd9555 am: f669aaa6ce am: 4c7226a1a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1492844

Change-Id: I1e9e845e11dcfd764739dd7f6aa1211155326545
2020-11-18 10:48:22 +00:00
Treehugger Robot
4c7226a1a4 Merge "Migrate CALLBACK_ON_CLEAR_CHANGE" am: 6f7c5e0914 am: 62d7bd9555 am: f669aaa6ce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1492844

Change-Id: Ica16e03e57745c946c42d4b8e09385fbac793ae4
2020-11-18 09:58:10 +00:00
Paul Hu
3f3766a881 Merge "Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API" am: c5ec644861 am: cb9a7b819c am: b12dfe489f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466224

Change-Id: Id6b1eab77eee4fb38e9fe8e97bac28c2caec61c0
2020-11-18 09:57:10 +00:00
Treehugger Robot
f669aaa6ce Merge "Migrate CALLBACK_ON_CLEAR_CHANGE" am: 6f7c5e0914 am: 62d7bd9555
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1492844

Change-Id: I40fc10b8f269530f671d8511435c5c62d0c1f655
2020-11-18 09:28:59 +00:00
Paul Hu
b12dfe489f Merge "Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API" am: c5ec644861 am: cb9a7b819c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466224

Change-Id: Ifba72e9bd6cb8551d825898e2ffc8ad34bf238b3
2020-11-18 09:28:18 +00:00
Treehugger Robot
6f7c5e0914 Merge "Migrate CALLBACK_ON_CLEAR_CHANGE" 2020-11-18 09:19:29 +00:00
Paul Hu
c5ec644861 Merge "Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API" 2020-11-18 08:35:15 +00:00
Tiger Huang
44a8e4daf0 Don't handle the system UI visibility at server side
The system UI visibility has been deprecated. Except disable flags, it
should be converted to the new APIs before being sent to WMS. This CL
renames mSystemUiVisibilitiy to mDisableFLags in WindowState.

Bug: 149813814
Test: atest TaskSnapshotControllerTest TaskSnapshotPersisterLoaderTest
Change-Id: I6730ba664359656ee814c7bc959844d6ed4aaeb9
2020-11-18 15:54:09 +08:00
Paul Hu
29f0617cc5 Merge "Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API" 2020-11-18 07:11:39 +00:00
Riddle Hsu
59c2e7cf8a Add a new launch type for hot start with relaunched activity
An existing activity may be relaunched when moving from background
to front if the current configuration is changed and the activity
cannot handle the change.

The relaunch type was reported as a hot start because its process
is alive and the original activity exists. But the relaunch needs to
destroy the original activity and create a new instance, which may
even take longer time than a warm start. So the case should be
separated from hot start.

Also:
- Make WaitResult#launchState is always populated by
  ActivityMetricsLogger, so "am start -W" can get consistent
  launch type.
- Remove dead code in ActivityRecord#ensureActivityConfiguration
  that it already early returns if !attachedToProcess.

Bug: 172528316
Test: atest ActivityMetricsLaunchObserverTests#testLaunchState
Change-Id: I3ef64ce1e23b2f13d42fa2b12bc31c0cdb4652fc
2020-11-18 15:11:20 +08:00
Evan Rosky
dc21941fe4 Merge "Track changes during transitions and report to player" 2020-11-18 01:17:12 +00:00
Stanislav Zholnin
46e15c2cd0 Migrate PermissionState and AppOps tests to new owners
Bug: 173359936
Test: atest AppOpsTests && atest PermissionStateTests
Change-Id: I3b4ba703f6a94c16f23e33f8358e2d5361a934e7
2020-11-18 00:32:42 +00:00
Evan Rosky
7274d2d186 Track changes during transitions and report to player
Current tracked changes include bounds, visibility, and
"existence".

bounds and visibility are fairly straightforward, call
collect() before doing operations and it will record the
state. Once the transition is finished, it will compare
that recorded state with the finished state.

"existence" is more complicated. It's the difference
between show/hide vs open/close. Because Task instances
are basically always around, their existence depends on
the circumstances around when/how activities are started.
For that we have to explicitly indicate when a container
is going to change its existence via
collectExistenceChange().

Bug: 169035306
Test: atest TransitionTests
Change-Id: I78d4cda6b726202507b757f93c742d49e51e2d7b
2020-11-17 15:17:44 -08:00
Mariia Sandrikova
2b54b5d709 Merge "Make positioning in letterbox mode configurable." 2020-11-17 22:45:44 +00:00
Mariia Sandrikova
49fc5569f0 Make positioning in letterbox mode configurable.
Changes:
- Allow to specify in config_letterboxPortraitGravity and config_letterboxLandscapeGravity desired alignment for letterboxed apps.
- Add ADB commands to allow overriding these config values for testing
- Move positioning logic for letterbox mode from WM Core to WM Shell.

Test: atest LetterboxTaskListenerTest LetterboxConfigControllerTest
Test: go/wm-smoke
Test: manual with adb shell dumpsys activity service SystemUIService WMShell (get)set-letterbox-portrait-gravity / (get)set-letterbox-landscape-gravity
Fix: 170216257, 170215849
Change-Id: I8e6392faab05bec1bf61b9691f3bd9b8b09b9621
2020-11-17 20:15:31 +00:00
Jeff DeCew
f4b91ee076 Fix DecoratedCustomViewStyle
* Fix HUN state's end margins
* Restore previous max height of collapsed state
* Restore previous behavior of hiding the progress
  bar if content is greater than ~25dp
* Remove min height which isn't necessary now that
  the largeIcon has moved up a line.
* Fix headerless title's padding with the separator.

Bug: 163626038
Test: manual
Change-Id: I1fa1efa76192f081ac801a732812eef7f5bfa536
2020-11-17 14:38:14 -05:00
paulhu
030fd23caa Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API
Connectivity service is going to become a mainline module which
will not able to access hidden APIs. But it needs
BroadcastOptions#setMaxManifestReceiverApiLevel to restrict the
receiving of CONNECTIVITY_ACTION intent. Thus, expose it as a
system API to support the usage.

Bug: 170593746
Test: atest FrameworksNetTests
Test: atest CtsNetApi23TestCases
Test: atest KeyChainTests
Change-Id: Ic45552174c3f9e74141db4495bb99a582000b574
Merged-In: Ic45552174c3f9e74141db4495bb99a582000b574
2020-11-17 16:10:26 +00:00
paulhu
52437ab083 Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API
Connectivity service is going to become a mainline module which
will not able to access hidden APIs. But it needs
BroadcastOptions#setMaxManifestReceiverApiLevel to restrict the
receiving of CONNECTIVITY_ACTION intent. Thus, expose it as a
system API to support the usage.

Bug: 170593746
Test: atest FrameworksNetTests
Test: atest CtsNetApi23TestCases
Test: atest KeyChainTests
Change-Id: Ic45552174c3f9e74141db4495bb99a582000b574
2020-11-18 00:07:32 +08:00
Jeff DeCew
5185c6bf66 Merge changes from topic "template_redesign"
* changes:
  Update variable names to reduce confusion.
  Fix/hack MessagingStyle notifications
  Reduce notification minimized height
  Fix the placement of the work profile and feedback badges.
  Fix HUNs
  Remove the unneeded icon spacing in the InboxStyle.
  Hide app name from minimized notifications
  Notification Title is 16pt in Big state
  Ensure headerless notification with large icon is big enough.
  Round corners of BigPicture
  Increase the expand button touchable area.
  Remove the reply action entirely.
  Notification template redesign; part 1.
  Remove night-mode override of notification_divider_height
2020-11-17 13:21:53 +00:00
TreeHugger Robot
b56d546518 Merge "Add ability to cancel ANR dialogs" 2020-11-17 06:38:53 +00:00
Christopher Tate
f2c18bbbc4 Defer FGS notification display for a few seconds
When a service is transitioned to the foreground state, we defer display
of its associated Notification for a short time, to reduce user
disturbance in situations where the FGS is short-lived.  Apps can force
immediate display when they know it's relevant, and Notifications known
to correspond to contexts in which immediate display is appropriate -
such as media playback - are not deferred.

The behavior can be disabled or the deferral interval adjusted via
DeviceConfig.

Bug: 171499612
Test: ApiDemos
Test: atest CtsAppTestCases:ServiceTest
Test: atest CtsAppTestCases:NotificationManagerTest
Change-Id: I0cae3dc6f943e99873ed8c1687914ad08ec29b57
2020-11-16 14:43:36 -08:00
Aurimas Liutikas
59d98a07a9 Merge "Remove legacy style metalava suppression" am: e1bb600fc7 am: 66574f225e am: 1c505e8cda
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1421698

Change-Id: Ib1b078a6e6c6e19391277d19c0f8d748eee6300b
2020-11-16 21:40:21 +00:00
Aurimas Liutikas
1c505e8cda Merge "Remove legacy style metalava suppression" am: e1bb600fc7 am: 66574f225e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1421698

Change-Id: Idd656e3803c247b03808259c582599898c064b27
2020-11-16 21:13:46 +00:00
Aurimas Liutikas
e1bb600fc7 Merge "Remove legacy style metalava suppression" 2020-11-16 17:40:07 +00:00
Charles Chen
e9cf1f9847 Merge "Introduce getWindowContextToken" 2020-11-16 08:47:01 +00:00
Alex Johnston
68334bb539 Merge "add MANAGE_CREDENTIALS appop" 2020-11-16 07:48:18 +00:00
Charles Chen
468a11afdd Introduce getWindowContextToken
Also consolidate UI context related flags to ContextType.

Bug: 171280916
Test: atest ContextTest ContextAccessTest
Test: atest WindowContextTest WindowContextTests \
            WindowMetricsTest WindowMetricsTests
Test atest InputMethodServiceStrictModeTest \
           InputMethodMenuControllerTest
Test atest InputMethodServiceTest#testGetDisplay
           StrictModeTest#testIncorrectContextuse_*

Change-Id: I7f3a7f951c664d4c329059942e688ee3a625b992
2020-11-16 14:19:36 +08:00
Jeff DeCew
6f96b0b7c2 Fix HUNs
* Add and prefer a heads up template which is
  the base template + actions
* When a HUN shows a template with a header,
  only allow hiding that header if there is
  no large icon to avoid a visual mess.

Bug: 163626038
Test: manual
Change-Id: Ia42e0a6b1b1ecd4dd438a817f9442a838a2bdb5c
2020-11-13 13:16:02 -05:00
Jeff DeCew
41cdfc0ae8 Remove the unneeded icon spacing in the InboxStyle.
Because the LargeIcon is was moved up a 'line' to
the top of the notification, the only lines which
can intersect it are the header and title lines;
the first line of text from the inbox style no
longer can.  This also sort of depends on
ag/13018219 which fixed the vertical spacing
enough to make this look good.

Bug: 163626038
Test: manual
Change-Id: Ic9ed82eb3c0e9c7e619917351c3461ffe1713857
2020-11-13 13:16:01 -05:00