* 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
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
* 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
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
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
@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
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
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
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
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
Per go/android-owners, include directions should be of the form
[gerrit_project_name]:[absolute_path_to_included_file].
Exempt-From-Owner-Approval: Only editing OWNERS file that ought
to be owned by ourselves, anyway.
Bug: 159055442
Test: Treehugger
Change-Id: I4238c3b0895819a96ca5ab0151f772ecdde588ff
This object will be used to fail DevicePolicyManagers that cannot be
executed on automotive when it's not safe to (for example, because
the vehicle is moving).
Test: atest CarDevicePolicyManagerTest#testLockNow_safe \
CarDevicePolicyManagerTest#testLockNow_unsafe
Bug: 172376923
Change-Id: I7f910a7ee5efc7d647525db1687bd27e68cb7c0a
Currently, ActivityManager doesn't know whether an app has become
responsive. Notify it about a responsive connection so that it can hide
the ANR dialog.
Bug: 171218828
Test: manual test with an unresponsive app
Test: atest AnrTest
Test: logcatcolor | grep -i windowmanager and observe the logs from WM
about ANR happening and ANR stopping.
Change-Id: Ie950015e5794232f1c59c2c7b3101723fcaf5a46
The method for validating whether a given password is sufficient for a
given complexity was returning the wrong value in the general case.
validatePasswordMetrics should return true when the actualMetrics of
a password satisfy the minComplexity passed in.
However, the isPin argument, skews the result such that an all-digit
PIN is considered not sufficient, because the only credential type
recognized in that method is the "password" type, and for that
credential type a non-digit character is required.
This worked for checking whether the password is sufficient in the
UI code, where isPin indicated whether the user chose a PIN or password.
However it does not work for the general case, for example for enforcing
complexity.
This change gets rid of the 'allowsNumericPassword()' criteria for
complexity buckets. Instead, the minimal length is calculated based on
whether the actualMetrics already have a non-numeric character, OR
a non-numeric character is required by the admin-set password quality
requirements (in the case when merging complexity and quality).
Bug: 172312413
Bug: 165573442
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest MixedDeviceOwnerTest MixedProfileOwnerTest OrgOwnedProfileOwnerTest MixedDeviceOwnerTestApi25 MixedManagedProfileOwnerTest
Change-Id: I3227d4d8e6825b5c4ea525828d7e09f52702065b
This is a workaround solution for Android R QPR2. We are not allowed
to change the API for QPR release. This is a special case that allows
the current voice recognizer to note proxy ops if it is also the
voice interactor. In S, we will define a new permission that designed
one as a trusted blamer and tie it to a role.
Bug: 17095434
Test: manual
Test: TreeHugger presubmit
Merged-In: I506bbeb95e622b99693dbf5a135c7961b7fd81c1
Change-Id: I0852d1bb438d25b3e93224a71de1bf3b6df72c1c
Ensure that the component name unflattening does not result in a null
value before getting the package name.
Fixes: 172854122
Test: Manual
Change-Id: Icbcacc87308bdb87fd45e055240fd72458e478f5
Add the SystemApi tag back to updateMccMncConfiguration for Telephony
mainline.
Fixes: 172284754
Test: atest ActivityManager#testUpdateMccMncConfiguration
Change-Id: Id6a8639aef26c39fb23d9339142c42f7518fc074
This permission is intended to be used internally as a system App Ops permission, and let CompanionDeviceManager or RoleManager to grant with
users. If it is granted by user, the corresponding companion app has the ability to query the details of the ongoing calls, and also manage its life cycle.
Bug: 169595473
Test: atest ThirdPartyInCallServiceAppOpsPermissionTest
Change-Id: Ie0f790aab2edcd52cfdbded2630347b9f8dd4d49
Merged-In: Ie0f790aab2edcd52cfdbded2630347b9f8dd4d49
(cherry picked from commit 334ab546e4)
The PROJECTION_TYPE_* constants and re{quest,lease}Projection APIs were originally marked @TestApi and @hide, but Android Auto needs them to be part of the @SystemApi to be able to use them.
Bug: 134997071
Bug: 169702986
Test: Unit tests, tested against Android Auto
Change-Id: Id8f3fb8697726ba20ea5a2843026c2083c0bec92