Commit Graph

640958 Commits

Author SHA1 Message Date
Anton Hansson
a325ab1202 Merge "Add visibility rules to StubLibraries.bp" am: 6c57d63fcd am: d30fc17ddd am: 8a19796728
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675886

Change-Id: Id741b27d4497f0ed76474b9bfedecb3b114765a5
2021-04-16 10:11:31 +00:00
Stanislav Zholnin
ea9ab1d98c Merge "Deduplicate discrete events for different attribution tags." into sc-dev 2021-04-16 10:08:16 +00:00
Anna Zappone
47d9ba277e Merge "Launch app unavailable dialog when WP is off" into sc-dev 2021-04-16 10:03:59 +00:00
Stevie Kideckel
fb2df70041 Ensure that the root view is an AppWidgetHostView in setRemoteAdapter
Bug: 185367016
Test: atest RemoteViewsFixedCollectionAdapterTest

Change-Id: I77d866157e97c4507243dbc2cd5411384f885458
2021-04-16 10:03:06 +00:00
Anna Zappone
a59bdc6e23 Merge "Fix some UX polish bugs" into sc-dev 2021-04-16 10:02:56 +00:00
Rubin Xu
074a8b7012 Fix LockSettingsServiceTest
* Mock out registerReceiverAsUser() to avoid SecurityException
* Mock out setKeystorePassword() to not call into the real keystore

Bug: 170661840
Test: atest com.android.server.locksettings
Change-Id: I97c33f3b21ac16d2bb92e1658c222e4d0fd1970e
2021-04-16 11:00:27 +01:00
Anton Hansson
8a19796728 Merge "Add visibility rules to StubLibraries.bp" am: 6c57d63fcd am: d30fc17ddd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675886

Change-Id: I15d463e56516f18ba0ccf2ab747ec51d5ad231e4
2021-04-16 09:44:29 +00:00
Paul Hu
3d41ec9b45 Merge "Add NWM#getWatchlistConfigHash to test api for testing" am: e87f10b9a6 am: 4d4af2bd05 am: b3ebae141f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675628

Change-Id: I08164c986c247fa36aa25afc533f9ad656ab8850
2021-04-16 09:31:07 +00:00
Riddle Hsu
b0267bd0c5 Make detached task trimmable
Otherwise Task#isOnHomeDisplay also returns false for a detached
task, which causes a task without activities is not trimmable
even if it is exclude-from-recent.

Fix: 185481296
Test: atest RecentTasksTest#testVisibleTasks_excludedFromRecents
Change-Id: I66d494376bc750563b914b18e9f4a999913c70e9
2021-04-16 17:29:05 +08:00
Stanislav Zholnin
16f0115c0e Merge "Deduplicate discrete operation before delivering result." into sc-dev 2021-04-16 09:16:45 +00:00
Anton Hansson
d30fc17ddd Merge "Add visibility rules to StubLibraries.bp" am: 6c57d63fcd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675886

Change-Id: Id66efe5b7de2ef0e25b5da316fc244cdc9301694
2021-04-16 09:13:48 +00:00
Chalard Jean
65f8e775fe [NS13] Remove the last usage of the legacy int
Note that this requires removing part of a test, because
that part is testing that the a 50 bonus of the legacy
int is stronger than the validation penalty, which is
not a mechanic we want to have. When WiFi is unvalidated
and cell is unvalidated, cell should be kept in case it
validates, like is described in comments in
isNetworkPotentialSatisfier ; however this test is
checking that it *IS* reaped off if the wifi score is
strong enough. This should be incorrect, and should not
be tested, so this patch removes the check.

Test: ConnectivityServiceTest
Bug: 184834350
Change-Id: I8966abee59fea2d9f10f082aba87df6588b72762
2021-04-16 18:13:10 +09:00
TreeHugger Robot
ac9a73d139 Merge "Fix TextClassificationTest#testToBuilder" into sc-dev 2021-04-16 09:00:08 +00:00
Paul Hu
b3ebae141f Merge "Add NWM#getWatchlistConfigHash to test api for testing" am: e87f10b9a6 am: 4d4af2bd05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675628

