Commit Graph

424299 Commits

Author SHA1 Message Date
TreeHugger Robot
0b1782d6b4 Merge "Removes strong ref to Activity from RequestFinishCallback" into qt-qpr1-dev 2019-09-10 23:23:49 +00:00
Jeff Sharkey
0e66ea6f32 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: atest android.database.sqlite.cts.SQLiteQueryBuilderTest
Test: atest FrameworksCoreTests:android.database.sqlite.SQLiteTokenizerTest
Change-Id: I0dacb53170ce573a2fe103cbff455782bfdb5d41
2019-09-10 21:16:10 +00:00
Miranda Kephart
724b363703 Merge "Merging from qt-qpr1-sysui-dev @ build 5855545" into qt-qpr1-dev 2019-09-10 20:24:03 +00:00
Varun Shah
5e67462971 Use language tags to store Configuration's locale list.
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.

Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Merged-In: I53946ed4e31de0ffe9c84875c391a7dec6f5375a
Change-Id: Idaae690f79a5c680ad0059a52be62160d9dfb5e7
2019-09-10 19:53:57 +00:00
Colin Cross
c09f17d559 Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev am: dd67a548b2
am: 18bf694f3c

Change-Id: I9481fb2063b8a38a86dd52867c4c9ad52e9b8c7a
2019-09-10 12:36:03 -07:00
Colin Cross
18bf694f3c Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev
am: dd67a548b2

Change-Id: I0aaee5386c85bf33b292cfa9241c3a0c62dedd29
2019-09-10 12:29:07 -07:00
Colin Cross
dd67a548b2 Merge "Revert "Use language tags to store Configuration's locale list."" into qt-dev 2019-09-10 19:18:48 +00:00
Varun Shah
68cdb74d91 Revert "Use language tags to store Configuration's locale list."
This reverts commit ff43f4e6a6.

Reason for revert: b/140813780

Change-Id: Id5988b9ec959ca9b294f6bd5caa30c8156238d0a
2019-09-10 18:30:47 +00:00
Kweku Adams
bf27786ba4 Enter quick doze with non-wakeup alarm.
If a user has an AlarmClock going off within the next hour, the device
won't go into deep Doze. When in Battery Saver, the system tries to
enter deep Doze faster, scheduling an alarm one minute after the screen
turns off to enter deep Doze. This conflict results in the system
scheduling a wakeup alarm every minute until the AlarmClock alarm.
Switching to a non-wakeup alarm prevents the system from waking up every
minute if the device is in Battery Saver mode and there's an AlarmClock
scheduled within the next hour.

Bug: 135975445
Test: atest com.android.server.DeviceIdleControllerTest
Change-Id: Ia60ec769979dc9a792dc73f2a6a646397af7adcb
Merged-In: I98bf4131b7b4a1006e37aa42bcbc7dda7e137d1d
2019-09-10 18:19:04 +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
Mark Renouf
1c25fc531f Removes strong ref to Activity from RequestFinishCallback
This change eliminates the strong reference from
RequestFinishCallback to Activity.

Bug: 139782368
Test: Open then finish an activity within an ongoing app process
      Observe the Activity instance is no longer strongly reachable
      in the app process after onDestroy() completes.

Change-Id: I13e9707e96721a2d491629147337aaedc3473651
2019-09-10 14:08:36 -04:00
Jeff Sharkey
13f49c4259 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
Bug: 135269143
Test: atest DownloadProviderTests
Test: atest CtsAppTestCases:android.app.cts.DownloadManagerTest
Change-Id: Iec1e8ce18dc4a9564318e0473d9d3863c8c2988a
2019-09-10 11:07:32 -07:00
Varun Shah
6540f10816 Merge "Use language tags to store Configuration's locale list." into qt-dev am: bdfd7d6adb
am: ec466c0a8e

