Commit Graph

20592 Commits

Author SHA1 Message Date
Jeff DeCew
61528e8bff Merge "Remove unused code" into sc-dev am: 2016350655
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14020327

Change-Id: I37c8544fc8370ca0c682d0c4a77edd1643e59a42
2021-04-01 16:24:37 +00:00
Jeff DeCew
2016350655 Merge "Remove unused code" into sc-dev 2021-04-01 16:24:26 +00:00
Jeff DeCew
25fef5e39f Merge "Notification color fixes" into sc-dev am: 9c95884765
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14020165

Change-Id: I7251d0ec6a087cb7ba388fef9deba555d4b22cf0
2021-04-01 15:02:09 +00:00
Jeff DeCew
9c95884765 Merge "Notification color fixes" into sc-dev 2021-04-01 14:34:45 +00:00
Kholoud Mohamed
b4c37004ff Merge "Remove DATA_SHARING_RESTRICTION_CHANGED broadcast" into sc-dev am: 58d0a2a950
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14018894

Change-Id: Ib13d7fb130863a36e01856b1c49fa2277fac0d8c
2021-04-01 14:24:11 +00:00
TreeHugger Robot
f20af5fef3 Merge "Update description for skip ownership screen extra" into sc-dev am: c11d161d3a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14051145

Change-Id: Idf578041ad0e06f98f826d50cc1fc6dee9c3ee14
2021-04-01 14:23:29 +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
03c15bed9d Merge "Persist user-agnostic lastTimeAnyComponentUsed in disk" into sc-dev am: bf5667bec6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13980062

Change-Id: If340d748111b71b4c45e4e401d6c18e1fd1af2f7
2021-03-31 23:01:22 +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
d30f2ff54c Merge "Rename getOnReceiveContentMimeTypes (drop "On")" into sc-dev am: 2bb75a4007
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14006645

Change-Id: I3b69523049d5de47f3c7f68bbd6d12d439ce44ae
2021-03-31 21:12:51 +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
40ab95e018 Merge "API: Expose whether bubbles are enabled or not" into sc-dev am: 3da85d8e80
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13985823

Change-Id: Ic71bcdac893a8525e9557c2acfaa0118fbb55a90
2021-03-31 17:09:53 +00: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
e771ff3fcc Merge "Improve javadocs for new S constants" into sc-dev am: 456fb2e78b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13984189

Change-Id: I6f86f1f087221e5957c904472d49353d0e91ffda
2021-03-31 13:59:48 +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
e6fe3ee1d5 Merge "Create package-level last time usage stats for app hibernation" into sc-dev am: eed249828f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13933089

Change-Id: I0ba03547e92c28ee32d7938beca4f30b287f807c
2021-03-31 09:20:05 +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
596a71cc6f Merge "Dump warning logs to prevent app crash while no top-resumed changes" into rvc-qpr-dev am: b6d433cdbd am: 2b5dae1c57 am: 3f790d2eba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13896651

Change-Id: I8c1ebc6caf9614ab26b343da94737f70f7d30d2e
2021-03-31 07:52: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
2434b922a4 Addressing comments from commit:8d2ed5 am: 7d058d62e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14037325

Change-Id: Icdd2a654130cd7d0d12c0bc30d4e654078a14b69
2021-03-31 02:18:32 +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
ba1cca6664 Merge "Fix the text color in the highlighted expander" into sc-dev am: f05199069c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14020346

Change-Id: I30f95af76471d9eb3306dc9843513b2988893f8a
2021-03-30 13:19:52 +00: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
43052bcc01 Merge "Add TEMPORARY_ALLOW_LIST_TYPE_NONE." into sc-dev am: d0b0f4ce83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13957707

Change-Id: If6a03bf079c5c1e07735e446db7d2b9a944c77a9
2021-03-29 22:03:08 +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
77591d9942 Merge "Runtime permission attribution improvements" into sc-dev am: a6c3d6ad39
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13692058

Change-Id: Ibad155ee212f6e71800e288a44bbed6012d32838
2021-03-29 21:05:00 +00:00
Svetoslav Ganov
a6c3d6ad39 Merge "Runtime permission attribution improvements" into sc-dev 2021-03-29 21:03:06 +00:00
Ashwini Oruganti
75f9be30c5 Merge "Enforce the PendingIntent mutability flag requirement for chrome" 2021-03-29 20:56:17 +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
Mustafa Emre Acer
7c4f635b3b Merge "Expose TimeManager.suggestExternalTime()" into sc-dev 2021-03-29 18:46:59 +00:00
Yuri Lin
c5f668e141 Delete deleteConversationNotificationChannels from NotificationManagerService.
This method isn't used anywhere and its functionality is superseded by onConversationRemoved, which handles deleted conversations.

Test: atest NotificationManagerServiceTest
Bug: 169349809

Change-Id: Iad7f592e71ecf425930e31873088a02e298380b3
2021-03-29 17:20:36 +00:00
Richard Ho
2335acd9a2 Merge changes from topic "nearby-streaming-policy" into sc-dev
* changes:
  Add policy for nearby app streaming
  Add policy for nearby notification streaming
