Commit Graph

12044 Commits

Author SHA1 Message Date
Automerger Merge Worker
e576ba8f8d Merge "(Backport) Pipe through featureId from caller to permission checks in telephony code" am: 0104ce5293 am: f5a037d685
Change-Id: I09813d60dacabbd98e395816f9d7cb6d965a4f19
2020-01-09 03:45:21 +00:00
Treehugger Robot
0104ce5293 Merge "(Backport) Pipe through featureId from caller to permission checks in telephony code" 2020-01-09 02:48:14 +00:00
Philip P. Moltmann
06b07e9e25 (Backport) Pipe through featureId from caller to permission checks in telephony
code

Test: atest FrameworksTelephonyTests CtsAppOpsTestCases
Bug: 136595429
Fixes: 146350559
Change-Id: Ie58007cf2a4e4a39cdfd72822150efce71dfbe84
Merged-In: I7ef41e8961e48d40e5685c4a521e83cb20953e48
2020-01-08 14:16:54 -08:00
Automerger Merge Worker
7311ee7976 Add test for OverrideValidatorImpl am: 1828d218d6 am: 261d85b7ce
Change-Id: I85702ddaa1c801e8078a6e25d2457af264e778ed
2020-01-08 18:54:19 +00:00
Automerger Merge Worker
f4115dd50f Enforce overriding methods for IPlatformCompat am: 465b214383 am: ed7fc22f27
Change-Id: Id4eafc4f2700b0c7e4578471059204dbc756fdd9
2020-01-08 18:54:13 +00:00
Andrei Onea
261d85b7ce Add test for OverrideValidatorImpl
am: 1828d218d6

Change-Id: I8a07c6c7542db7b7a2654f45aaaa39d452101605
2020-01-08 10:48:02 -08:00
Andrei Onea
ed7fc22f27 Enforce overriding methods for IPlatformCompat
am: 465b214383

Change-Id: I2f6ff12c492eaf9cc9b8852b0d2b12facb622596
2020-01-08 10:47:55 -08:00
Andrei-Valentin Onea
e7194bfdfc Merge changes from topic "fix-policy"
* changes:
  Refactor CompatConfigTest and PlatformCompatTest
  Add test for OverrideValidatorImpl
  Enforce overriding methods for IPlatformCompat
2020-01-08 18:42:44 +00:00
Automerger Merge Worker
133e292ec5 DO NOT MERGE: Add another exception to the nearby-sharing chip code. am: 3187e48e1f
Change-Id: Id338e3a93630c726dd7c4d68b6c40c7d1a8ef2c3
2020-01-08 15:24:11 +00:00
Automerger Merge Worker
2f162c37cf Merge "Revert "Implement the ThreadPrioritySetter interface"" am: e716ff86af am: bca74a47bc
Change-Id: I81839f9092d261042c0d5cad918b35ab24244674
2020-01-08 07:23:22 +00:00
Rick Yiu
e716ff86af Merge "Revert "Implement the ThreadPrioritySetter interface"" 2020-01-08 06:49:37 +00:00
Rick Yiu
6df72bd988 Revert "Implement the ThreadPrioritySetter interface"
Revert submission 1194951-ThreadPrioritySetter2

Reason for revert: need to update new API
Reverted Changes:
Iee33a26c0: Implement the ThreadPrioritySetter interface
I71c5052be: Use ThreadPrioritySetter to set thread priority

Change-Id: I38c1335bff657662d82ff8778bffade323ced620
2020-01-08 02:22:39 +00:00
Dan Sandler
3187e48e1f DO NOT MERGE: Add another exception to the nearby-sharing chip code.
Fixes: 146690046
Test: Share from Chrome
Change-Id: I41b3965ca2289f628a2d1de3a6da7daf01385a54
2020-01-08 00:26:37 +00:00
Automerger Merge Worker
09b06a3f1f Merge "Implement the ThreadPrioritySetter interface" am: bc0290a7b0 am: 4db03331ac
Change-Id: Ib8df0e26ebc61f6d2014d8784e91c16197389fb1
2020-01-07 03:25:43 +00:00
Rick Yiu
bc0290a7b0 Merge "Implement the ThreadPrioritySetter interface" 2020-01-07 02:31:17 +00:00
Rick Yiu
a7612150ff Implement the ThreadPrioritySetter interface
Implement the ThreadPrioritySetter interface and register it in
runtime.

