Apps were able to bypass BAL and BG-FGS restrictions by retrieving their
own notifications and firing their PI since those were allowlisted for
those operations.
Now we strip the token that granted them that ability
from notifications returned via NM.getActiveNotifications(), which
returns the notifications of the caller.
Notifications returned via notification listener APIs still contain such
token, as they should.
Bug: 185388103
Bug: 169821287
Test: atest -d android.app.cts.NotificationManagerTest#testActivityStartFromRetrievedNotification_isBlocked
Change-Id: I2ede0d639a560f6acacec3864a0a7d23af152ba5
We can guarantee that LaunchActivityItem will queue before
ActivityConfigurationChangeItem.
But ActivityConfigurationchangeItem#preExecute() still has the
opportunity to execute before LaunchActivityItem#execute(). And at this
time, ActivityClientRecord has not been created.
This CL create ActivityClientRecord early in
LaunchActivityItem#preExecute() and store in a new list of
ActivityThread. Thus others can guarantee to get the
ActivityClientRecord in preExecute().
Bug: 187691892
Test: atest TransactionExecutorTests
Change-Id: Ib40270345223c5c6e76333803faf98937c5527f9
As a part of internal libcore cleanup three utility methods for ddm
chunks (de)serialization were removed from the CorePlatformApi set and
moved to framework.
As a part of API council review made following changes:
* Renamed connected/disconnected callback methods to
onConnected/onDisconnected, respectively
* Made unregisterHandler method a part of core api
* Renamed threadNotify/enableRecentAllocations setters
Bug: 154796679
Bug: 184654804
Test: m droid
Merged-In: I1d43f12aaf70c7c079577d3f3248248ed39f9865
Change-Id: I1d43f12aaf70c7c079577d3f3248248ed39f9865
* Instead of resolving colors as-needed, resolve the entire palette potentially used by the notification at the start.
* Centralize color logic and palette storage into Notification.Colors for easier unit testing.
* Adds unit tests for the Notification.Colors, including validating color contrast ratios for various colors.
* Fix a bug with ColorContrastUtil where the luminosity for dark/light font cutoff was 0.5, which resulted in a max contrast ratio of 1.9 for some colors. Now contrast ratios of 4.5:1 can be achieved for all colors.
* Removes a few of the color accessors in Notification.Builder which were infrequently used, and replaces them with direct use of Notification.Colors.
* Notification specific colors (primary, secondary, default) have only been used by colorized notifications for a few months. Remove the dark mode overrides of these, ensuring that colorized notifications have the same exact appearance in light and dark themes.
* Replace the use of the "default" color with the "secondary text color"; this practically only affects the alerted bell icon, is more consistent, and reduces complexity.
Fixes: 187881776
Test: manual
Test: atest android.app.NotificationTest
Change-Id: Ib8840d04093094c324d8bdce5b2e84c93a94db8d
Test activity crash when calling UiModeManager#setApplicationNightMode.
There should call clearCallingIdentity before updating configuration in
system server.
Also clear some code around those methods.
Fixes: 189166288
Test: atest SplashscreenTests#testSetApplicationNightMode
Change-Id: I163919927030f81739aa3d9520e2012a92028793
The reason code is helpful for developers to understand why an app is
killed. It is also valuable to better quantify the benefit and impact
of App Freezer.
Bug: 183714099
Bug: 179715791
Test: dumpsys activity exit-info shows subreasons.
Change-Id: Iea808cdc8adbe9d84663071dc849d00ea28a9f7d
Now that we've settled the final API for this mechanism, retire the
preliminary one.
Bug: 186475652
Test: atest CtsAppTestCases:ServiceTest
Test: atest CtsAppTestCases:NotificationManagerTest
Change-Id: Ibe911627ad59b991f2e498689f7fa3019c19dc36
Create a new DeviceConfig entry to replace the prior Settings entry on
which the location ignore settings allowlist is based. This allows us to
allowlist based on attribution tag, and eliminate holes for large
applications.
Test: manual + CTS + GTS
Bug: 187421886
Change-Id: I31e61db79b93e202bd8c66efae1bb5aaf0c88ff5
Pass additional parameters to ART to assist with better profiling
and debuggability.
(cherry picked from commit 3e308c6270)
Test: m
Bug: 182793486
Bug: 185979271
Merged-In: Iae0beab92194d75f191147578922c760f04470b9
Change-Id: Iae0beab92194d75f191147578922c760f04470b9
If the splashscreen uses an animated icon, we need to display it in a
surface view to avoid any jank if the view is passed to the client.
Test: CtsWindowManagerDeviceTestCases:SplashscreenTests#testHandleExitIconAnimatingActivity
Bug: 181757194
Change-Id: I7e2745a68626849374f5ebb9011c2e8c3b3b92c3
The API is moved from PermissionControllerManager (only a System API)
to PackageManager to expose it as public API.
Bug: 182094776
Test: atest GetPermissionGroupInfoTest
Change-Id: I175afb2e37bf2651b91765029645f7940f58f39c
The PermissionController needs these ops to display phone calls in the
Privacy Dashboard
Test: build
Bug: 176902658
Change-Id: Ib2a862520a73f3e65eeefd0fcba3843ef9112354
This reverts commit a023924afd.
Reason for revert: Test Monitor triggers the test build
Bug: 188708756
Bug: 188733943
Change-Id: I2d17d4f77287020953fb559cf98ff8475f32ed1b
1. Instead of throwing SecurityException, log the error.
2. Set isAttributionTagNotFound to true when the attributionTag is not
null but not found in the package attributions.
Fix: 188549667
Test: N/A
Change-Id: I75a217893353ee5fe5d191e2b78ccf391847adb6