Commit Graph

82379 Commits

Author SHA1 Message Date
Dmitry Dementyev
fedbadf57e Protect account chooser activities against overlay.
Bug: 172841550
Test: manual
Merged-In: I1a16808426934f4a8d12410576d769443e4c2a04
Merged-In: I3cd5a94386f15cf60a7fe3095b00815e4a6485ae
Change-Id: I35dc86b5721a4531447a6d99d6c30f23543130cb
2020-12-14 09:09:18 -08:00
Winson Chiu
9109ce178e Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into oc-mr1-dev 2020-12-08 00:26:44 +00:00
TreeHugger Robot
9064940495 Merge "Revoke the uri permission when the file is deleted" into oc-mr1-dev 2020-12-03 08:05:44 +00:00
Dmitry Dementyev
f312c9e864 Protect GrantCredentialsPermissionActivity against overlay. am: deddb784d0 am: 21e36702cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13021294

Change-Id: I3fe44a233948b572499797f954c304ab40d02f35
2020-11-11 14:23:35 +00:00
Dmitry Dementyev
21e36702cd Protect GrantCredentialsPermissionActivity against overlay. am: deddb784d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13021294

Change-Id: I37e60418b8f67f3223692d370ced45aae46a706f
2020-11-11 14:02:42 +00:00
Dmitry Dementyev
deddb784d0 Protect GrantCredentialsPermissionActivity against overlay.
Bug: 169763814
Test: manual
Merged-In: I15dd22791fcc61ef02b06ad51d9e4409d11c0181
Change-Id: I0d8f901d100a5e2a022c96fa6c2be75a11c58059
2020-11-10 20:48:09 +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
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
Winson
4e71b31e0c Remove updateIntentVerificationStatusAsUser from ResolverActivity
DO NOT CHERRY PICK ANYWHERE: Security issue

This API is meant to grant an app complete verification over the
domains it has declared, meaning it will always resolve the domains it
declares for web links.

This can allow an app to take over links that are unowned. Any time a
user selects "Always" when resolving an Intent in the diambiguation
dialog, this API would be called, and all subsequent resolutions of any
domain declared by the app selected would be automatically directed to
that app, with no prompt to the user.

From a quick search, it's possible that all usages of this API are
actually unintended and should be removed. Should be considered for
deprecation in the future.

Bug: 163358811

Test: none, this is not generally testable, see linked bug for context

Merged-In: Iff7f788a83af68c7fbb1c6b9a8be7b47136be2b6
Change-Id: Iff7f788a83af68c7fbb1c6b9a8be7b47136be2b6
2020-10-28 20:57:54 +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
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
00ec7767a9 Merge "Accept repeated locale as an input of LocaleList construction." into oc-dev 2020-09-10 00:02:01 +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
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
Ivan Chiang
42c44f3601 Revoke the uri permission when the file is deleted
When the file is deleted, renamed or moved, revoke all uri
permissions with the file

Bug: 157474195
Test: manual test with DocumentsUI
Test: atest DocumentsTest#testAfterMoveDocumentInStorage_revokeUriPermission
Change-Id: I4ffb183630aadb2d87b0965e8cecf88af15f4534
Merged-In: I4ffb183630aadb2d87b0965e8cecf88af15f4534
(cherry picked from commit 9efd606f43)
2020-09-01 05:27:07 +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
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
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
d903a3ef4c RESTRICT AUTOMERGE am: 59ba151854
Change-Id: Ic48f81f9259cb5bb2a3af3befcd5ef9a630c4766
2020-04-03 09:44:26 +00:00
Linus Tufvesson
0c6de1676d Merge "RESTRICT AUTOMERGE" into oc-mr1-dev 2020-04-03 09:27:20 +00:00
Linus Tufvesson
59ba151854 RESTRICT AUTOMERGE
This reverts commit 0bb93d4b1c.

Reason for revert: Breaks apps using Presentation in combination with private virtual displays

Bug: 141745510
Change-Id: I6673946137d6b12fa725e6df1c936068dedc3787
2020-04-01 13:31:51 +00:00
Linus Tufvesson
41215b67a3 RESTRICT AUTOMERGE
This reverts commit 7d4adf4d46.

Reason for revert: Breaks apps using Presentation in combination with private virtual displays

Bug: 141745510
Change-Id: I15ded4f1a7cf152e331c853c128c91db173f3cd7
2020-04-01 13:31:34 +00:00
Automerger Merge Worker
d6f71caed5 RESTRICT AUTOMERGE am: 0bb93d4b1c
Change-Id: I7569bed67b835e6f9e86ca2b0dc1b3e6309545c7
2020-03-11 05:08:32 +00:00
TreeHugger Robot
3e2869e2c0 Merge "RESTRICT AUTOMERGE Block TYPE_PRESENTATION windows on default display" into oc-mr1-dev 2020-03-11 04:53:42 +00:00
Linus Tufvesson
0bb93d4b1c RESTRICT AUTOMERGE
Block TYPE_PRESENTATION windows on default display

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

Bug: 141745510
Test: manual test via test app
Change-Id: I2aaab1903dee54190338f7b6e49888aa51437108
2020-03-09 20:57:08 +00:00
Linus Tufvesson
7d4adf4d46 RESTRICT AUTOMERGE
Block TYPE_PRESENTATION windows on default display

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

