Commit Graph

65796 Commits

Author SHA1 Message Date
TreeHugger Robot
cb9aae0cf8 Merge "Remove incorrect isAppUid check reading memory state" into rvc-dev am: d490578595
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11838098

Change-Id: I932181edc35c89a4f740a859f7de7e7454ada7e9
2020-06-11 19:05:58 +00:00
TreeHugger Robot
d490578595 Merge "Remove incorrect isAppUid check reading memory state" into rvc-dev 2020-06-11 19:03:46 +00:00
Joshua Duong
9fc04c68ee Merge "Reread the tls port on adbd restarts." into rvc-dev am: 9e7a8c853c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829829

Change-Id: I821c9590a01c4890ba9e5967dcdc5bd92fd5ec1a
2020-06-11 17:36:49 +00:00
Ioannis Ilkos
e0ec1f3ce4 Remove incorrect isAppUid check reading memory state
The check misclassifies processes as apps (it only checks lower bound,
whereas there's also an upper bound of 20000-1).

At the same time it is redundant. It was originally introduced to
quickly filter out processes that were known to AM, but nowadays we
explicitly remove these from the set of processes to scan.

Bug: 158470048
Test: manual test, android.cts.statsd.atom.UidAtomTests#testProcessMemorySnapshot, 'android.cts.statsd.atom.UidAtomTests#testProcessMemoryHighWaterMark
Change-Id: Ie24107ccea31efae40277d8d46fa36f978f2481e
2020-06-11 17:34:08 +00:00
Joshua Duong
9e7a8c853c Merge "Reread the tls port on adbd restarts." into rvc-dev 2020-06-11 17:23:00 +00:00
TreeHugger Robot
e7a2e51536 Merge "Remove package name from the attribution tag." into rvc-dev am: c30e39377a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11689596

Change-Id: I27696e948a2ee563bb5c5bc9dbbf39c0a8f9786d
2020-06-11 13:44:55 +00:00
TreeHugger Robot
c30e39377a Merge "Remove package name from the attribution tag." into rvc-dev 2020-06-11 13:28:03 +00:00
Jorim Jaggi
6255421565 Merge "Exclude non-observable insets change" into rvc-dev am: 1f6b99d5fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11592755

Change-Id: I63a484ff464ee0d2ccf733a6512a901ade8fe3a0
2020-06-11 12:31:11 +00:00
Jorim Jaggi
1f6b99d5fa Merge "Exclude non-observable insets change" into rvc-dev 2020-06-11 12:15:49 +00:00
Kyunglyul Hyun
dbc57de074 Merge "Add address to MediaRoute2Info" into rvc-dev am: 55e5ac8fc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11822778

Change-Id: Ic6ce7e7ea90f6d1fe4e7003286a4b646c681f104
2020-06-11 10:56:33 +00:00
Issei Suzuki
07610a2900 Merge "Fix unexpected closure of the bubble." into rvc-dev am: e3defa2d40
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11818615

Change-Id: I3a92fee8c24336eb96fc39f6fb03ca64c5a742ba
2020-06-11 10:56:06 +00:00
Kyunglyul Hyun
55e5ac8fc0 Merge "Add address to MediaRoute2Info" into rvc-dev 2020-06-11 10:53:55 +00:00
Issei Suzuki
e3defa2d40 Merge "Fix unexpected closure of the bubble." into rvc-dev 2020-06-11 10:39:16 +00:00
TreeHugger Robot
5b4d89043e Merge "trigger file removal when slice permission is removed" into rvc-dev am: 9c90811d29
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11827756

Change-Id: Ia44608fe42e6c201b945556101498cbbb24b3339
2020-06-11 01:22:02 +00:00
TreeHugger Robot
9c90811d29 Merge "trigger file removal when slice permission is removed" into rvc-dev 2020-06-11 01:17:29 +00:00
TreeHugger Robot
13817fcbf4 Merge "Throw XmlParserException when client tag cannot be found when parsing slice permissions." into rvc-dev am: 4a487001b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11827755

Change-Id: I62b7c336eae3cb50acd2a6e5bd251248b64315c7
2020-06-11 00:59:29 +00:00
TreeHugger Robot
4a487001b7 Merge "Throw XmlParserException when client tag cannot be found when parsing slice permissions." into rvc-dev 2020-06-11 00:55:38 +00:00
TreeHugger Robot
50c1b54d3c Merge "Convert personal app suspension on COMP->COPE migration" into rvc-dev am: b14310b5ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11744198

Change-Id: I631bd2dc6eb0b9b2ec74770735f6413e098d6223
2020-06-11 00:52:57 +00:00
TreeHugger Robot
b14310b5ef Merge "Convert personal app suspension on COMP->COPE migration" into rvc-dev 2020-06-11 00:40:28 +00:00
TreeHugger Robot
aa00103ee6 Merge "Suez: Implement display wake reason stats" into rvc-dev am: 7e1c2173a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11817919

Change-Id: I983da81834ddd3d2cd3528e87edcf475317def73
2020-06-11 00:22:54 +00:00
TreeHugger Robot
7e1c2173a3 Merge "Suez: Implement display wake reason stats" into rvc-dev 2020-06-11 00:21:17 +00:00
Joshua Duong
8ee00491ac Reread the tls port on adbd restarts.
When adbd restarts while wireless debugging is enabled, the port number
may change.

Bug: 158219145

Test: Manual.
1) Enable wireless debugging in Settings and validate port in UI via
> adb shell su 0 netstat -plnt | grep LISTEN
2) Restart adbd: > adb root
3) validate port again (may have changed)

