Commit Graph

21219 Commits

Author SHA1 Message Date
Jon Spivack
6f32fefe3e Merge "Allow AssistDataRequester to fetch AssistContent without AssistStructure" into sc-dev am: dd934371ae am: 8dbc1f9bd6 am: a346ee51f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14738871

Change-Id: If89920975ee5942ebfd441c3b70574f203ffb6a8
2021-06-02 18:21:12 +00:00
Jon Spivack
a346ee51f2 Merge "Allow AssistDataRequester to fetch AssistContent without AssistStructure" into sc-dev am: dd934371ae am: 8dbc1f9bd6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14738871

Change-Id: I2a590da835b7c3eb955912c086c5d065d33bfbfc
2021-06-02 18:01:57 +00:00
Mady Mellor
be903d906b Merge "Remove doc saying setSuppressNotification requires being in foreground" into sc-dev am: 81cac3a9f1 am: 7f0dc6f537 am: eb92c9a265
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14791581

Change-Id: If46a31c3ab67074570a86114300a108da5dcd71a
2021-06-02 17:38:09 +00:00
Jon Spivack
8dbc1f9bd6 Merge "Allow AssistDataRequester to fetch AssistContent without AssistStructure" into sc-dev am: dd934371ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14738871

Change-Id: Ia98ecaf808feff0bec2a502e6348d19f60982746
2021-06-02 17:36:45 +00:00
Mady Mellor
eb92c9a265 Merge "Remove doc saying setSuppressNotification requires being in foreground" into sc-dev am: 81cac3a9f1 am: 7f0dc6f537
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14791581

Change-Id: Icbcd8d2de2388b950a01d59feacf0829bc5c7f24
2021-06-02 17:17:22 +00:00
Jon Spivack
dd934371ae Merge "Allow AssistDataRequester to fetch AssistContent without AssistStructure" into sc-dev 2021-06-02 17:08:47 +00:00
Mady Mellor
7f0dc6f537 Merge "Remove doc saying setSuppressNotification requires being in foreground" into sc-dev am: 81cac3a9f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14791581

Change-Id: I6a498b1f289aff6fbfe80ecd1aadd30a73a1fb97
2021-06-02 16:52:42 +00:00
Mady Mellor
81cac3a9f1 Merge "Remove doc saying setSuppressNotification requires being in foreground" into sc-dev 2021-06-02 16:18:19 +00:00
Jay Sullivan
0b84f086e4 Merge "Fix intermittent async noteOps" into sc-dev am: c2650e0440 am: 46b1e92c4f am: a6dd8a1338
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14602086

Change-Id: I7532c197834c993152f0bd68f47de9efaa1fbcd8
2021-06-02 02:05:02 +00:00
Jay Sullivan
a6dd8a1338 Merge "Fix intermittent async noteOps" into sc-dev am: c2650e0440 am: 46b1e92c4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14602086

Change-Id: I248db730e5927d68a58d8727d28c6ec4e1c5aac9
2021-06-02 01:33:57 +00:00
Jay Sullivan
46b1e92c4f Merge "Fix intermittent async noteOps" into sc-dev am: c2650e0440
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14602086

Change-Id: I111b7ed09ad9a91ac1bb0399f2fc041751612918
2021-06-02 01:10:11 +00:00
Jay Sullivan
c2650e0440 Merge "Fix intermittent async noteOps" into sc-dev 2021-06-02 00:42:31 +00:00
Mady Mellor
1520359abc Merge "Re-add checks for mutable intents on bubbles" into sc-dev am: f8218030bb am: c0a3fa5ffe am: fe43118c50
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14792011

Change-Id: I29a61a86af7d380da5e9a10473c74a9847e9e9fc
2021-06-02 00:13:24 +00:00
Mady Mellor
fe43118c50 Merge "Re-add checks for mutable intents on bubbles" into sc-dev am: f8218030bb am: c0a3fa5ffe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14792011