Bug: 141745510
Test: manual test via test app
Change-Id: I2aaab1903dee54190338f7b6e49888aa51437108
2020-03-09 20:54:52 +00:00
Christopher Tate
874c974f73 DO NOT MERGE - Kill apps outright for API contract violations
...rather than relying on in-app code to perform the shutdown.

Backport of security fix.

Bug: 128649910
Bug: 140108616
Test: manual
Test: atest OsHostTests#testForegroundServiceBadNotification
Change-Id: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
Merged-In: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
2020-02-07 01:33:28 +00:00
Automerger Merge Worker
8e5d6a25b2 Fix potential double destroy of AssetManager am: 93320661ca am: aefc05c016
Change-Id: I52d6c83fd2585d8fdc5917e72e37dd1c2d11f9e0
2020-01-29 00:20:28 +00:00
Automerger Merge Worker
aefc05c016 Fix potential double destroy of AssetManager am: 93320661ca
Change-Id: I929bc83477f4698d78cef92d78934f3dd0b3c140
2020-01-29 00:03:12 +00:00
Ryan Mitchell
93320661ca Fix potential double destroy of AssetManager
Assume there is a XmlBlock [X] created by a AssetManager [A]
([A] will have mNumRefs = 2). After [A].close is called
(mNumRefs = 1) and then both [X] and [A] are going to be GCed,
if [A].finalize is called first (nativeDestroy), the later
[X].finalize will invoke [A].xmlBlockGone that triggers the
second nativeDestroy of [A] and leads to crash.

By clearing the mObject in AssetManager.finalize, the
decRefsLocked from other paths won't call nativeDestroy again.

Bug: 144028297
Test: atest android.security.cts.AssetManagerTest

Change-Id: Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1
Merged-In: Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1
2020-01-16 20:48:57 +00:00
Automerger Merge Worker
bf965b484f DO NOT MERGE back porting for fixing sysui direct reply am: 08aae90860 am: a37fe87922
Change-Id: Ic5b84e6b650b01d38801a2ff39c059a51173fe0b
2019-12-12 06:49:56 +00:00
Automerger Merge Worker
a37fe87922 DO NOT MERGE back porting for fixing sysui direct reply am: 08aae90860
Change-Id: Iebebd941ee806b4e06d35f2134113f609160396f
2019-12-12 05:00:18 +00:00
Yohei Yukawa
08aae90860 DO NOT MERGE back porting for fixing sysui direct reply
Root cause: systemui run as user 0 service to handle all of users'
notifications. And, the users can user the copy/cut/paste
functionality.

Solution: To crate @hide API in TextView let SystemUI to mark the
TextView instance should check if the power of
INTERACT_ACROSS_USER_FULL is needed to be restricted.
e.x. Keyguard password textview/Notificaiton entries

Bug: 123232892
Test: manual test
Reference: I6d11e4d6a84570bc2991a8552349e8b216b0d139
Reference: Ibabe13e5b85e5bb91f9f8af6ec07c395c25c4393
Reference: I975baa748c821538e5a733bb98a33ac609bf40a7

Change-Id: I6d11e4d6a84570bc2991a8552349e8b216b0d139
Merged-In: Ie3daecd1e8fc2f7fdf37baeb5979da9f2e0b3937
Merged-In: I6d11e4d6a84570bc2991a8552349e8b216b0d139
2019-11-12 02:40:42 +00:00
Seigo Nonaka
709e9e6855 RESTRICT AUTOMERGE Revive runLimit check logic am: b730f1984f
am: 2af4f537ff

Change-Id: Ia671d3f5a7fa62c80dd3c2468d199ce66fe734f1
2019-10-16 17:26:09 -07:00
Seigo Nonaka
2af4f537ff RESTRICT AUTOMERGE Revive runLimit check logic
am: b730f1984f

Change-Id: I329515d36c12ee5e12a63262ff7db8daff350832
2019-10-16 17:14:15 -07:00
Seigo Nonaka
b730f1984f RESTRICT AUTOMERGE
Revive runLimit check logic

The runLimit check logic was accidentally removed by
I7089ed9b711dddd7de2b27c9c2fa0fb4cb53a735

Bug: 142134328
Bug: 140632678
Test: Manually done with reported step
Test: StaticLayoutTest passes
Change-Id: Ib1d5efdcb9adcc18a6a43370dc016ea464f48148
2019-10-16 22:12:04 +00:00
Seigo Nonaka
af62f3a7b3 RESTRICT AUTOMERGE Do not compute outside given range in TextLine am: 4ce901e405
am: b51c7bb175

Change-Id: I6770f4b1a884020c374a75f67eb762b2c2bfd538
2019-10-02 09:59:45 -07:00
Seigo Nonaka
b51c7bb175 RESTRICT AUTOMERGE Do not compute outside given range in TextLine
am: 4ce901e405

Change-Id: I739746d80a8dd29998a67c1d9aaa2d3f804ac57c
2019-10-02 09:33:53 -07:00
Seigo Nonaka
4ce901e405 RESTRICT AUTOMERGE
Do not compute outside given range in TextLine

This is second attempt of I646851973b3816bf9ba32dfe26748c0345a5a081
which breaks various layout test on application.
The empty string must be also handled by the TextLine since it
retrieves the default line height from the empty string.

Bug: 140632678
Test: StaticLayoutTest
Test: Manually done
Change-Id: I7089ed9b711dddd7de2b27c9c2fa0fb4cb53a735
2019-09-30 17:33:07 +00:00