Bug: 139521784
Test: CtsLibcoreTestCases, device boot to home, thread priority set
      as expected.
Change-Id: Iee33a26c0b25386dd10a51a14284cab71e71edb2
2020-01-04 02:56:38 +00:00
Automerger Merge Worker
6dfd9358a3 Merge "Prevent double-counting of kernel stack size in dumpsys reports" am: 9493f0ed0b am: a457a78ab7
Change-Id: I5454c8a0c92bd8b25956cf96b987199fffe3a898
2020-01-03 01:15:50 +00:00
Suren Baghdasaryan
2018bf03f9 Prevent double-counting of kernel stack size in dumpsys reports
When kernel is configured with CONFIG_VMAP_STACK=y kernel stacks are mapped
into process space and therefore already accounted as part of the value
returned by ReadVmallocInfo and reported under MEMINFO_VM_ALLOC_USED
category. Introduce isVmapStack function to check if kernel is configured
with that option and if so do not exclude kernel stack size in the
calculation of memory used by kernel.

Bug: 146088882
Test: dumpsys meminfo with CONFIG_VMAP_STACK enabled and disabled
Change-Id: I9230bbf0ab05524cf52ded35171fd9ec3da16fa0
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2020-01-02 13:36:34 -08:00
Nathan Harold
47fbf0aaa0 Merge "Expose PreciseDataConnectionState to Public API" 2019-12-26 23:05:58 +00:00
Nathan Harold
d9b5dda461 Expose PreciseDataConnectionState to Public API
1) Remove Unused Parameters for onDataConnectionState:
The data connection state broadcast includes a number of
parameters that are never used anywhere. To prepare for
updated code that relies on PreciseDataConnectionState,
remove the unused parameters that were internal-only and
included in the broadcast.

-LinkProperties
-NetworkCapabilities
-DataRoaming
-DataAllowed
-Interface name

2) Add Disconnecting State for Data Connections

Add a disconnecting state to correct a mismatch
between the internal and externally visible enums.

This will allow apps to know when connections are
in the process of being torn down, which in the case
of radio link issues could be as much as 15 seconds.

3) Expose PreciseDataConnection for Carrier Apps

Exposes the PSL for PreciseDataConnectionState along
with existing fields in the PreciseDataConnectionState
class.

-Make PreciseDataConnectionState public along with some
 of its fields.
-Expose onPreciseDataConnectionStateChanged.
-Add onPreciseDataConnectionStatesChanged to provide PDCS
 for all APNs in one cohesive batch.

4) Cache PreciseDataConnectionState by APN Type

In telephony registry, multiple different APN types
are all piped through the same cache entry, so every
time any APN changes relative to the previous type,
it triggers an update. This also means that when
a registrant requests the data connection state, only
the most recent type's state is updated.

This change caches entries in TelephonyRegistry based
on the APN's type (specifically the type among types
which triggered the change).

Bug: 143083105
Test: make update-api && make offline-sdk-docs
      (no functional change in this CL).
Test: atest FrameworksTelephonyTests

Merged-In: Ib6a769f5a0cae923ca47a842733bd28755a90ed5
Change-Id: Ib6a769f5a0cae923ca47a842733bd28755a90ed5
(cherry picked from commit 4d340f12c9)
(cherry picked from commit c95b4e5421)
2019-12-20 10:06:54 -08:00
Nathan Harold
dcbe98371e Revert "[DO NOT MERGE] Revert submission 9950791-pick-precise-dataconn"
This reverts commit d80dc8fed4.