Change-Id: I921d863959ea084198135c7af4def5fdee0803a5
2021-06-01 23:51:44 +00:00
Mady Mellor
c0a3fa5ffe Merge "Re-add checks for mutable intents on bubbles" into sc-dev am: f8218030bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14792011

Change-Id: Ibc1f94b5c03fe067befbdcce60832ab7d20ccdf3
2021-06-01 23:27:32 +00:00
Mady Mellor
f8218030bb Merge "Re-add checks for mutable intents on bubbles" into sc-dev 2021-06-01 22:59:54 +00:00
Svetoslav Ganov
757486cde6 Merge "Switch media fw permissions checks to AttributionSource" 2021-06-01 21:31:30 +00:00
Mady Mellor
72c320aefc Remove doc saying setSuppressNotification requires being in foreground
ag/13330774  removed the requirement & added tests; this updates the
javadoc around it.

Bug: 189175840
Test: treehugger
Change-Id: I5c8fc35607c79a6e70e8245d8662d66d5e884fa1
2021-06-01 14:16:22 -07:00
Mady Mellor
4d9ab47b4b Re-add checks for mutable intents on bubbles
Also adds a note in the javadoc.

Bug: 177252626
Test: atest NotificationManagerServiceTest
Change-Id: I1e55b08d3de7b6be22090cc821794c78c6659620
2021-06-01 14:01:17 -07:00
Jeff DeCew
28d96984ea Merge "Do not show the custom views of spoofing notitifactions." into sc-dev am: 3c3af99d00 am: 59c0a6b4cc am: c293314bd3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14739250

Change-Id: I3c689cf706e4002d026af25fc5fd4f3102e989ae
2021-06-01 20:59:41 +00:00
Jeff DeCew
c293314bd3 Merge "Do not show the custom views of spoofing notitifactions." into sc-dev am: 3c3af99d00 am: 59c0a6b4cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14739250

Change-Id: I970996d424ff90cbab0b4ebe919a6ffa5f3e7bff
2021-06-01 20:40:35 +00:00
TreeHugger Robot
bb0f99d170 Merge "Fix various FGS notification deferral issues" into sc-dev am: 2ee596d203 am: 8358468870 am: 8df95fccd1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14736145

Change-Id: Id975370001a38d4fdb1d7109d65a951f0ab7d52b
2021-06-01 20:14:00 +00:00
TreeHugger Robot
8df95fccd1 Merge "Fix various FGS notification deferral issues" into sc-dev am: 2ee596d203 am: 8358468870
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14736145

Change-Id: I1ec38feba3e9a4fca745b80ff3285ebe7b721abd
2021-06-01 20:05:29 +00:00
Jeff DeCew
59c0a6b4cc Merge "Do not show the custom views of spoofing notitifactions." into sc-dev am: 3c3af99d00
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14739250

Change-Id: I3c90492fe703d499421e776d28b8de0d592242b9
2021-06-01 19:40:29 +00:00
TreeHugger Robot
8358468870 Merge "Fix various FGS notification deferral issues" into sc-dev am: 2ee596d203
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14736145

Change-Id: If439610cf43da7ba0f18d901687a6319b58055c8
2021-06-01 19:34:05 +00:00
Jeff DeCew
3c3af99d00 Merge "Do not show the custom views of spoofing notitifactions." into sc-dev 2021-06-01 18:24:21 +00:00
TreeHugger Robot
2ee596d203 Merge "Fix various FGS notification deferral issues" into sc-dev 2021-06-01 17:32:02 +00:00
Svet Ganov
b033da4e3a Switch media fw permissions checks to AttributionSource
Attribution source is the abstraction to capture the data
flows for private data across apps. Checking permissions
for an attribution source does this for all apps in the
chain that would receive the data as well as the relevant
app ops are checked/noted/started as needed.

Teach speech recognition service about attribution
chains. If an implementation does nothing the OS
would enforce permisisons and do blame as always.
This apporach leads to double blaming and doesn't
support attribition chains where app calls into
the default recognizer which calls into the on
device recognizer (this nests recursively). If the
implementer takes advantage of the attribution chain
mechanims the permissions for the entire chain are
checked at mic access time and all apps are blamed
only once.