Change-Id: I5c23c18244f3de52f0a998eb13f33932a85d1bd1
2021-04-16 08:59:59 +00:00
Anton Hansson
6c57d63fcd Merge "Add visibility rules to StubLibraries.bp" 2021-04-16 08:52:46 +00:00
Lorenzo Colitti
9678fd13cd Merge "Don't expose raw IBinder APIs." am: 4b4cc572c0 am: 3aba6fdd68 am: 4911a46b2c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676436

Change-Id: Ic45558c739cfb065e5c9d6fb5ebf485ceb9a630f
2021-04-16 08:48:41 +00:00
Aaron Huang
6477215e37 Merge "Handle null pointer cases in ConnectivityService" am: 452dc83724 am: b3087508eb am: dddb56c96a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669646

Change-Id: I8460ed44fb1bc72a8533d2e57012ccc623f8ca73
2021-04-16 08:47:59 +00:00
Paul Hu
4d4af2bd05 Merge "Add NWM#getWatchlistConfigHash to test api for testing" am: e87f10b9a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675628

Change-Id: Ic1085f8b330d6e0832f56877a915cbfc42f7aa47
2021-04-16 08:34:57 +00:00
Nathalie Le Clair
1b49368d9f Treat TV_POWER as POWER on non-CEC sink
If a non-CEC sink is detected, KEYCODE_TV_POWER will now fall back on KEYCODE_POWER.
This change uses an existing detection mechanism, until now only used to
inform listeners about a non-CEC sink.

Before this change, CEC initialization triggered a DevicePowerStatusAction only if there were listeners registered.
After this change, DevicePowerStatusAction is started regardless of listeners.
Since in unit tests there are no listeners registered, this change introduced a DevicePowerStatusAction in the test setUp() method. Unit tests needed to be updated to account for this additional action:
- introduce wait times to allow for the DevicePowerStatusAction to time-out before starting a new DevicePowerStatusAction
- introduce wait times to allow for the DevicePowerStatusAction to time-out before checking that <Standby> is sent
- clear list of messages sent after DevicePowerStatusAction for tests explicitely verifying that <Give Device Power Status> is sent

Bug: 185092253
Test: atest

Change-Id: I9974c08e79aae04d3658e8ed2e3f55e77b81c558
2021-04-16 10:16:22 +02:00
Lorenzo Colitti
4911a46b2c Merge "Don't expose raw IBinder APIs." am: 4b4cc572c0 am: 3aba6fdd68
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676436

Change-Id: I42ef2c83eefc6dc4967e71be82f48cca38d74f43
2021-04-16 08:13:03 +00:00
Aaron Huang
dddb56c96a Merge "Handle null pointer cases in ConnectivityService" am: 452dc83724 am: b3087508eb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669646

Change-Id: I2821348230f093569e8149779a88d31ce2b0b322
2021-04-16 08:12:18 +00:00
Paul Hu
e87f10b9a6 Merge "Add NWM#getWatchlistConfigHash to test api for testing" 2021-04-16 08:10:33 +00:00
arthurhung
062e858a7c Add hall sensor support
The hall sensor would report fixed value fields, we have to ignore other
unused values when checking the condition.

- Only check the expected values.

Bug: 182241801
Test: manual
Change-Id: I63c17ac388e3a089914b4b8a3ca3295f90ef1cae
2021-04-16 07:59:19 +00:00
Philip Junker
5bf19edb1a Avoid null pointer exception when calling NotificationShadeWindowControllerImpl#dump
Fix: 185470518
Test: manual
Change-Id: I3a345929ed09e895f54622bd151a60f0c9acab31
(cherry picked from commit bc2ce2a664)
2021-04-16 07:51:15 +00:00
Jordan Demeulenaere
0c526ae8e9 Merge "Animate the QS gear button click." into sc-dev 2021-04-16 07:49:32 +00:00
Lorenzo Colitti
3aba6fdd68 Merge "Don't expose raw IBinder APIs." am: 4b4cc572c0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676436

Change-Id: Ic954df4bcbb444797d62077047cd74182ac06164
2021-04-16 07:42:57 +00:00
Aaron Huang
b3087508eb Merge "Handle null pointer cases in ConnectivityService" am: 452dc83724
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669646

Change-Id: I30a02b57b58cbd3197faa614d036daec7ff06bd6
2021-04-16 07:29:00 +00:00
Lorenzo Colitti
4b4cc572c0 Merge "Don't expose raw IBinder APIs." 2021-04-16 07:22:13 +00:00
Joanne Chung
fa1aa404ee Merge "[FW] Change the fake translation name to formal name." into sc-dev 2021-04-16 07:16:25 +00:00
Joanne Chung
18e0945627 Fix TextClassificationTest#testToBuilder
The PendingIntent checking was enforced in ag/14164166(cfd031a), we
should add mutability flag in the test.