2021-03-29 17:12:03 +00:00
Svet Ganov
8d2ed50604 Runtime permission attribution improvements
When an app is proxying access to runtime permission protected
data it needs to check whether the calling app has a permission
to the data it is about to proxy which leaves a trace in app ops
that the requesting app perofmed a data access. However, then the
app doing the work needs to get the protected data itself from the
OS which access gets attributed only to itself. As a result there
are two data accesses in app ops where only the first one is a
proxy one that app A got access to Foo through app B - that is the
one we want to show in the permission tracking UIs - and one
for the data access - that is the one we would want to blame on
the calling app, and in fact, these two accesses should be one -
that app A accessed Foo though B. This limitation requires fragile
one off workarounds where both accesses use the same attribution
tag and sys UI has hardcoded rules to dedupe. Since this is not
documented we cannot expect that the ecosystem would reliably
do this workaround in apps that that the workaround in the OS
would be respected by every OEM.

This change adds a mechaism to resolve this issue. It allows for
an app to create an attribution context for another app and then
any private data access thorugh this context would result in a
single app op blame that A accessed Foo though B, i.e. we no longer
have double accounting. Also this can be nested through apps, e.g.
app A asks app B which asks app C for contacts. In this case app
B creates an attribution context for app A and calls into app C
which creates an attribution context for app B. When app C gets
contacts the entire attribution chain would get a porper, single
blame: that C accessed the data, that B got the data from C, and
that A got the data form B. Furthermore, this mechanism ensures
that apps cannot forget to check permissions for the caller
before proxying private data. In our example B and C don't need
to check the permisisons for A and B, respectively, since the
permisisons for the entire attribution chain are checked before
data delivery. Attribution chains are not forgeable preventing
a bad actor to create an arbitrary one - each attribution is
created by the app it refers to and points to a chain of
attributions created by their corresponding apps.

This change also fixes a bug where all content provider accesses
were double counted in app ops due to double noting. While at
this it also fixes that apps can now access their own last ops.
There was a bug where one could not pass null getting the attributed
ops from a historical package ops while this is a valid use case
since if there is no attribution everything is mapped to the null
tag. There were some app op APIs not being piped thorough the app
ops delegate and by extension through the app ops policy. Also
now that we have nice way to express the permission chain in a
call we no longer need the special casing in activity manager to
handle content provider accesses through the OS. Fixed a bug
where we don't properly handle the android.os.shell calls with
an invlaid tag which was failing while the shell can do any tag.

Finally, to ensure the mechanims is validated and works end-to-end
we are adding support for a voice recognizer to blame the client
app for the mic access. The recognition service can create a blaming
context when opening the mic and if the mic is open, which would
do all permission checks, we would not do so again. Since changes
to PermissionChercker for handling attribution sources were made
the CL also hooks up renounced permissoins in the request permission
flow and in the permission checks.

bug:158792096
bug:180647319

Test:atest CtsPermissionsTestCases
     atest CtsPermissions2TestCases
     atest CtsPermissions3TestCases
     atest CtsPermissions4TestCases
     atest CtsPermissions5TestCases
     atest CtsAppOpsTestCases
     atest CtsAppOps2TestCases

Change-Id: Ib04585515d3dc3956966005ae9d94955b2f3ee08
2021-03-29 16:49:33 +00:00
Jeff Chang
d4a142719e Merge "Update saving persistent state documentation" into sc-dev 2021-03-29 10:57:28 +00:00
Nikita Dubrovsky
f3ebaed6e4 Rename getOnReceiveContentMimeTypes (drop "On")
Bug: 179143943
Test: Presubmit
Change-Id: Ib2109f0a45c25ae6c4507a9199bf8b34fc394af5
2021-03-26 10:48:58 -07:00
Jeff DeCew
d1cc1421df Merge "Fix regressions with DecoratedCustomViewStyle" into sc-dev 2021-03-26 02:11:02 +00:00
Chris Tate
d8022c3d5b Merge "Make FGS notification deferral control tri-state" into sc-dev 2021-03-25 23:50:36 +00:00
Mustafa Acer
5265da19f9 Expose TimeManager.suggestExternalTime()
This CL exposes an API that allows system clock time suggestions from an
external clock / time source to be made. The nature of "external" could
be highly form-factor specific. Example, times obtained via the VHAL for
Android Auto OS.

Bug: 157504928
Bug: 177079827
Test: atest android.app.time
CTS-Coverage-Bug: 182275086
Change-Id: I3527e3827a03c1df73fdc1e00c815ad5971a92ca
2021-03-25 21:17:19 +00:00
Jeff DeCew
987cfcc885 Fix regressions with DecoratedCustomViewStyle
Fixes: 183641274
Test: atest NotificationTemplateTest
Change-Id: I3201e8cde339fb64412c298958786cfdd7f3303b
2021-03-25 15:23:39 -04:00