Commit Graph

20503 Commits

Author SHA1 Message Date
Sudheer Shanka
9576b5a2be Merge "Allow clients to register for listening to changes in capabilities." into sc-dev 2021-04-07 20:18:04 +00:00
Makoto Onuki
779f120a91 Merge "Use descriptive exception for FGS start timeout" into sc-dev 2021-04-07 17:31:11 +00:00
Jeff DeCew
03a220d6ca Merge "Revert color of expand button on unread conversations" into sc-dev 2021-04-07 13:07:05 +00:00
Ashwini Oruganti
35871022c3 Merge "Enforce the PendingIntent mutability flag requirement for chrome" into sc-dev 2021-04-06 22:26:03 +00:00
Makoto Onuki
9de6e4e26b Use descriptive exception for FGS start timeout
If the app doesn't call startForeground() in time, throw a new exception
ForegroundServiceDidNotStartInTimeException.

Test: Manual test with a test app:
04-01 15:24:39.438 10293  9078  9078 E AndroidRuntime: FATAL EXCEPTION: main
04-01 15:24:39.438 10293  9078  9078 E AndroidRuntime: Process: com.google.omakoto.testapp, PID: 9078
04-01 15:24:39.438 10293  9078  9078 E AndroidRuntime: android.app.ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{92c1599 u0 com.google.omakoto.testapp/.MyFgs}
04-01 15:24:39.438 10293  9078  9078 E AndroidRuntime: 	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1894)

Bug: 124137635
Change-Id: I7d97e15ba47a32a242fb461e7312adf3f28ab3a6
2021-04-06 12:03:36 -07:00
TreeHugger Robot
0751e1b15f Merge "Make note/startOperation return SyncNotedAppOp, add mode" into sc-dev 2021-04-06 18:34:05 +00:00
Kholoud Mohamed
a09e44982d Merge "Add testAPI to get adopted shell permissions." into sc-dev 2021-04-06 16:50:05 +00:00
Jeff DeCew
57851315bd Revert color of expand button on unread conversations
Fixes: 183710694
Test: manual
Change-Id: I2cc6d98f9a8ede430a69a7d37ec32c05e41b8759
2021-04-06 11:15:58 -04:00
Jeff DeCew
6a39b82e8b Merge "Do not highlight group expanders" into sc-dev 2021-04-06 15:10:57 +00:00
kholoud mohamed
0ac02444e8 Add testAPI to get adopted shell permissions.
Added a new testAPI in UiAutomation to get the currently adopted
shell permissions using adoptShellPermissionIdentity.

Test: atest UiAutomationTest
Bug: 183716601
Change-Id: I66a6c753480cecf971f7354daaddbb404f5c1453
2021-04-06 14:08:03 +00:00
Roshan Pius
a88aa31269 UwbManager: Use AttributionSource for runtime permission enforcement
This attribution source is going to be used by Gmscore to proxy
the blame for uwb_ranging runtime permission check (since Gmscore which
is the direct caller of this surface is in most cases proxying the
request from 1p/3p apps).

Note: This CL just adds the skeletal API to start the API reviews. The
actual implementation needs a major refactor of the stack which is WIP.

Bug: 183904955
Test: atest android.uwb
Change-Id: Ia0338b573306f44c493bf1c136e68b4f46877816
2021-04-05 17:31:31 -07:00
Jeff DeCew
018dd31970 Do not highlight group expanders
Bug: 181048615
Test: manual
Change-Id: I491e0cf5aeb97bf6baf13a467481dd799893106e
2021-04-05 20:21:06 +00:00
Sudheer Shanka
ce7fc42291 Allow clients to register for listening to changes in capabilities.
Clients can register for listening to changes in procstates and if
they are only interested in knowing if the procstate crosses a certain
threshold, they can specify a "cutpoint" and they will only get
a callback if the procstate crosses that "cutpoint" but clients cannot
use this if they are also interested in changes in capabilities. So,
add a way for clients to use the "cutpoint" facility and also listen
to changes in capabilities.