Bug: 185534778
Test: atest android.view.textclassifier.TextClassificationTest
Change-Id: I551b29a7b4f7083469ee11ba5fa0d3069abc9bc1
2021-04-16 15:12:30 +08:00
Aaron Huang
452dc83724 Merge "Handle null pointer cases in ConnectivityService" 2021-04-16 07:06:37 +00:00
TreeHugger Robot
bb98628e59 Merge "[Telephony] Describe the failure case in doc" into sc-dev 2021-04-16 06:42:41 +00:00
Winson Chung
e5b567749e Skip some unnecessary allocations
- Move new matrix/rect construction to if the param is set on the
  builder, we only apply the params if the flags are set anyways
  and if the caller doesn't set those params then we are allocating
  new objects unnecessarily
- Always recycle motion event

Bug: 183756396
Test: Take memory profile when dragging pip
Change-Id: Ie7457c8c508ee61bd27daeebe486c39a5cebe7d7
2021-04-15 22:53:02 -07:00
Ken Chen
81b55fbe8c Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission to shell
The shell *already had* the privileges granted by this permission due to
specific code in netd, and it lost those privileges when it gained the
CHANGE_NETWORK_STATE permission. Explicitly add
CONNECTIVITY_USE_RESTRICTED_NETWORKS so that it can obtain sufficient
permission in netd no matter CHANGE_NETWORK_STATE is set or not.

Remove a duplicate row by the way.

Bug: 185071689
Test: atest NetdClientTest#protectFromVpnTcp6
Change-Id: I64bc321de2c83378ce7bc8d9eb3044ae7772faca
2021-04-16 05:48:47 +00:00
Winson Chung
7b8d346fde Merge "Workaround for sysui studio builds" into sc-dev 2021-04-16 05:47:52 +00:00
Silin Huang
6d29225bf3 Bug fix for QuickAccessWallet.
1. Update the Wallet tile label.
2. Check the card width and height in the request, if they are not valid
(is 0) do not query cards.

Test: manual
Test: atest
Bug: 184905963
Change-Id: Ie1f02a27e2ac0c3077dd576a3ee2efcce0c6b8d4
2021-04-15 22:45:39 -07:00
Pinyao Ting
fb059fc06b Various fixes in ShortcutService
1. Currently AppSearchSession#setSchema is only invoked when the schema
hasn't been created. The correct logic should be, call setSchema if the
schema version on the device is older than current.

2. Add null check on the call-site of ShortcutPackage#getShortcutById,
the return value is generally non-null (on misses it simply return an
empty list), the only case it can be null is when there was an
exception thrown from AppSearch.

3. Update ShortcutManagerTest10 in comply with security fix in
LauncherAppService#getShortcutConfigActivityIntent

Bug: 151359749
Test: atest ShortcutManagerTest1 ShortcutManagerTest2
    ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5
    ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8
    ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11
    ShortcutManagerTest12
Test: atest CtsShortcutManagerTestCases
Change-Id: I214b0e9c8030f45cff5e6451733bf853f6303030
2021-04-15 22:30:28 -07:00
TreeHugger Robot
c9eaa3d80f Merge "Rename IInputMethodManager#reportPerceptible" into sc-dev 2021-04-16 05:14:30 +00:00
Qi Wang
2616a431e7 Fix a bug in SpellCheckerService.
Previously, the returned value of WordIterator#following is used without
checking, which will cause fatal error when it's WordIterator.DONE.

Fix: 184915852
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I37418bb36bc49e7dfa729ffb7209a6f383b611dd
2021-04-16 12:48:42 +08:00
Peter Collingbourne
b3982fc8be Fix two problems in the ExecuteBinary function.
- If the process exits abnormally then we will leak the stdout and
  stderr FDs. Fix it by closing the FDs before returning.

- If another child process exits then we will incorrectly return the
  result from that process instead of waiting for our child. Fix it
  by using waitpid instead of wait.