Bug: 143082463
Test: compilation

Merged-In: Ib6a769f5a0cae923ca47a842733bd28755a90ed5
Change-Id: I455788f72fc6dec23c0d0d24a1ca8ee9c2f637c9
2019-12-19 17:37:54 -08:00
Noah Zimmt
2115c17ced Merge "[DO NOT MERGE] Revert submission 9950791-pick-precise-dataconn" into qt-qpr1-dev-plus-aosp 2019-12-20 00:45:42 +00:00
Noah Zimmt
d80dc8fed4 [DO NOT MERGE] Revert submission 9950791-pick-precise-dataconn
Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_qt-qpr1-dev-plus-aosp&target=aosp_cf_x86_phone-userdebug&lkgb=6087936&lkbb=6087980&fkbb=6087980, b/146588413
Reverted Changes:
I8445808a0: Expose PreciseDataConnectionState to Public API
Ib6a769f5a: Expose PreciseDataConnectionState to Public API

Note: These CLs are correctly applied in master already.
      The revert should merge to qt-qpr1-dev-plus-aosp only
Change-Id: If98f8ba5f20073bade40f7b167ed185c2e4c0e1b
2019-12-20 00:43:41 +00:00
Nathan Harold
be34c7019a Merge "Expose PreciseDataConnectionState to Public API" into qt-qpr1-dev-plus-aosp 2019-12-19 23:40:18 +00:00
Automerger Merge Worker
cc628869ff Merge changes from topic "ion memory accounting" am: 5ded8c130c am: 3c4624dcc2
Change-Id: I6620e200357ddcc46557f149e17fcad25e7c57c4
2019-12-19 21:51:13 +00:00
Nathan Harold
c95b4e5421 Expose PreciseDataConnectionState to Public API
1) Remove Unused Parameters for onDataConnectionState:
The data connection state broadcast includes a number of
parameters that are never used anywhere. To prepare for
updated code that relies on PreciseDataConnectionState,
remove the unused parameters that were internal-only and
included in the broadcast.

-LinkProperties
-NetworkCapabilities
-DataRoaming
-DataAllowed
-Interface name

2) Add Disconnecting State for Data Connections

Add a disconnecting state to correct a mismatch
between the internal and externally visible enums.

This will allow apps to know when connections are
in the process of being torn down, which in the case
of radio link issues could be as much as 15 seconds.

3) Expose PreciseDataConnection for Carrier Apps

Exposes the PSL for PreciseDataConnectionState along
with existing fields in the PreciseDataConnectionState
class.

-Make PreciseDataConnectionState public along with some
 of its fields.
-Expose onPreciseDataConnectionStateChanged.
-Add onPreciseDataConnectionStatesChanged to provide PDCS
 for all APNs in one cohesive batch.

4) Cache PreciseDataConnectionState by APN Type

In telephony registry, multiple different APN types
are all piped through the same cache entry, so every
time any APN changes relative to the previous type,
it triggers an update. This also means that when
a registrant requests the data connection state, only
the most recent type's state is updated.

This change caches entries in TelephonyRegistry based
on the APN's type (specifically the type among types
which triggered the change).

Bug: 143083105
Test: make update-api && make offline-sdk-docs
      (no functional change in this CL).
Test: atest FrameworksTelephonyTests

Merged-In: Ib6a769f5a0cae923ca47a842733bd28755a90ed5
Change-Id: Ib6a769f5a0cae923ca47a842733bd28755a90ed5
(cherry picked from commit 4d340f12c9)
2019-12-19 13:40:02 -08:00
Suren Baghdasaryan
40899ad1e6 Improve cached kernel memory accounting using meminfo KReclaimable field
KReclaimable field from /proc/meminfo is designed to represent total amount
of memory that kernel can reclaim when needed. This includes reclaimable
memory consumed by slab and reported in SReclaimable field as well as ION
pools. By using KReclaimable instead of SReclaimable we will account for
ION pools currently reported under "Lost RAM" category in dumpsys meminfo
report.

