Commit Graph

19435 Commits

Author SHA1 Message Date
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
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
Paul Hu
29f0617cc5 Merge "Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API" 2020-11-18 07:11:39 +00:00
Evan Rosky
dc21941fe4 Merge "Track changes during transitions and report to player" 2020-11-18 01:17:12 +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
Jeff DeCew
b90803f72b Hide app name from minimized notifications
Bug: 163626038
Test: manual
Change-Id: Ic579e2640ad4d2d11bdce856a46e8aa9d00c9c92
2020-11-13 13:16:01 -05:00
Jeff DeCew
1242ae9220 Remove the reply action entirely.
Bug: 163626038
Test: manual
Change-Id: I28992441300ffdecc58900730ff9d858d6c0a009
2020-11-13 13:16:00 -05:00
Jeff DeCew
1842262813 Notification template redesign; part 1.
Known issues:
* Sub-par dyson animation
* Sub-par animation of text in the title
* Notification height limits not yet adjusted
* Decorated custom view height limits not yet updated
* HUNs may need to get their own headerless template
* Messaging style notifications are not yet headerless
* Possible [de]colorization bug for grouped icons
* Some notifications still not always expandable

Bug: 163626038
Test: Manual, visual testing
Change-Id: I9e7e2fd689938a13e042c8f6319bd7d0d2252781
2020-11-13 13:16:00 -05:00
Oli Lan
ab89267d93 Merge "Enable instrumentation of system server on debuggable devices." 2020-11-13 17:51:09 +00:00
Aurimas Liutikas
9079c1754f Merge "Remove legacy style metalava suppression" 2020-11-13 16:33:52 +00:00
Treehugger Robot
cfd1648fa1 Merge "Remove pi.append_native_lib_paths property" am: f7d62644d6 am: 2407fa17f4 am: dc186b4d44
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498476

Change-Id: I5e820e85b0de85649039daf468239d693c390ea2
2020-11-13 08:24:51 +00:00
Treehugger Robot
dc186b4d44 Merge "Remove pi.append_native_lib_paths property" am: f7d62644d6 am: 2407fa17f4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498476

Change-Id: I36a851682d0d2f53af254a3c0286ae230d9c27d1
2020-11-13 08:07:14 +00:00
Patrick Baumann
2288e2adff Remove pi.append_native_lib_paths property
This change removes the "pi.append_native_lib_paths" property added as a kill switch for a feature that has been out in the wild now for several releases now.

Change-Id: I21f9d158f60d0cf47e3631bb37ece711b3450494
Merged-In: I21f9d158f60d0cf47e3631bb37ece711b3450494
Fixes: 173103133
(cherry picked from commit 22efaa8422)
2020-11-13 13:27:59 +09:00
TreeHugger Robot
fd53945195 Merge "Remove pi.append_native_lib_paths property" 2020-11-13 03:24:38 +00:00
Aurimas Liutikas
46a165215b Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Merged-In: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:30:12 -08:00
Aurimas Liutikas
1394a019e7 Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:27:15 -08:00
Alex Johnston
d3c01ef591 add MANAGE_CREDENTIALS appop
This is part of the work to support
a credential management app on
unmanaged devices.

Bug: 165641221
Test: atest android.appsecurity.cts.AppOpsTest
Change-Id: Ifd87b5e38f341db4b34bf9f61480e29e49148846
2020-11-12 21:25:34 +00:00
Eran Messeri
cb1fecb4b4 Merge "Implement setRequiredPasswordComplexity" 2020-11-12 21:17:19 +00:00
Bernardo Rufino
24b362f687 Merge "Require signature|privileged STATUS_BAR for collapsePanels()" 2020-11-12 17:20:03 +00:00
Patrick Baumann
22efaa8422 Remove pi.append_native_lib_paths property
This change removes the "pi.append_native_lib_paths" property added as a kill switch for a feature that has been out in the wild now for several releases now.

Change-Id: I21f9d158f60d0cf47e3631bb37ece711b3450494
Fixes: 173103133
2020-11-12 16:56:39 +00:00
Bernardo Rufino
7d0992ce4f Require signature|privileged STATUS_BAR for collapsePanels()
For apps targeting S+. This API was being exploited by malware to
prevent the user from accessing critical notifications
(go/collapse-status-bar, b/137274359).

This API was hidden and never intended to be used by 3p apps, so putting
it behind proper permission after targetSdk S. Since it's
@UnsupportedAppUsage trying to steer apps to the
Intent.ACTION_CLOSE_SYSTEM_DIALOGS (Intent.ACSD), which produces the
same effect and has been part of the API surface (as opposed to this
one). However, to fix the vulnerability (b/137274359) that intent will
be subjected to further restrictions based on privilege (who) and
circumstance (what), for more details see go/close-system-dialogs.

To lock down the abuse vector, similar restrictions to the ones applied
to Intent.ACSD will be applied to collapsePanels() NOT gated on
targetSdk, but these will be in future CLs.

Test: CTS coming
Bug: 173031413
Bug: 159105552
Bug: 137274359
Change-Id: I05f05ff6a2052820a132c2284101480448d18b77
2020-11-12 14:41:03 +00:00
Eran Messeri
1641c5c47e Implement setRequiredPasswordComplexity
Implement setRequiredPasswordComplexity and
getRequiredPasswordComplexity, which enforce password requiremets
according to one of four, platform-defined complexity levels.

Start adjusting the platform to take the complexity into account:
* isActivePasswordSufficient would return false if complexity is set
  but the current password does not meet the complexity criteria.
* resetPasswordWithToken would not allow resetting the password to a
  value that does not meet the complexity criteria.

Bug: 165573442
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testResetPasswordWithToken
Change-Id: I4e66af0b03c521de70bba3192751164736d01c62
2020-11-12 12:47:11 +00:00
Felipe Leme
dd0fdcce9f Merge "Exposed UnsafeStateException as a public API." 2020-11-12 01:54:51 +00:00
TreeHugger Robot
62a648da25 Merge "Initial definition of DevicePolicySafetyChecker." 2020-11-12 01:49:29 +00:00
Yan Zhu
86cc64534a Merge "DPM and DPMS changes to support DO on AAOS" 2020-11-12 00:01:11 +00:00
Tobias Thierer
2842fcf4ce Merge "Fix malformed OWNERS." am: 37ef4e0be3 am: 6ecdbeb992 am: 428f6b01c2 am: 046471cec7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1496271

Change-Id: Ic31ceac3f156fde0b9e45e929e7e723a02d423ab
2020-11-11 22:26:26 +00:00
Tobias Thierer
046471cec7 Merge "Fix malformed OWNERS." am: 37ef4e0be3 am: 6ecdbeb992 am: 428f6b01c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1496271

Change-Id: I21174bf9a885e93416852d9a60a33e2d789dcc65
2020-11-11 22:01:46 +00:00
Tobias Thierer
428f6b01c2 Merge "Fix malformed OWNERS." am: 37ef4e0be3 am: 6ecdbeb992
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1496271

Change-Id: I06d3cea0211ec0c1f545993a1ec914eb59b3ae68
2020-11-11 21:42:12 +00:00