Bug: 177641226
Test: atest services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
Test: atest services/tests/servicestests/src/com/android/server/am/UidObserverControllerTest.java
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I1198e602ca81382975500b10f930dacfd16919e3
2021-04-05 10:55:57 -07:00
Yuri Lin
048571dd57 Remove notification channels from history when they're deleted.
To make this possible, this change adds functionality for notification channel removal to NotificationHistory, NotificationHistoryDatabase, and NotificationHistoryManager and corresponding tests.

This change does not remove the notifications from deleted channels from the "recently dismissed" list (stored in mArchive); will follow up with that later.

Test: atest NotificationHistoryTest, NotificationHistoryDatabaseTest, NotificationManagerServiceTest; manual via creating channels, deleting them and verifying
Bug: 169349809

Change-Id: I7b1c137e516d14703665750f06554ac7ca44c90e
2021-04-05 10:49:07 -04:00
Julia Reynolds
47fe65234f Merge "Allow apps to migrate NLS filter settings" into sc-dev 2021-04-05 13:30:57 +00:00
Svetoslav Ganov
6f7e03244d Merge "Hookup renounced permissions" into sc-dev 2021-04-05 00:55:30 +00:00
Jeff DeCew
7116f04929 Merge "Fix NPE in obtainThemeColor due to use of Mocks" into sc-dev 2021-04-02 20:52:37 +00:00
Nate Myren
ee9a4741d4 Make note/startOperation return SyncNotedAppOp, add mode
Use the SyncNotedAppOp when collecting self/sync ops in AppOpsManager.
Also adds "mode" to SyncNotedAppOp

Fixes: 184111263
Test: Atest AppOpsServiceTest
Change-Id: Ia20c7054d06e241cbe017a641d728e11c7eccd06
2021-04-02 13:24:21 -07:00
Caitlin Cassidy
4be0810f5b Merge "[Ongoing Call Chip] Add feature flag + controller" into sc-dev 2021-04-02 18:12:20 +00:00
Jeff DeCew
6ec691868b Fix NPE in obtainThemeColor due to use of Mocks
Fixes: 184358158
Test: atest DisconnectedCallNotifierTest
Change-Id: Ia561e262e288d71b93cc18e842eefcba054a32d8
2021-04-02 13:32:26 -04:00
Svet Ganov
48801b0bbd Hookup renounced permissions
Propagate renounced permissions from context params
to the context attribution source. Throw if one
tries to request at runtime a renounced permission.

Also make the AttributionSource take null for the
setters to ease usage, otherwise folks should always
check for null before calling a builder method.

Additionally, we allow apps that have UPDATE_APP_OPS_STATS
to register arbitrary trusted AttributionSource for
testing. Note that this permission allows abritrary app
op operations, thus we are not relaxing the security
model.

bug: 158792096

Test: atest CtsPermission5TestCases

Change-Id: I4330684bb8695fb998cf31e9363b94ad981ba2cc
2021-04-02 17:30:10 +00:00
Julia Reynolds
0e36d959d0 Allow apps to migrate NLS filter settings
On a per user vs manifest wide basis.

Test: atest, cts-verifier
Bug: 184027330
Change-Id: Iae591765e410e360f289692bac012a1f26574add
2021-04-02 17:04:58 +00:00
Jeff Sharkey
a1d8bbb3ba Merge changes from topic "uwb_ranging_permission" into sc-dev
* changes:
  Add a new uwb ranging app-ops
  Add a new uwb ranging runtime permission
2021-04-02 14:45:57 +00:00
Roshan Pius
f5b1cf217e Add a new uwb ranging app-ops
This will be part of the nearby devices permission group.

