Commit Graph

103278 Commits

Author SHA1 Message Date
Dmitry Dementyev
10d8a114bb Ignore GrantCredentials call with unexpected calling uid.
Activity can be used only in two cases.
1) Calling uid matches uid grantee.
2) Calling uid is is system. This flow is used by getToken methods with
notifyAuthFailure=true.

Test: Existing CTS tests
Bug: 158480899
Change-Id: I1421c333b6cebb4f7cddcdd8766298f6872e933b
2020-11-10 16:05:58 -08:00
Dmitry Dementyev
1d3492e181 Merge "Revert "Ignore GrantCredentials call with unexpected calling uid."" into pi-dev am: 888ba5ee1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13028859

Change-Id: I25446d7e0cb9eec2b98cf630bd85db30a007f6a0
2020-11-10 22:23:04 +00:00
Dmitry Dementyev
888ba5ee1a Merge "Revert "Ignore GrantCredentials call with unexpected calling uid."" into pi-dev 2020-11-10 21:44:51 +00:00
Dmitry Dementyev
c1097a8488 Revert "Ignore GrantCredentials call with unexpected calling uid."
This reverts commit 4f0084580d.

Reason for revert: Build breakage - b/172932743

Bug: 172932743
Change-Id: Iee0a5e2b84e5d89a206b099f75a15e714a332ff4
2020-11-10 21:44:34 +00:00
TreeHugger Robot
b2f3dc0083 Merge "Check that Account Parcel has name and type." into oc-dev am: 3349eaa9e8 am: 01f2d401c9 am: e0efbc5fbb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12999920

Change-Id: I72a0a54f22b8ebd457db1c7fa8b3757bc1f0f327
2020-11-10 20:25:01 +00:00
TreeHugger Robot
e0efbc5fbb Merge "Check that Account Parcel has name and type." into oc-dev am: 3349eaa9e8 am: 01f2d401c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12999920

Change-Id: I0e4803e7aafd730b9e21e49dc350ee51eedf42d8
2020-11-10 19:56:49 +00:00
TreeHugger Robot
01f2d401c9 Merge "Check that Account Parcel has name and type." into oc-dev am: 3349eaa9e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12999920

Change-Id: Id4c8eb30ffbe0886360dcd3bde1ada4f08ffdefa
2020-11-10 19:40:01 +00:00
TreeHugger Robot
3349eaa9e8 Merge "Check that Account Parcel has name and type." into oc-dev 2020-11-10 19:22:49 +00:00
Dmitry Dementyev
2d868147e4 Ignore GrantCredentials call with unexpected calling uid. am: 88787b77a0 am: 2e5fe473e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12940344

Change-Id: Id30e803ed372bff60a3242a1667c5bd52cb12728
2020-11-06 22:52:46 +00:00
Dmitry Dementyev
2e5fe473e1 Ignore GrantCredentials call with unexpected calling uid. am: 88787b77a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12940344

Change-Id: I87590ebfc45dea9c8a9d0ad46882ef03eb8fd5b9
2020-11-06 22:04:03 +00:00
Dmitry Dementyev
88787b77a0 Ignore GrantCredentials call with unexpected calling uid.
Activity can be used only in two cases.
1) Calling uid matches uid grantee.
2) Calling uid is is system. This flow is used by getToken methods with
notifyAuthFailure=true.

Test: Existing CTS tests
Bug: 158480899
Merged-In: I983fa
Change-Id: I8da362df269decd7c3930a2387f42e09796e732f
2020-11-06 19:34:05 +00:00
TreeHugger Robot
9bca2e2c06 Merge "Ignore GrantCredentials call with unexpected calling uid." into pi-dev am: 5409071886
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12933114

Change-Id: If00e93aa992441865a0d27ee2971b43a221fd2dc
2020-11-06 19:28:14 +00:00
Dmitry Dementyev
0992000ace Check that Account Parcel has name and type.
Bug: 129287265
Test: manual
Change-Id: I8431eb27cc4c6dfd3048b28ff635474f14433308
(cherry picked from commit 32e8579638)
2020-11-06 00:37:40 +00:00
Dmitry Dementyev
4f0084580d Ignore GrantCredentials call with unexpected calling uid.
Activity can be used only in two cases.
1) Calling uid matches uid grantee.
2) Calling uid is is system. This flow is used by getToken methods with
notifyAuthFailure=true.

Test: Existing CTS tests
Bug: 158480899
Change-Id: I983fac0ae742bbd426cbc02e854564083702a89f
2020-11-05 21:56:36 +00:00
David Su
60cf3eebd5 Merge "Backport sendBroadcastAsUserMultiplePermissions to oc-dev" into oc-dev am: d1bcf628bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12724292