Change-Id: I2b646a61eff417f6bc53018ffbe1f7243981d745
2020-06-10 16:43:14 -07:00
Pinyao Ting
21fc24d092 trigger file removal when slice permission is removed
Bug: 157938808
Test: atest SlicePermissionManageTest
Change-Id: Ie1f2148c926a72837abb05730e712521e5671d66
2020-06-10 16:21:44 -07:00
Pinyao Ting
427f4f67a7 Throw XmlParserException when client tag cannot be found when parsing
slice permissions.

There are three call-sites of SliceClientPermissions#createFrom:
1) SlicePermissionManager#writeBackup and
SlicePermissionManager#readRestore ensures the client tag exists before
calling SliceClientPermissions#createFrom.
2) SlicePermissionManager#getClient is expecting Exception from
SliceClientPermissions#createFrom when it fails to parse the xml, and
creates clean permission object accordingly. This CL ensures an
exception was thrown when the xml parsing cannot be completed.

Bug: 121144871
Test: run test suite in forrest
frameworks/base/services/tests/uiservicestests/src/com/android/server/slice

Change-Id: Id7a239f16b95d16ba17bf651d474dec86492ef47
2020-06-10 16:01:57 -07:00
Pavel Grafov
80b763830e Convert personal app suspension on COMP->COPE migration
* if no apps are suspended by the DO prior to migration, nothing
  changes
* if some apps were suspended by the DO and the DPC targets R+
  via DPM.setPackagesSuspended(), this will result in personal
  apps suspended explicitly by the PO DPC as if it called
  DPM.setPersonalAppsSuspended(). The apps will stay suspended.
* if the DPC target SDK is below R, the apps will be unsuspended
  because the DPC won't have a way to unsuspend them. And the
  user will be stuck with suspended apps.

+ when unsuspending apps, don't collect the list of apps subject
  to suspension, but rather unsuspend all that is suspended. It
  is more robust, e.g. when some app stops meeting the
  conditions, e.g. not SMS app anymore.

Bug: 157270093
Test: com.android.server.devicepolicy.DevicePolicyManagerServiceMigrationTest
Test: Manual, with TestDPC, also patching it to target R

Change-Id: I1eba7216dd557c94bef822b77d25b484dfcd6f63
2020-06-10 23:11:01 +01:00
TreeHugger Robot
05f76520d2 Merge "Fix original-package support" into rvc-dev am: ab6c4a7685
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11794000

Change-Id: I2c7470c868f7729267edc02a5db10bec8ce83c70
2020-06-10 20:56:51 +00:00
TreeHugger Robot
ab6c4a7685 Merge "Fix original-package support" into rvc-dev 2020-06-10 20:51:39 +00:00
TreeHugger Robot
0b3e045a36 Merge "Added an event before clearning user journey" into rvc-dev am: 15f86c346a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11812814