Bug: 183904955
Test: Compiles
Change-Id: I8d225f6b9f40cc106aeb5ad661282cd394d7b826
2021-04-01 14:07:35 -07:00
Caitlin Cassidy
6a0fdd47e5 [Ongoing Call Chip] Add feature flag + controller
Bug: 183229367
Test: atest ran and manual
Change-Id: I8f754f4d894999a4bd5c13db81324e9abe204747
2021-04-01 18:38:54 +00:00
Jeff DeCew
2016350655 Merge "Remove unused code" into sc-dev 2021-04-01 16:24:26 +00:00
Jeff DeCew
9c95884765 Merge "Notification color fixes" into sc-dev 2021-04-01 14:34:45 +00:00
Kholoud Mohamed
58d0a2a950 Merge "Remove DATA_SHARING_RESTRICTION_CHANGED broadcast" into sc-dev 2021-04-01 14:21:00 +00:00
arangelov
4e75a9dc76 Update description for skip ownership screen extra
Bug: 175238386
Fixes: 179307805
Test: compiled
Change-Id: I5633a9145992eff12c3796fedd28aba339f5be43
2021-04-01 12:09:02 +00:00
kholoud mohamed
1192835a56 Remove DATA_SHARING_RESTRICTION_CHANGED broadcast
This broadcast was previously used to notify Managed Provisioning
that data sharing restrtiction has changed, this is no longer handled
in Managed Provisioning and is now handled in DPMS.

Fixes: 177221010
Test: N/A
Change-Id: I4e3fbb94c41f944afb41e226c06d1fffcc8bc264
2021-04-01 11:47:04 +00:00
Zhen Zhang
bf5667bec6 Merge "Persist user-agnostic lastTimeAnyComponentUsed in disk" into sc-dev 2021-03-31 22:43:53 +00:00
Nikita Dubrovsky
2bb75a4007 Merge "Rename getOnReceiveContentMimeTypes (drop "On")" into sc-dev 2021-03-31 21:06:21 +00:00
Zhen Zhang
131f53fdf4 Persist user-agnostic lastTimeAnyComponentUsed in disk
Persist the user-agnostic lastTimeAnyComponentUsed usage stats in disk.

Bug: 183462940
Test: atest UsageStatsServiceTest
Test: atest UserStatsPersistenceTest
Test: atest CtsUsageStatsTestCases:UsageStatsTest

Change-Id: Ibe946f8e9fd9fa7d9ba546da67a6040c00e0f9ea
2021-03-31 11:27:26 -07:00
Mady Mellor
3da85d8e80 Merge "API: Expose whether bubbles are enabled or not" into sc-dev 2021-03-31 16:53:16 +00:00
TreeHugger Robot
456fb2e78b Merge "Improve javadocs for new S constants" into sc-dev 2021-03-31 13:49:46 +00:00
Zhen Zhang
eed249828f Merge "Create package-level last time usage stats for app hibernation" into sc-dev 2021-03-31 09:04:50 +00:00
Louis Chang
3f790d2eba Merge "Dump warning logs to prevent app crash while no top-resumed changes" into rvc-qpr-dev am: b6d433cdbd am: 2b5dae1c57
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13896651

Change-Id: I4719a6ff203dafa59fd688f405efe44f19c1577b
2021-03-31 07:17:54 +00:00
Louis Chang
2b5dae1c57 Merge "Dump warning logs to prevent app crash while no top-resumed changes" into rvc-qpr-dev am: b6d433cdbd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13896651

Change-Id: I199c71ab75007a6fef25c71ecf433d2f939e43e9
2021-03-31 06:55:05 +00:00
Louis Chang
b6d433cdbd Merge "Dump warning logs to prevent app crash while no top-resumed changes" into rvc-qpr-dev 2021-03-31 06:15:30 +00:00
Svet Ganov
7d058d62e5 Addressing comments from commit:8d2ed5
bug:158792096
bug:180647319
bug:184051153
bug:184027531