Fixed a few bugs around finishing ops for attribution
chains. Also ensured that any app death in a started
attribution chain would lead to finishing the op for
this app

bug: 158792096

Test: ((added tests for speech reco))
      atest CtsMediaTestCases
      atest CtsPermissionTestCases
      atest CtsPermission2TestCases
      atest CtsPermission3TestCases
      atest CtsPermission4TestCases
      atest CtsPermission5TestCases
      atest CtsAppOpsTestCases
      atest CtsAppOps2TestCases

Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
2021-06-01 15:12:57 +00:00
Jing Ji
08e07bf190 Merge "Don't call onNullBinding when the service host is dead" into sc-dev am: e6436d95f8 am: ea4646691e am: 6ad507bb7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14739098

Change-Id: Ia923298c7173150707ee366c2aba83f4fef2c65c
2021-05-28 03:29:16 +00:00
Ryan Mitchell
e72a6bcfc3 Merge changes from topic "inc-dis" into sc-dev am: 488522c9c5 am: a1cb15f54e am: 1e7576afd4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14505818

Change-Id: Ie2f775bf589806c4d4982f78d3acd2291cf6472b
2021-05-28 03:19:30 +00:00
Jing Ji
6ad507bb7a Merge "Don't call onNullBinding when the service host is dead" into sc-dev am: e6436d95f8 am: ea4646691e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14739098

Change-Id: Ic8f9f6e960add3f169c8d148ce92b921154b1b08
2021-05-28 03:16:10 +00:00
Ryan Mitchell
1e7576afd4 Merge changes from topic "inc-dis" into sc-dev am: 488522c9c5 am: a1cb15f54e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14505818

Change-Id: I7078f4bf90100d9b8161d8a6460aeb6d981c416a
2021-05-28 03:05:19 +00:00
Bernardo Rufino
8fb7b38c84 Merge "Fix background bypass via notifications" into sc-dev am: 365d013e43 am: e52ffd21cc am: 46de1f2e1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14736230

Change-Id: I37d6d413baf332318a51b2429a549b0855b83977
2021-05-28 03:03:41 +00:00
Jing Ji
ea4646691e Merge "Don't call onNullBinding when the service host is dead" into sc-dev am: e6436d95f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14739098

Change-Id: I4d9c7464005bdad716df41330bc76ecd7528e113
2021-05-28 03:03:04 +00:00
TreeHugger Robot
ac93d16d7a Merge "Create ActivityClientRecord early in preExecute" into sc-dev am: 018e114202 am: fab7d6a152 am: f5c87c3eda
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14673572

Change-Id: I8c3ac8d29f624ca4200ac9c6b4602be6209c02f4
2021-05-28 03:01:43 +00:00
Bernardo Rufino
46de1f2e1a Merge "Fix background bypass via notifications" into sc-dev am: 365d013e43 am: e52ffd21cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14736230

Change-Id: Ic86cb427745de42f8e4cb85125adc3d8f8deb718
2021-05-28 02:54:04 +00:00
TreeHugger Robot
f5c87c3eda Merge "Create ActivityClientRecord early in preExecute" into sc-dev am: 018e114202 am: fab7d6a152
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14673572

Change-Id: Idcb3bfb581d459040e880d3b9c34edffe8670e9f
2021-05-28 02:53:08 +00:00
Ryan Mitchell
a1cb15f54e Merge changes from topic "inc-dis" into sc-dev am: 488522c9c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14505818

Change-Id: I5ae5007659172d8a247b8613646d72a68a7dd06a
2021-05-28 02:49:33 +00:00
Bernardo Rufino
e52ffd21cc Merge "Fix background bypass via notifications" into sc-dev am: 365d013e43
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14736230

Change-Id: I6872834f125417a2a31ee1d86435ac2c71958791
2021-05-28 02:25:29 +00:00
TreeHugger Robot
fab7d6a152 Merge "Create ActivityClientRecord early in preExecute" into sc-dev am: 018e114202
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14673572