Change-Id: Ic35e179d67e2804f71d53489101d1c6efc05f156
2020-10-07 01:03:33 +00:00
Tyler Gunn
ea7ef4ad2a Backport sendBroadcastAsUserMultiplePermissions to oc-dev
Bug: 159373687
Test: Verify Settings still works correctly.

Change-Id: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
Merged-In: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
2020-09-29 21:52:45 +00:00
Tyler Gunn
e57c25a451 Backport sendBroadcastAsUserMultiplePermissions to oc-dev
Bug: 159373687
Test: Verify Settings still works correctly.

Change-Id: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
Merged-In: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
2020-09-29 03:18:18 +00:00
Pinyao Ting
4cab9c3876 Fix the issue provider can be wrong when requesting slice permission
SlicePermissionActivity reads provider_pkg from intent, which can be
modified at will. As a result user might see incorrect package name in
the dialog granting slice permission.

Bug: 159145361
Test: manual
Merged-In: I8b66c02786df4096dad74b7e76255d5ddd1d609d
Change-Id: I8b66c02786df4096dad74b7e76255d5ddd1d609d
(cherry picked from commit 0ad32a2d70)
2020-09-24 15:33:58 -07:00
Pinyao Ting
149bb7e038 Fix the issue provider can be wrong when requesting slice permission
SlicePermissionActivity reads provider_pkg from intent, which can be
modified at will. As a result user might see incorrect package name in
the dialog granting slice permission.

Bug: 159145361
Test: manual
Merged-In: I8b66c02786df4096dad74b7e76255d5ddd1d609d
Change-Id: I8b66c02786df4096dad74b7e76255d5ddd1d609d
(cherry picked from commit 0ad32a2d70)
2020-09-24 19:06:32 +00:00
TreeHugger Robot
71151c2788 Merge "Accept repeated locale as an input of LocaleList construction." into oc-dev am: 00ec7767a9 am: 9d81730088
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12522926

Change-Id: I6ca62a6deda554f8205ddcbe1df79f109f4ff0ad
2020-09-10 00:36:56 +00:00
TreeHugger Robot
9d81730088 Merge "Accept repeated locale as an input of LocaleList construction." into oc-dev am: 00ec7767a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12522926

Change-Id: I8e3f0fde0a0a2bbe9027ea00541c41cccbb512ed
2020-09-10 00:20:18 +00:00
TreeHugger Robot
9c70259e2b Merge "[CS] Add an option to block sensitive network specifier" into pi-dev 2020-09-10 00:16:15 +00:00
TreeHugger Robot
00ec7767a9 Merge "Accept repeated locale as an input of LocaleList construction." into oc-dev 2020-09-10 00:02:01 +00:00
TreeHugger Robot
06adb3f55c Merge "Sanitize more of the notification text fields" into pi-dev am: c0ec138c47
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512485

Change-Id: Ie8e9b9a1273f5fd48a038f16749a7ecdd85078cf
2020-09-09 23:57:36 +00:00
TreeHugger Robot
c0ec138c47 Merge "Sanitize more of the notification text fields" into pi-dev 2020-09-09 23:42:57 +00:00
TreeHugger Robot
394fb1c82f Merge "Accept repeated locale as an input of LocaleList construction." into pi-dev am: 7411fd94a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12513538

Change-Id: I3a9d2b3758cb3bbb5eecdf284d838f2475bb1d43
2020-09-09 23:00:32 +00:00
Julia Reynolds
2d7d8c2604 DO NOT MERGE Sanitize more of the notification text fields am: db023fcd73
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512962

Change-Id: I4c847573b6ce8032084eeeee4835bd38be9c6c79
2020-09-09 22:32:12 +00:00
Julia Reynolds
db023fcd73 DO NOT MERGE Sanitize more of the notification text fields
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092

Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
2020-09-08 15:50:36 +00:00
Julia Reynolds
f6f287a1ef DO NOT MERGE Sanitize more of the notification text fields
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092

Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
2020-09-08 15:13:59 +00:00
Etan Cohen
9b1d701af4 [CS] Add an option to block sensitive network specifier
Network specifiers are used for 2 purposes:

- As part of network requests to specify more information on the type
  of requested networks.
- On network agents to specify information about their networks.

The network specifiers of the requests and agents are matched to each
other. However, the agent network specifier may contain sensitive
information which we do not want forwarded to any app.

This CL adds an option to strip out this agent network specifier before
the network capabilities are forwarded to the app.