Test:atest CtsPermissionTestCases
     atest CtsPermission2TestCases
     atest CtsPermission3TestCases
     atest CtsPermission4TestCases
     atest CtsPermission5TestCases
     atest CtsAppOpsTestCases
     atest CtsAppOps2TestCases
     atest CtsAlarmManagerTestCases

Change-Id: Id324ed0e2a653dface6ba273bba27e92bea14f99
2021-03-31 02:11:46 +00:00
Mady Mellor
c5561c9c5c API: Expose whether bubbles are enabled or not
There's no way for devs to check whether the user has
disabled or enabled bubbles at the feature level. This
adds an API for devs to make this query.

Test: atest NotificationManagerTest NotificationManagerServiceTest
Bug: 171162184
Change-Id: I3b201e8267f36b45473987db773c08663b8d8126
2021-03-30 18:59:11 -07:00
Zhen Zhang
b8b107372a Create package-level last time usage stats for app hibernation
Create a user-agnostic package-level last time used usage stats for app
hibernation. Usage is updated when USER_INTERACTION or
APP_COMPONENT_USED event reported. Also moved checkAndGetTimeLocked and
convertToSystemTimeLocked methods up to UsageStatsService class and
refactored usages.

Bug: 183142974
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest UsageStatsServiceTest
Test: atest UserUsageStatsServiceTest

Change-Id: I93d8653bb92b98af8f6b57156eb1139fbd7e562a
2021-03-30 16:16:08 -07:00
Jeff DeCew
d11b3561c9 Notification color fixes
* Change Notification.isColorized() to return false if the given color is COLOR_DEFAULT.  This removes an odd, inconsistent, and likely unused state.
* Remove config_tintNotificationsWithTheme which we're not going to be using to reduce the color palette complexity.
* Change ensureColors() to use the theme's primary/secondary text colors.
* Numerous simplifications in logic that fall out from these changes.

Bug: 181048615
Test: atest NotificationComparatorTest NotificationTest AppOpsCoordinatorTest NotificationGutsManagerTest NotificationManagerServiceTest NotificationBuilderTest
Change-Id: Ie49cc9f3f9ea01685ae026587e2d1cdb96391eb2
2021-03-30 15:56:39 -04:00
arangelov
307c5cfd17 Improve javadocs for new S constants
- Distinguish between PROVISIONING_TRIGGER_PERSISTENT_DEVICE_OWNER
and PROVISIONING_TRIGGER_MANAGED_ACCOUNT
- Explain difference between
PROVISIONING_MODE_MANAGED_PROFILE_ON_PERSONAL_DEVICE and
PROVISIONING_MODE_MANAGED_PROFILE
- Improve deprecation message for ACTION_PROVISION_MANAGED_DEVICE

Test: compiled
Fixes: 179709752
Change-Id: Id56316982581cf98dab78ef0b09c9243960d2893
2021-03-30 18:10:18 +01:00
Jeff DeCew
f05199069c Merge "Fix the text color in the highlighted expander" into sc-dev 2021-03-30 13:01:50 +00:00
Makoto Onuki
d0b0f4ce83 Merge "Add TEMPORARY_ALLOW_LIST_TYPE_NONE." into sc-dev 2021-03-29 21:32:40 +00:00
Svetoslav Ganov
a6c3d6ad39 Merge "Runtime permission attribution improvements" into sc-dev 2021-03-29 21:03:06 +00:00
Jeff DeCew
f0c7dbbb1a Remove unused code
Bug: 181048615
Test: manual
Change-Id: I69dc97c2ced3025e7b8b9809bdb0ac7954b862d2
2021-03-29 16:32:05 -04:00
Yuri Lin
e0d692833e Merge "Delete deleteConversationNotificationChannels from NotificationManagerService." into sc-dev 2021-03-29 19:39:25 +00:00
Jeff DeCew
f8b8e45cb2 Fix the text color in the highlighted expander
Bug: 183710694
Test: manual
Change-Id: Ib95fbb4409e98004f0ea57befec3923508577cce
2021-03-29 15:16:08 -04:00