Change-Id: If5fbf5869ebed425d2df0d5472d7bbe859fb6505
2019-09-10 10:17:23 -07:00
Varun Shah
876b7721e8 Fix bootloop issue with UsageStatsService. am: 669d886cdc
am: ee3d800165

Change-Id: I072386698c090d4609b1315c9cae03897244dc2d
2019-09-10 10:17:18 -07:00
Varun Shah
ec466c0a8e Merge "Use language tags to store Configuration's locale list." into qt-dev
am: bdfd7d6adb

Change-Id: I2ed88e4ce5bd3a00cc9ea951815c17c57a6599a2
2019-09-10 10:10:25 -07:00
Varun Shah
ee3d800165 Fix bootloop issue with UsageStatsService.
am: 669d886cdc

Change-Id: Iab6f4086aa2bd2b5709f499b85ce79359cd76829
2019-09-10 10:10:20 -07:00
Arthur Hung
0ede6e94b9 Fix touch goes to the window behide PiP
When an Acitivty enter PictureInPicture mode, the pip input consumer
would be created and show the PipMenuActivity at first entry
(MENU_STATE_CLOSE) or show full menu (MENU_STATE_FULL) if user clicks
the pip window.

So in order to control the pip wndow dragging and menu, the pip input
consumer would be destoryed when menu window has shown, and it would be
created when the pip window starts to drag or the menu has hidden.
And the menu window should also has the flag FLAG_SLIPPERY to make sure
touch can through to the pip input consumer, but it could not guarantee
which window can receive the touch.

This patch would make sure all touch events except ACTION_OUTSIDE can
go through pip input consumer because it's above the pip window and it
can integrate all behaviors like window dragging or show menu in
PipTouchHandler without doing same thing and adding FLAG_SLIPPERY in
PipMenuActivity.

Test: atest PinnedStackTests
Test: atest SystemUITests
Bug: 139805619
Change-Id: I35f9eba867561168384d0a0d6c0608a6dbdf6a09
(cherry picked from commit d52d119330)
2019-09-10 17:09:56 +00:00
Lucas Dupin
79300f15d7 Merge "Fix issue where notif wouldn't HUN" into qt-qpr1-dev 2019-09-10 16:52:19 +00:00
Varun Shah
bdfd7d6adb Merge "Use language tags to store Configuration's locale list." into qt-dev 2019-09-10 16:51:37 +00:00
TreeHugger Robot
c7bc6811ee Merge "Import translations. DO NOT MERGE" into qt-qpr1-dev 2019-09-10 15:45:33 +00:00
TreeHugger Robot
f1d7d5e2d9 Merge "Import translations. DO NOT MERGE" into qt-qpr1-dev 2019-09-10 15:19:55 +00:00
Bill Yi
ae5f3cd1c7 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I73f4e9c441b4ac2442ccddfd721457509d30b17a
2019-09-10 07:20:14 -07:00
Ryan Mitchell
bb2cef6b04 Dump all users when dumpsys overlay is invoked
Currently bugreports are missing OMS settings for non-system users. This
change dumps overlay information for all users when the --user flag is
not provided and it fixes the --user flag not parsing the specified id
correctly.

Bug: 137796495
Bug: 136549878
bug: 140734485
Test: manual
Change-Id: I0d545253179b3545307b88b3151d11fd9e6cbd5b
(cherry picked from commit b7ef06ac37)
2019-09-10 06:27:06 +00:00
Bill Yi
4721b6583a Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I9a01f4272e5fc8b0712515b32abdc6f562217c0f
2019-09-09 20:47:04 -07:00
Anthony Hugh
fcb2ce1503 Merge "Refactor PermissionManager.SPLIT_PERMISSIONS" into qt-qpr1-dev 2019-09-10 02:06:22 +00:00
Jing Ji
afeaaa3c34 Merge "Proper fix for the LRU IndexOutOfBoundsException" into qt-qpr1-dev 2019-09-10 00:38:16 +00:00
Anthony Hugh
6f5eadc0d3 Refactor PermissionManager.SPLIT_PERMISSIONS
Creating a SystemConfig from a non-system process is taking 500+ ms.
This CL instead exposes the needed split permissions from system_server
to optimize performance.