Bug: 161853197
Bug: 161370134
Test: atest ConnectivityServiceTest (frameworks/base/tests/net)
Test: atest frameworks/base/tests/net
Test: atest frameworks/opt/net/wifi/tests/wifitests
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks/opt/net/ethernet/tests
Test: atest android.net.cts - some flakiness!
Test: act.py ThroughputTest
Test: act.py DataPathTest
Test: atest SingleDeviceTest (cts)
Change-Id: I38ed3ff88532ef522ab167c88d87e6e82295ffc5
Merged-In: If08d312ff814bdde1147518f923199e6349503d5
2020-09-07 00:37:33 +00:00
Seigo Nonaka
2cb650f9d0 Accept repeated locale as an input of LocaleList construction.
Repeated locale has not been accepted and IllegalArgumentException
is thrown. Instead of throwing exception, dropping repeated locale
instead.

Bug: 152410253
Test: atest LocaleListTest
Change-Id: I80f243678ac3024eaeb0349f770cff897df7f332
2020-09-04 02:14:08 +00:00
Seigo Nonaka
33ee46389e Accept repeated locale as an input of LocaleList construction.
Repeated locale has not been accepted and IllegalArgumentException
is thrown. Instead of throwing exception, dropping repeated locale
instead.

Bug: 152410253
Test: atest LocaleListTest
Change-Id: I80f243678ac3024eaeb0349f770cff897df7f332
2020-09-04 02:13:30 +00:00
Julia Reynolds
7857da6431 Sanitize more of the notification text fields
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092

Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
2020-09-03 19:38:08 +00:00
Patrick Baumann
929ab61a14 RESTRICT AUTOMERGE
Do not set referrerUri on SessionInfo for non-owners

This change leaves the referrerUri field null when the caller leading to
its production is not the owner of the session.

Bug: 142125338
Test: Manual via test app in related bug
Change-Id: I84679ea0636aa2097e25e23813c48134c9cc1d75
2020-07-31 16:55:24 +00:00
Patrick Baumann
681b236422 RESTRICT AUTOMERGE
Do not set referrerUri on SessionInfo for non-owners

This change leaves the referrerUri field null when the caller leading to
its production is not the owner of the session.

Bug: 142125338
Test: atest SessionReferrerUriTest
Change-Id: I84679ea0636aa2097e25e23813c48134c9cc1d75
2020-07-27 10:24:11 -07:00
Patrick Baumann
6ad6ca2dbb Do not set referrerUri on SessionInfo for non-owners
This change leaves the referrerUri field null when the caller leading to
its production is not the owner of the session.

Bug: 142125338
Test: atest SessionReferrerUriTest

Merged-In: I84679ea0636aa2097e25e23813c48134c9cc1d75
Change-Id: I84679ea0636aa2097e25e23813c48134c9cc1d75
2020-06-26 16:22:07 +00:00
Diksha Gohlyan
63369efdc7 Merge "Add back enforceReadPermission for getmetadata" into pi-dev 2020-06-03 17:47:43 +00:00
TreeHugger Robot
278c4994b6 Merge "RESTRICT AUTOMERGE" into qt-dev 2020-06-03 12:09:07 +00:00
Linus Tufvesson
c2a8913cf0 RESTRICT AUTOMERGE am: 78fe3b0aa2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11375232

Change-Id: I38516ab9216169c555e702947a5448c142648c90
2020-06-03 11:35:02 +00:00
Martijn Coenen
a15d846108 Use killProcessGroup when killing app zygote.
To make sure we kill all untracked children, too.

Bug: 156741968
Bug: 157598956
Test: manual inspection, PoC no longer works.
Change-Id: I5d8efeb05ddec08a7fc7c00eabca6590c4cfdd8c
2020-05-29 14:33:27 +00:00
Kevin Chyn
c1f5869518 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941
Change-Id: I18eb6c4cd9c42f3cc1d1051b47aafeeffb6b0c16
2020-05-07 01:02:48 +00:00
Diksha Gohlyan
71ec29b050 Add back enforceReadPermission for getmetadata
Test: manually tested
Bug: 151095863

Change-Id: I29ef120c10c488550b85269e598aeb6ff9505038
Merged-In: I4f04f08f76d039196c2c67bac80d4a46ebec87f2
2020-05-07 00:59:03 +00:00
Kevin Chyn
f21b907b1b Revert "Check Read permissions when getDocumentMetadata"
This reverts commit c94646177c.

Reason for revert: 155930637