Bug: 138148041
Test: dumpsys meminfo
Change-Id: Ifdea234d05639db93074ab598b81db5ff5b43612
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-12-19 19:49:05 +00:00
Automerger Merge Worker
7fabca1b35 Merge "Expose ModemActivitiyInfo to system API" am: 5910f6dd65 am: 340397814a
Change-Id: I5ec18c82caa066e2aced3432756cd0811ff4a9cb
2019-12-19 18:42:52 +00:00
Chen Xu
5910f6dd65 Merge "Expose ModemActivitiyInfo to system API" 2019-12-19 18:01:46 +00:00
Automerger Merge Worker
7b1b93935e DO NOT MERGE: Allow nearby sharing to substitute name & icon in chip am: c5dffc9a4a
Change-Id: I71f241c27feff278d71b4d70751ce94378eb37a6
2019-12-19 03:02:24 +00:00
Dan Sandler
c5dffc9a4a DO NOT MERGE: Allow nearby sharing to substitute name & icon in chip
meta-data bundle keys (values are resids):

    CHIP_LABEL_METADATA_KEY = "android.service.chooser.chip_label"
    CHIP_ICON_METADATA_KEY = "android.service.chooser.chip_icon"

Test: manual, confirm that correct name & icon are used
      and that custom icon is tinted in light/dark theme
      (and that the copy chip is tinted right, too!)
Bug: 144290152
Change-Id: I57157e07630fa8bec3057e6d18336c59944fcb4f
2019-12-19 01:43:51 +00:00
Chen Xu
9663781a86 Expose ModemActivitiyInfo to system API
ModemActivityInfo is used for batteryStatusService which is part of
system service. To prepare telephony to be an mainline module, we
should expose ModemActivityInfo to systemAPI

1. remove getConsumedPower API as we are missing modem support, API
today only report 0
2. isValid API is introduced to cover modem issues before. Do not
expose this for now.

Bug: 140908357
Test: Build
Change-Id: I6e1b0daa2e0ce23b9fd55f0dd7037631b93eb7a5
(cherry picked from commit 7322e4a7ce)
Merged-in: I6e1b0daa2e0ce23b9fd55f0dd7037631b93eb7a5
2019-12-18 10:45:00 -08:00
Automerger Merge Worker
d7c79c3a2c Merge "Do not restart activity when pinned set changes - just re-sort." into qt-qpr1-dev am: 0416784c2e
Change-Id: I094be054c2a0be923714cc2cee54a95aced84bf8
2019-12-18 16:01:15 +00:00
Alison Cichowlas
0416784c2e Merge "Do not restart activity when pinned set changes - just re-sort." into qt-qpr1-dev 2019-12-18 15:41:33 +00:00
Andrei Onea
1828d218d6 Add test for OverrideValidatorImpl
Also add some helper builders for testing.

Bug: 144552011
Test: atest OverrideValidatorImplTest
Change-Id: Ia66638e13df14c72c242ce14041f982b2ce707ac
2019-12-18 15:11:32 +00:00
Andrei Onea
465b214383 Enforce overriding methods for IPlatformCompat
Restrict the ability of callers to IPlatformCompat.setOverrides and
IPlatformCompat.clearOverride, depending on the type of build and/or
whether the app is debuggable.