Change-Id: I20c8db86d587781ac005b595226ccd39fa475b13
2020-06-10 20:48:12 +00:00
TreeHugger Robot
15f86c346a Merge "Added an event before clearning user journey" into rvc-dev 2020-06-10 20:46:49 +00:00
Julia Reynolds
ea4427b6ea Merge "Track sent conversations better" into rvc-dev am: e59c7e4618
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11821055

Change-Id: Ib1e825f4eb3956dd3673f2edb74cde749a639db7
2020-06-10 20:44:48 +00:00
Julia Reynolds
e59c7e4618 Merge "Track sent conversations better" into rvc-dev 2020-06-10 20:29:49 +00:00
TreeHugger Robot
5674d0ac4f Merge "Limit the maximal number of pending requests in TCMS" into rvc-dev am: 0f54743ce3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11795958

Change-Id: Ic2cdcd538e6cb70741d8d0780933f62aa282792d
2020-06-10 19:46:39 +00:00
TreeHugger Robot
0f54743ce3 Merge "Limit the maximal number of pending requests in TCMS" into rvc-dev 2020-06-10 19:44:30 +00:00
Ytai Ben-tsvi
0cc8dbca10 Merge changes Ibf4ecdb4,I1e4adf9f into rvc-dev am: 3917b729a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11815381

Change-Id: I0273ba4eca004e7381915e3818566ba9c818f0ec
2020-06-10 19:38:27 +00:00
Ytai Ben-tsvi
3917b729a6 Merge changes Ibf4ecdb4,I1e4adf9f into rvc-dev
* changes:
  Correctly propagate service state change
  Support null audio format in recognition event
2020-06-10 19:31:42 +00:00
TreeHugger Robot
7f78825824 Merge "Only check exempted package list if standby is enabled." into rvc-dev am: 26bfc5419c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11759032

Change-Id: I69c49dc95eb1ddbae0e456007751cd0d961b35a4
2020-06-10 19:22:09 +00:00
TreeHugger Robot
26bfc5419c Merge "Only check exempted package list if standby is enabled." into rvc-dev 2020-06-10 18:59:30 +00:00
Julia Reynolds
e61758adc8 Track sent conversations better
Include all notifications that appear in the conversation
space, not just messaging style ones

And then I decided to fix a user vs uid issue in the tests
which means many of them have been touched

Test: atest
Fixes: 158610806
Change-Id: I0bb3f0415845b44ae3e3f9d7b2af836be00ceb24
2020-06-10 14:31:38 -04:00
Yu-Han Yang
42403eb02d DO NOT MERGE: Do not hold mLock when calling GNSS HAL am: 5a0a1d95ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11813790

Change-Id: Ia5b45cc35a3425f4e9bf1ccaf1474507bcb38280
2020-06-10 18:17:07 +00:00
TreeHugger Robot
8d4cef5e43 Merge "DO NOT MERGE: Do not hold mLock when calling GNSS HAL" into rvc-dev 2020-06-10 18:15:07 +00:00
Winson
af8399a682 Fix original-package support
This broke in P. Basic support was broken by a simple negation
issue with the logic that checks for the original package.

That, along with the suggestion in the bug to fix the renamed
package association means this should now work as expected,
carrying data over from a previous installed, differently named
package.

Bug: 131355130
Bug: 132749720
Bug: 111967720

Test: atest PackageManagerServiceHostTests

Change-Id: Ifc4c7af47c4b633cd27ba4a40b6baa0e27960d71
2020-06-10 10:34:43 -07:00
Issei Suzuki
4a46a92e39 Fix unexpected closure of the bubble.
WindowManager calls ATMS#notifySingleTaskDisplayEmpty to notify that the
last task is removed from a single task display.

Originally it was called from ActivityStack when Tsak is removed, but
while merging ActivityStack and Task, CL[1] moved the call to Task. As a
result, the lister gets notification when ActivityRecord is removed,
instead of a last Task is removed, which causes unexpected bubble
closure.