Change-Id: Id452d316d1c1721fce715474df009ebe0fb719e8
2020-05-07 00:39:46 +00:00
Diksha Gohlyan
ada451e47c Merge "Check Read permissions when getDocumentMetadata" into pi-dev am: 4371baafc1
Change-Id: Ib242d6ed7ff376a71f85a03aa06f2c0453638310
2020-05-06 23:05:34 +00:00
Diksha Gohlyan
c94646177c Check Read permissions when getDocumentMetadata
Test: manually tested
Bug: 151095863

Change-Id: I4f04f08f76d039196c2c67bac80d4a46ebec87f2
(cherry picked from commit 0e75809955)
2020-05-05 20:00:05 +00:00
Linus Tufvesson
2bf126d042 RESTRICT AUTOMERGE
This change is the union of
I2aaab1903dee54190338f7b6e49888aa51437108 and I58834636e092f992e403342e36b475dc60e8f20ai

Original CL descriptions:

*** I2aaab1903dee54190338f7b6e49888aa51437108
Block TYPE_PRESENTATION windows on default display

... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

*** I58834636e092f992e403342e36b475dc60e8f20a
Use TYPE_PRIVATE_PRESENTATION for private presentations
Detect if the Presenation is targeting a private virtual display, and if they
are use the windowType TYPE_PRIVATE_PRESENTATION.
***

Bug: 141745510
Test: cts-tradefed run cts -m CtsDisplayTestCases -t android.display.cts.VirtualDisplayTest
Test: Manually verfied that presentations are blocked on main display
Change-Id: I67c79c84ec2adfcdaf3b0f7bc7f0f41d30618e85
2020-05-05 18:55:09 +01:00
Linus Tufvesson
78fe3b0aa2 RESTRICT AUTOMERGE
This change is the union of
I2aaab1903dee54190338f7b6e49888aa51437108 and I58834636e092f992e403342e36b475dc60e8f20ai

Original CL descriptions:

*** I2aaab1903dee54190338f7b6e49888aa51437108
Block TYPE_PRESENTATION windows on default display

... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

*** I58834636e092f992e403342e36b475dc60e8f20a
Use TYPE_PRIVATE_PRESENTATION for private presentations
Detect if the Presenation is targeting a private virtual display, and if they
are use the windowType TYPE_PRIVATE_PRESENTATION.
***

Bug: 141745510
Test: cts-tradefed run cts -m CtsDisplayTestCases -t android.display.cts.VirtualDisplayTest
Test: Manually verfied that presentations are blocked on main display

Change-Id: I9f1c4b140ab4bc6183151aafc5501e8648fbc3fa
2020-05-05 18:48:20 +01:00
Linus Tufvesson
d663d274ea RESTRICT AUTOMERGE
This change is the union of
I2aaab1903dee54190338f7b6e49888aa51437108 and I58834636e092f992e403342e36b475dc60e8f20ai

Original CL descriptions:

*** I2aaab1903dee54190338f7b6e49888aa51437108
Block TYPE_PRESENTATION windows on default display

... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

*** I58834636e092f992e403342e36b475dc60e8f20a
Use TYPE_PRIVATE_PRESENTATION for private presentations
Detect if the Presenation is targeting a private virtual display, and if they
are use the windowType TYPE_PRIVATE_PRESENTATION.
***

Bug: 141745510
Test: atest CtsWindowManagerDeviceTestCases:android.server.wm.PresentationTest CtsDisplayTestCases:android.display.cts.VirtualDisplayTest

Change-Id: I9f1c4b140ab4bc6183151aafc5501e8648fbc3fa
2020-05-05 11:13:51 +01:00
Linus Tufvesson
7faec2493b RESTRICT AUTOMERGE
This change is the union of
I2aaab1903dee54190338f7b6e49888aa51437108 and I58834636e092f992e403342e36b475dc60e8f20a

Original CL descriptions:

*** I2aaab1903dee54190338f7b6e49888aa51437108
Block TYPE_PRESENTATION windows on default display

... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

*** I58834636e092f992e403342e36b475dc60e8f20a
Use TYPE_PRIVATE_PRESENTATION for private presentations

Detect if the Presenation is targeting a private virtual display, and if they
are use the windowType TYPE_PRIVATE_PRESENTATION.
***

Bug: 141745510
Test: atest CtsWindowManagerDeviceTestCases:android.server.wm.PresentationTest CtsDisplayTestCases:android.display.cts.VirtualDisplayTest

Change-Id: I9f1c4b140ab4bc6183151aafc5501e8648fbc3fa
2020-05-01 18:34:59 +01:00
Linus Tufvesson
d903a3ef4c RESTRICT AUTOMERGE am: 59ba151854
Change-Id: Ic48f81f9259cb5bb2a3af3befcd5ef9a630c4766
2020-04-03 09:44:26 +00:00