Change-Id: I30b9949c8be0905202a2370fbfa57bad2f07096a
2021-05-28 02:24:32 +00:00
Jing Ji
e6436d95f8 Merge "Don't call onNullBinding when the service host is dead" into sc-dev 2021-05-28 01:35:24 +00:00
Ryan Mitchell
488522c9c5 Merge changes from topic "inc-dis" into sc-dev
* changes:
  Disable incremental hardening on own resources
  StringBlock incremental hardening default values
2021-05-27 21:31:04 +00:00
Christopher Tate
10a3ccad53 Fix various FGS notification deferral issues
A number of scenarios involving both FGS and non-FGS notification
operations were not yet working as intended.  This CL lands the
following behaviors:

* notify() to update the notification content during an FGS's
notification deferral period now respects the new Notification's
deferral policy rather than forcing immediate display.  An app can now
choose whether to force immediate display, or to have the new content be
what eventually appears at the end of the deferral period, by using the
same builder API as controls the deferral policy for startForeground().

* If an app posts a notification via notify() then adopts that
notification with new content (i.e. uses the same notification ID) in a
call to startForeground(), there is now no deferral: the existing
notification is always updated immediately, regardless of the
notification's or the service's configuration viz deferral policy.

* Fixed a latent bug when the app called notify() to update the
notification after startForeground(), then the service was killed for
memory and relaunched.  The notification might have been reposted with
stale content.

* Adjusted the metrics handling to more accurately express "was display
of the notification content for this transition to the FGS mode
deferred?"

Bug: 178406514
Bug: 185771298
Bug: 187860135
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Test: atest CtsAppTestCases:NotificationManagerTest
Change-Id: Ieb62f7195eb619c1769e3c1bd518cb6a7b6e4b7c
2021-05-27 12:57:11 -07:00
Ryan Mitchell
c0416698db Disable incremental hardening on own resources
When an application is incrementally installed, and a resources
operation fails due to the resources not being fully present,
the app should crash instead of swallowing the error and
returning default values to not alter the experience of
using the application.

Disable IncFsFileMap protections on ApkAssets that are a part of the
application that is running (base and splits).

Bug: 187220960
Test: atest ResourcesHardeningTest
Change-Id: Ibc67aca688720f983c7c656f404593285a54999b
2021-05-27 09:50:36 -07:00
Bernardo Rufino
365d013e43 Merge "Fix background bypass via notifications" into sc-dev 2021-05-27 10:48:45 +00:00
TreeHugger Robot
018e114202 Merge "Create ActivityClientRecord early in preExecute" into sc-dev 2021-05-27 03:50:20 +00:00
Jon Spivack
de1d8b4092 Allow AssistDataRequester to fetch AssistContent without AssistStructure
This provides a new request type for AssistDataRequester, ASSIST_CONTEXT_CONTENT. Using this prevents ActivityTaskManagerService from sending the potentially large AssistStructure when it isn't necessary.

Bug: 189164641
Test: Manual (confirmed the new call worked as expected on Pixel 3A)
Change-Id: I5cec15c88c52f8319808aee474cc2351f2fa931a
2021-05-26 17:45:16 -07:00
Jing Ji
980dc5ae12 Don't call onNullBinding when the service host is dead
Bug: 189038850
Test: atest CtsAppTestCases
Change-Id: I8bcdaf545ee8ca46327fc25c14d9821e288600a4
2021-05-26 14:01:06 -07:00
Jeff DeCew
31b55249e8 Do not show the custom views of spoofing notitifactions.
Fixes: 189189308
Fixes: 189189219
Fixes: 189189310
Fixes: 189078626
Test: lots of manual testing with custom views
Change-Id: I069a83288f72803b6d0956899a44a527a7758c18
2021-05-26 16:40:54 -04:00
Bernardo Rufino
5fbeff59df Fix background bypass via notifications
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
2021-05-26 16:25:39 +01:00