Commit Graph

74894 Commits

Author SHA1 Message Date
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
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
Jeff Sharkey
e89348b54b RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options. am: f683c688d5
am: fc095efde0

Change-Id: I9bbeb106c1abe977439420d8005f33f5a7c1eaa1
2019-09-12 10:18:22 -07:00
Jeff Sharkey
bba6744ff4 RESTRICT AUTOMERGE Strict SQLiteQueryBuilder needs to be stricter. am: 92e5e5e45c
am: 37e2229257

Change-Id: I3d7696be9733e40f31c160a77505c4e96ca05b5e
2019-09-12 10:14:00 -07:00
Jeff Sharkey
fc095efde0 RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options.
am: f683c688d5

Change-Id: I64ae89ecc92127de21503fbcfdd34c60a6f620bc
2019-09-12 10:06:09 -07:00
Jeff Sharkey
37e2229257 RESTRICT AUTOMERGE Strict SQLiteQueryBuilder needs to be stricter.
am: 92e5e5e45c

Change-Id: I2e0a5c5cd35f9abcf362d3db4514e1bbd6bd7035
2019-09-12 10:02:05 -07:00
Jeff Sharkey
f8a2d069b4 Merge "RESTRICT AUTOMERGE Enable stricter SQLiteQueryBuilder options." into oc-dev 2019-09-12 16:33:21 +00:00
Jeff Sharkey
7633a081ab Merge "RESTRICT AUTOMERGE Strict SQLiteQueryBuilder needs to be stricter." into oc-dev 2019-09-12 16:33:13 +00:00
Jeff Sharkey
f683c688d5 RESTRICT AUTOMERGE
Enable stricter SQLiteQueryBuilder options.

Malicious callers can leak side-channel information by using
subqueries in any untrusted inputs where SQLite allows "expr" values.

This change starts using setStrictColumns() and setStrictGrammar()
on SQLiteQueryBuilder to block this class of attacks.  This means we
now need to define the projection mapping of valid columns, which
consists of both the columns defined in the public API and columns
read internally by DownloadInfo.Reader.

We're okay growing sAppReadableColumnsSet like this, since we're
relying on our trusted WHERE clause to filter away any rows that
don't belong to the calling UID.

Remove the legacy Lexer code, since we're now internally relying on
the robust and well-tested SQLiteTokenizer logic.

Bug: 135270103, 135269143
Test: cts-tradefed run cts -m CtsAppTestCases -t android.app.cts.DownloadManagerTest
Change-Id: Iec1e8ce18dc4a9564318e0473d9d3863c8c2988a
2019-09-11 23:52:37 +00:00
Jeff Sharkey
92e5e5e45c RESTRICT AUTOMERGE
Strict SQLiteQueryBuilder needs to be stricter.

Malicious callers can leak side-channel information by using
subqueries in any untrusted inputs where SQLite allows "expr" values.

This change offers setStrictGrammar() to prevent this by outright
blocking subqueries in WHERE and HAVING clauses, and by requiring
that GROUP BY and ORDER BY clauses be composed only of valid columns.

This change also offers setStrictColumns() to require that all
untrusted column names are valid, such as those in ContentValues.

Relaxes to always allow aggregation operators on returned columns,
since untrusted callers can always calculate these manually.

Bug: 135270103, 135269143
Test: cts-tradefed run cts -m CtsDatabaseTestCases -t android.database.sqlite.cts.SQLiteQueryBuilderTest
Change-Id: I6290afd19c966a8bdca71c377c88210d921a9f25
2019-09-10 18:08:57 +00:00
Jonathan Scott
5f619835ed [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36 am: 7b6a04fceb am: 743846742d am: 0b1d526f50
am: e4ddc22035

Change-Id: I4084d344b3c92b5a4459852837e323f44d2b0b72
2019-09-09 12:35:53 -07:00
Jonathan Scott
e4ddc22035 [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36 am: 7b6a04fceb am: 743846742d
am: 0b1d526f50

Change-Id: Ie3f10bbed4bdb2bb7e141d7bb8d34e0b818c3f30
2019-09-09 12:20:54 -07:00
Android Build Merger (Role)
0b1d526f50 [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36 am: 7b6a04fceb am: 743846742d
Change-Id: Ia84a02b1b3ff3e9f4849554c6b2f0e904daadd05
2019-09-09 16:55:54 +00:00
Android Build Merger (Role)
743846742d [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36 am: 7b6a04fceb
Change-Id: I8914a6337a6e6c905b42cc498f34db5142db7a1a
2019-09-09 16:55:50 +00:00
Android Build Merger (Role)
7b6a04fceb [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36
Change-Id: I6ef1648f805c48ef37c8921ddfa1d147a8e5e032
2019-09-09 16:55:45 +00:00
Android Build Merger (Role)
80e1c4fd36 [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e
Change-Id: I641d14a61338365b5da7f6c55ead2baff29e811c
2019-09-09 16:55:42 +00:00
Android Build Merger (Role)
c1ec4d6e8e [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613
Change-Id: I6b5ad877382a352cb5b4bcdd05a2d19da502945a
2019-09-09 16:55:35 +00:00
Jonathan Scott
20e5d92613 Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc).
Test: Just adding a constant
Bug: 132261064
Change-Id: I1527be03a10fa1a2fde09e3e41d6b7e83a986fc0
Merged-In: I2bce277ff8f2de4614e19d5385fe6712b076f9c9
2019-08-02 13:16:36 +00:00
Mihai Popa
09bfff78dd [automerger] Fix Layout.primaryIsTrailingPreviousAllLineOffsets am: 2778b1e49d am: 77b7393e7d am: 126189263d
am: 29534f6c57

Change-Id: Id615c055975d251f45ec995c389e4acbe1274cd8
2019-07-10 14:56:38 -07:00
Android Build Merger (Role)
5ad1deb51c [automerger] Fix Layout.primaryIsTrailingPreviousAllLineOffsets am: 7d6c02de04
Change-Id: I7fcc292a58dc297d2725ae3df99d637bbd1a8479
2019-07-10 18:02:40 +00:00