Change-Id: I8974d5e4bd33f264cd2d364f55a60f1f5cb7eb1a
2021-04-15 21:47:07 -07:00
Amy Zhang
2aa9fa55cc Force FilterClient to NOT reset the FMQ pointer when creating the MQ
Previously we created the Filter FMQ from the AIDL MQ Descriptor after
it is passed from the TunerService to the client side.
But the default creation would reset the mq pointer.
Since we only get the mq when read operation is executed on the filter,
the mq could have already been writtern. The default creation would
reset the pointer and erase the data.

Test: atest TunerTest
Bug: 185542142
Change-Id: I56a09e30b0cfbf9fadcaa7f0c7ef1ac6a6d601b1
2021-04-15 21:36:20 -07:00
Zoey Chen
a2fee1cbcb [Telephony] Describe the failure case in doc
Bug: 167347923
Test: make
Change-Id: Ifd7f234b358ba400ee67500567cacd3da3916646
2021-04-16 04:20:35 +00:00
Les Lee
d055f6d844 Merge "wifi: Rename country change API" into sc-dev 2021-04-16 03:52:40 +00:00
shawnlin
a4977ae2bc Reset the layer of the nav bar when restoring it back
We set the layer of the nav bar to MAX_VALUE when attaching the nav bar
to app during quick-step gesture.
Hence, we also need to reset it when restoring it back.

Bug: 184914153
Test: atest RecenteAnimationControlerTest
Change-Id: I331a2992c1b965503f714683f8be56d473e03434
2021-04-16 11:44:33 +08:00
Ming-Shin Lu
c8e411fd1f Add a test api for checking if system supports TaskSnapshot
Use this test api to make sure testing
KeyboardVisibilityControlTest#testRestoreImeVisibility_.* that
requires the system supporting TaskSnapshot mechanism, otherwise skip
the test when the system doesn't support it.

Bug: 184978234
Test: m checkapi & atest KeyboardVisibilityControlTest
Change-Id: I777053aeeb6a2734a4bbd37711cf56ced41c1bd9
2021-04-16 11:37:52 +08:00
Treehugger Robot
e7f2887e7d [automerger skipped] Merge "[Telephoy] Add phone Id to support DSDS" am: 40fa3f58b2 am: 36fb168817 am: bf415409e8 -s ours
am skip reason: skip tag Change-Id I6bf2285e37366ca517a3ea16194a203371e44964 with SHA-1 1835f13c4e is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676437

Change-Id: I5aec4568e35a02b0195837f9f88d1f4eda10b6c4
2021-04-16 03:28:00 +00:00
Chiachang Wang
6242135e1b [automerger skipped] Merge "Remove hidden connectivity method usage" am: 82628265f6 am: cec2c552d1 am: 3aaf67546b -s ours
am skip reason: skip tag Change-Id I5e23bd0ab2e82fc3583c56162d5ac3fec6cfc359 with SHA-1 27691f8468 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1674570

Change-Id: Id77f7514def20bc7171780a7bf4ad009c5821776
2021-04-16 03:27:40 +00:00
Hongwei Wang
8a9aed5159 Merge "Deprecate ActivityRecord#mLastKnownParent" into sc-dev 2021-04-16 03:24:54 +00:00
TreeHugger Robot
7863e20566 Merge "Add null check before trying to give appOps to package." into sc-dev 2021-04-16 03:19:10 +00:00
wilsonshih
6298f2c046 Starting window performance tuning for binder block.
- Pass TaskSnapshot to Shell directly.
- Parallel process: create a splash screen worker thread to create the
splash screen view and pre-draw the icon drawable, and use splash
screen thread to do stuff about window's lifecycle like add/remove
window. We don't use shell main thread here so the starting window
won't blocking any task execute on main thread.
- Trigger addStartingWindow directly when startActivity, also
removeStartingWindow directly without post the animation thread.
- Do not defer addStartingWindow for prepare surface, on the contrast
it should be execute before prepare surface.
- Remove ActivityRecordTests#testAddRemoveRace, it wasn't been test as
expected because in original logic the add and remove starting window
are post to animation thread, so the test was actually testing on
handler#postAtFrontOfQueue and handler#removeCallbacks.
For now it will only cause OutOfMemoryError.

Bug: 183665220
Bug: 182836977
Test: atest StartingSurfaceDrawerTests SplashscreenTests
Change-Id: Ie9a529c7d81f07f923394eb69944518f3e9010ce
2021-04-16 11:04:38 +08:00