Tested locally and creating PermissionManager / retrieving SystemConfig
is now less than 1 ms.

Bug: 139828734
Bug: 139485700
Fixes: 139828734
Test: Added systrace / logs to PermissionController app and traced
runtime of onGrantDefaultRoles().

Merged-In: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
Change-Id: I111403e8dae3bc2b0acafc32e61aa5cd890fea29
(cherry picked from commit f69c71e25889d8a9d66da05ee0f386d7fb626c6c)
2019-09-09 15:49:04 -07:00
Zongheng Wang
1f9309bd11 Set default phonebook access to ACCESS_REJECTED when user didn't choose
one

When there's no users' choice to tell us whether to share their
phonebook information to the Bluetooth device, set the phonebook access
permission to ACCESS_REJECTED.

Bug: 138529441
Test: Manual test
Change-Id: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
Merged-In: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
2019-09-09 22:43:54 +00:00
Varun Shah
ff43f4e6a6 Use language tags to store Configuration's locale list.
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.

Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Change-Id: Id0e63ae4a7be578d1e93838b371320f86a787e0e
2019-09-09 22:41:54 +00:00
Zongheng Wang
02046b4f2c Set default phonebook access to ACCESS_REJECTED when user didn't choose
one

When there's no users' choice to tell us whether to share their
phonebook information to the Bluetooth device, set the phonebook access
permission to ACCESS_REJECTED.

Bug: 138529441
Test: Manual test
Change-Id: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
Merged-In: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
2019-09-09 22:41:43 +00:00
Varun Shah
669d886cdc Fix bootloop issue with UsageStatsService.
When the configurations are being read from the proto file, if a
duplicate locale is found in the list, an exception is thrown from
LocaleList which causes the UsageStatsService to crash. Instead, we'll
now log a WTF if duplicate locales are found when parsing the
configuration proto and not add the duplicate locale to the list.

Bug: 140197723
Test: atest UsageStatsDatabaseTest
Change-Id: Ie178b3cfdd45e6771a7c0e4bb42e47f79b5c30cc
(cherry picked from commit 5d9031dbee)
2019-09-09 22:41:22 +00:00
Zongheng Wang
9b3cb0f06b Set default phonebook access to ACCESS_REJECTED when user didn't choose
one

When there's no users' choice to tell us whether to share their
phonebook information to the Bluetooth device, set the phonebook access
permission to ACCESS_REJECTED.

Bug: 138529441
Test: Manual test
Change-Id: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
Merged-In: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
2019-09-09 22:40:07 +00:00
Zongheng Wang
efdcff2452 Set default phonebook access to ACCESS_REJECTED when user didn't choose
one

When there's no users' choice to tell us whether to share their
phonebook information to the Bluetooth device, set the phonebook access
permission to ACCESS_REJECTED.

Bug: 138529441
Test: Manual test
Change-Id: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
Merged-In: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
(cherry picked from commit 810c6d2117)
2019-09-09 22:33:55 +00:00
Yin-Chia Yeh
3b93a85b6a Camera: fix NPE in buffer error callback
Check if the error stream has been removed first.
Also move some code in submitCaptureRequest so that access to
mConfiguredOutputs is within scope of mInterfaceLock, which
matches all other places accessing mConfiguredOutputs in the file.

Test: Camera CTS
Bug: 140374093, 140527066
Change-Id: I84921eb3a555f67a006548865f34502ab978e33b
2019-09-09 14:59:59 -07:00
Miranda Kephart
a9d49862c5 Merging from qt-qpr1-sysui-dev @ build 5855545
Test: manual, presubmit on the source branch