[1]: Ifb167129c89a3aba11796daa21a9dee7200913ca

Bug: 157067689
Test: atest TaskStackChangedListnerTest
Change-Id: I93b745ba7fd1bb2fbef7915ddff2316100813187
2020-06-10 18:11:42 +02:00
Patrick Baumann
756d9c1196 Merge "Revert "Pre-cache filter results"" into rvc-dev am: c357f2cafd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11820080

Change-Id: I5c08424778f31a912a89459c816fcfd08d0284d0
2020-06-10 15:39:52 +00:00
Patrick Baumann
c357f2cafd Merge "Revert "Pre-cache filter results"" into rvc-dev 2020-06-10 15:33:35 +00:00
Patrick Baumann
860502cb42 Revert "Pre-cache filter results"
This reverts commit c68d8124bb.

Reason for revert: Broken test

Change-Id: I91bc693f508a947dea95ee3483045790927f88c9
Fixes: 158626593
2020-06-10 15:13:44 +00:00
Louis Chang
b9bd2da6f2 Merge "Prevent NPE while finishing activity" into rvc-dev am: 1dbee3e34b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11788494

Change-Id: Ia0f5dfb2c7495c892cb9bfa3da06dd5592994a07
2020-06-10 15:09:32 +00:00
Louis Chang
1dbee3e34b Merge "Prevent NPE while finishing activity" into rvc-dev 2020-06-10 15:04:05 +00:00
Tony Mak
8cb5546c37 Limit the maximal number of pending requests in TCMS
Introduce FixedSizeQueue, a simple wrapper of ArrayDeque that only has
a limited size. This avoids the situation that TCMS caches a lot of
pending request in the queue while it is not going to bind to a TCS
anytime soon. When the request is removed from the queue, we notify
the client that the request is failed.

Also, we now limit the max amount of sessions in the cache.
We already have two measures to avoid the leak of sessions, i.e. Cleaner
and linkToDeath, but just in case.


Also, fixed an issue that onDestoryTcSession() is called on the
wrong TC if the TCS is not bound yet. This is an example of the
problematic running sequence:
1. TCS is not bound
2. onCreateTextClassificationSession is called
3. onDestory() is called. TCMS finds out which TC to call by looking
   at session cache.
   However, sessionCache does not contains the record that we need
   because we do not update it until the service is bound.
4. TCS is now bound.
5. onCreateTextClassificationSession is forwared to the right TC.
6. onDestory is forwared to the default TC, which is the default
   if we don't know which TC to call on.
The solution is just to update sessionCache as soon as
onCreateTextClassificationSession is invoked.


BUG: 156683847

Test: atest FixedSizeQueueTest
Test: Revert ag/11734845. Send a lot of messages that won't trigger
      suggestConversationActions. Check the output of
      "dumpsys textclassification", make sure the pending queue size
       is always <= the limit.
Test: m mts && mts-tradefed run mts-extservices

Change-Id: Ib2e3e0d553e703ea759144bc9b38fec0d87de719
2020-06-10 15:35:04 +01:00
Jorim Jaggi
ed31259e01 Exclude non-observable insets change
When we notify insets changed, legacy behavior forces us to force
a new measure on the entire hierarchy. However, this can cause
jank in various scenarios.

Make sure that we don't report an insets change if non-observable
state changes.

Test: InsetsStateTest
Test: Swipe up to home while IME open
Bug: 157123435
Change-Id: I9c51066c6489888720b307240d03054cc18c4172
2020-06-10 14:24:03 +02:00
Kyunglyul Hyun
1ea19b1d01 Add address to MediaRoute2Info
The route ID of a bluetooth route was its hardware address and
SettingsLib depended on that to get BluetoothDevice.

We can't use the address as ID for a pair of hearing devices,
which has their own address but should have the same route ID.

Instead, this CL adds "address" field explictly to be used for bluetooth
routes.
Maybe it can be used by other devices as well.

Bug: 157708273
Test: make -j42 RunSettingsLibRoboTests && cts test
Change-Id: Ib940da9975fc8d68ec3fb7cf2c4a85c0d1a195f3
2020-06-10 20:59:15 +09:00