Bug: 144552011
Test: atest PlatformCompatTest
Test: atest CompatConfigTest
Change-Id: Ibff7db73d7867735853aa2ddde7c14a12625b3dc
2019-12-18 15:10:25 +00:00
Alison Cichowlas
2d3442466e Do not restart activity when pinned set changes - just re-sort.
Bug: 145703939
Test: Share dialog via screenshot, long press for pin, observe behavior.
Change-Id: I6e9e03b77e1486093097ea1488fa589e3c7bd482
Merged-In: I6e9e03b77e1486093097ea1488fa589e3c7bd482
2019-12-18 02:40:02 +00:00
Automerger Merge Worker
de89306a0c Merge "Remove PhoneStateLister#onOtaspChanged" am: 0d7a5dc2ea am: 6846fe997c
Change-Id: I8129f2a112daeb63e23535edb5155ceb85c2ece7
2019-12-17 21:28:32 +00:00
Meng Wang
0d7a5dc2ea Merge "Remove PhoneStateLister#onOtaspChanged" 2019-12-17 21:14:06 +00:00
Automerger Merge Worker
f47a64b59d Merge "[Telephony Mainline] Expose MAX_NETWORK_TYPE constant" am: 23019528ec am: a4c3162339
Change-Id: I263fbd69be70ccf48b0e16d00985e716060f6bfa
2019-12-17 19:20:16 +00:00
Automerger Merge Worker
67da267f24 [DO NOT MERGE] Reset mTrackingReportedValues in endSample() am: 7293dfca7c
Change-Id: Ic79aa39d2578c4625c3e92e5ba46dde7df239b0e
2019-12-17 19:13:09 +00:00
Peter Wang
23019528ec Merge "[Telephony Mainline] Expose MAX_NETWORK_TYPE constant" 2019-12-17 19:10:24 +00:00
Automerger Merge Worker
5d836174d9 Merge "Add new configuration loading path for apex module Cronet" am: a960204edf am: d5f5adad39
Change-Id: I76afbbbb8df96f44749889573a1b1b5bc74aa07d
2019-12-17 16:20:16 +00:00
Luke Huang
5c4040ce24 Add new configuration loading path for apex module Cronet
Add an additional loading path which is used for libs permission
xml providing from Cronet apex module.

Bug: 145474221
Bug: 139397529
Test: build
Test: manual test with Cronet
Change-Id: I103539a45fe9182f84a79bfe45a6172d94068690
Merged-In: I02541eb2d4808d69ab8cb2d6a48cf8aaa39c86dc
2019-12-17 14:02:20 +00:00
Hui Yu
7293dfca7c [DO NOT MERGE] Reset mTrackingReportedValues in endSample()
Otherwise, when next SamplingTimer.update() is called, it will take
zero as start time.

Bug: 142466892
Test: NA.

Change-Id: I04625fadd8fd8bab3ba83b8e7cd10737ad34e60b
(cherry picked from commit c7d49e01dd)
2019-12-17 00:45:31 +00:00
Meng Wang
66972daf11 Remove PhoneStateLister#onOtaspChanged
and replace with Registrant in Phone, since the callback is only used
inside telephony.

Bug: 140908357
Test: make
Change-Id: Ia86e9885f85d7f6b3698e96653add00e9b8670ed
2019-12-16 15:10:43 -08:00
Automerger Merge Worker
1fa842bd68 Merge "expose APIs for mainline telephony-sdk" am: 0bc81e1d23 am: 91c9100315
Change-Id: I4990908923e76fade72928168ae40e200ea28409
2019-12-16 21:15:46 +00:00
Chen Xu
0bc81e1d23 Merge "expose APIs for mainline telephony-sdk" 2019-12-16 20:51:04 +00:00
Automerger Merge Worker
e3ba3689d9 Merge "Move RCS UCE out of Telephony Mainline" am: 07ba9c6fff am: 5a05ae1270
Change-Id: I57e27f7314692bbaa882216405deca80ded92ad1
2019-12-16 18:18:36 +00:00
Peter Wang
2dae34155e [Telephony Mainline] Expose MAX_NETWORK_TYPE constant
Test: Build
Bug: 140908357
Change-Id: I40cbcdfb8e77b3e01968d008f4359790c4264539
Merged-In: I40cbcdfb8e77b3e01968d008f4359790c4264539
2019-12-13 15:36:17 -08:00