Merged-In: Ibc2bb3a04ee5605660ff4f2cf762af499db237c8
Merged-In: I5a0abda9ff5f85ceaaa20d3e145a207add7a4b53
Change-Id: I80283c2e935b4df3bc8b039d68d4830083513faf
2019-09-09 21:32:46 +00:00
Lucas Dupin
1946d87344 Fix issue where notif wouldn't HUN
DozeSensors and DozeTriggers have code that perform proximity
checks in slightly different ways. DozeSensors was updated as
part of ag/9185335 bug DozeTriggers wasn't.

Bug: 9185335
Fixes: 140701062
Test: partially cover prox, send notification, look at screen
Change-Id: Ic85181abb3edd4c77c427faefa4cd6b9c35b498f
2019-09-09 14:06:55 -07:00
Jonathan Scott
4096a80640 [automerger skipped] [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36 am: 7b6a04fceb am: 743846742d am: 0b1d526f50 am: e4ddc22035 am: 5f619835ed am: a6ce09aaec -s ours am: 81e2e1f105 -s ours
am: beb8996741 -s ours
am skip reason: change_id I2bce277ff8f2de4614e19d5385fe6712b076f9c9 with SHA1 a5e4422d14 is in history

Change-Id: Ie9d143876a093c760311c899249f2be8badabaf0
2019-09-09 13:32:25 -07:00
Jonathan Scott
beb8996741 [automerger skipped] [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36 am: 7b6a04fceb am: 743846742d am: 0b1d526f50 am: e4ddc22035 am: 5f619835ed am: a6ce09aaec -s ours
am: 81e2e1f105 -s ours
am skip reason: change_id I2bce277ff8f2de4614e19d5385fe6712b076f9c9 with SHA1 a5e4422d14 is in history

Change-Id: I0cff860765798db98867e14c2fde35807fc7e299
2019-09-09 13:25:25 -07:00
Jonathan Scott
81e2e1f105 [automerger skipped] [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36 am: 7b6a04fceb am: 743846742d am: 0b1d526f50 am: e4ddc22035 am: 5f619835ed
am: a6ce09aaec -s ours
am skip reason: change_id I2bce277ff8f2de4614e19d5385fe6712b076f9c9 with SHA1 a5e4422d14 is in history

Change-Id: I8b70e43d7ef03f0f86c75270508a6757d90c8561
2019-09-09 13:09:27 -07:00
Jonathan Scott
a6ce09aaec [automerger] Add MANAGED_PROVISIONING_DPC_DOWNLOADED (nyc). am: 20e5d92613 am: c1ec4d6e8e am: 80e1c4fd36 am: 7b6a04fceb am: 743846742d am: 0b1d526f50 am: e4ddc22035
am: 5f619835ed

Change-Id: Ie2c9fb05e3245f3045f3c9a4919760e70285fa37
2019-09-09 12:50:26 -07: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
TreeHugger Robot
fa68d79bfe Merge "DO NOT MERGE Call mutate on notification shade drawable before editing." into qt-qpr1-dev 2019-09-09 19:08:45 +00:00
TreeHugger Robot
bdab885dba Merge "Do not show status bar on first bypass attempt" into qt-qpr1-dev 2019-09-09 18:11:16 +00:00
Jing Ji
6bd77ab542 Proper fix for the LRU IndexOutOfBoundsException
Previous fix for b/126427214 would result that the target process
being inserted gets falling out of the "Activities" section. A
proper fix should be in the remove LRU process part.

Also fixed an issue during the update of client activities:
when the sub proc should be sitting at the end of the group,
ineeded it's getting inserted to a position before end index
which could be pointing to a different process group, therefore
the end result would be "mixed" group.

Bug: 139765319
Test: atest CtsAppTestCases:ServiceTest\#testActivityServiceBindingLru
      manual: launch many apps and check the activity lru dump.

Change-Id: Ic56e38854837a07b8dabd1d19ba35eb1bfe4fd7a
Merged-In: Ic56e38854837a07b8dabd1d19ba35eb1bfe4fd7a
2019-09-09 10:53:13 -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