439634 Commits

Author SHA1 Message Date
Xiangyu/Malcolm Chen
593bd91f2c Merge "[Telephony Mainline] Make newFromBundle and fillInNotifierBundle System API" 2020-01-09 02:37:56 +00:00
Chiachang Wang
4bcef011b2 Expose clearCapabilities for mainline module
Support telephony mainline module usage.

Bug: 138306002
Test: Build and make api-stubs-docs-update-current-api
Change-Id: I6260695b01ec06244d2822f9438a7fae83539ff2
Merged-In: I0a462da4e87cae2c7d4a9b9a92de061a086c5752
2020-01-09 10:25:03 +08:00
Chiachang Wang
914a0fff2e Expose NetworkSpecifier methods as SystemApi
Support for Wi-Fi mainline module.

Bug: 135998869
Test: build and make system-api-stubs-docs-update-current-api
Test: atest FrameworksNetTests
Change-Id: I88f00ca4f4cd51c71f7668b34f101fe7d1332c5c
Merged-In: Id705ee0f2b5c464f6d8ccc91f20dcb39dcf6f2b8
2020-01-09 10:22:47 +08:00
James Wei
7d66bd9b54 USB: [Tethering mainline] Expose @hide APIs to @SystemApi
Bug: 142372304
Test: Manual test: Enable USB tethering
Test: atest UsbTests
Test: atest UsbManagerTests
Change-Id: Ib284b0a72b06ff45b4d3b55a8d48c20f51284a20
2020-01-09 10:21:34 +08:00
Sarah Chin
1431ab2ee5 Handle 5G meteredness in telephony framework
Carriers can set override values via SubscriptionManager.
Added constants and configs for 5G meteredness updates.

Bug: 139070884
Bug: 139218397
Test: atest FrameworksTelephonyTests
Test: atest
cts/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java

Change-Id: Ic8c5938c4a414ce63303a1fa25af60a0082b1ba9
Merged-In: Ic8c5938c4a414ce63303a1fa25af60a0082b1ba9
(cherry-picked from ag/9302701)
2020-01-09 02:13:47 +00:00
Muhammad Qureshi
6a6bd7ee22 Remove dependency on libutils in native autogen
Right now, Q schema generated code has a dependency on libutils.
Turning on R schema for clients will remove libutils as a required
dependency. Once libutils is removed from clients, turning the flag off
again will be complicated as all clients will need to re-include
libutils. To fix this problem, remove dependency on libutils in Q
schema.

Right now, we only use SystemClock.h from libutils in Q schema autogen.
Use timespec from C standard library instead.

Bug: 146808265
Test: m
Test: flashes successfully
Test: adb logcat "*:S statsd:*"
Test: bit statsd_test:*
Change-Id: I00efeab1be351a95083f3b6e2dbc9067849bee20
Merged-In: I00efeab1be351a95083f3b6e2dbc9067849bee20
2020-01-08 17:08:05 -08:00
Muhammad Qureshi
7182159154 Add --supportQ flag to java StatsLog codegen
Add support to generate Q schema code generation only for modules that
ship to Q.

Bug: 145606209
Test: m
Test: flashes successfully
Test: adb logcat "*:S statsd:*"
Change-Id: I978ac321415f1e8d76e4ec73445894965845aaea
Merged-In: I978ac321415f1e8d76e4ec73445894965845aaea
2020-01-08 17:07:18 -08:00
Muhammad Qureshi
6f65881d62 Support new socket schema in native codegen
New code generation implementation is flag guarded by
STATS_SCHEMA_LEGACY

Support for Q schema can be added by passing --supportQ flag in
stats_log_api_gen. (Only needed for statslog_resolv.cpp)

Q schema is supported through StatsEventCompat.

Generated R schema statslog.h:
https://paste.googleplex.com/4986214782337024

Generated R schema statslog.cpp:
https://paste.googleplex.com/4856851575341056

Generated R schema statslog_resolv.h:
https://paste.googleplex.com/6062978921136128

Generated R schema statslog_resolv.cpp:
https://paste.googleplex.com/4752329251225600

Generated Q schema statslog.h:
https://paste.googleplex.com/4766729873915904

Generated Q schema statslog.cpp:
https://paste.googleplex.com/5018563779756032

Generated Q schema statslog_resolv.h:
https://paste.googleplex.com/5338897498243072

Generated Q schema statslog_resolv.cpp:
https://paste.googleplex.com/5191011011657728

Test: m -j
Test: flashes successfully
Test: adb logcat inspection
Change-Id: I5675a80c03ca3fbd5cd4a02c04a4b9cb89ec32ab
Merged-In: I5675a80c03ca3fbd5cd4a02c04a4b9cb89ec32ab
2020-01-08 17:06:18 -08:00
Muhammad Qureshi
c29064e14c Move statsd metadata from statslog to atoms_info
Clients don't need to know about statsd metadata. Extract out metadata
from statslog.h/cpp into atoms_info.h/cpp which is only used by statsd.

Generated atoms_info.h: https://paste.googleplex.com/6303016724463616
Generated atoms_info.cpp: https://paste.googleplex.com/5717940978581504

Test: m -j
Test: old metadata in statslog matches the metadata in
atoms_info
Test: Flashes successfully
Test: adb logcat "*:S statsd:*"

Change-Id: I56ef3cc4ea1fbd2cd0130d4e9576b242efb9f627
Merged-In: I56ef3cc4ea1fbd2cd0130d4e9576b242efb9f627
2020-01-08 17:05:15 -08:00
Muhammad Qureshi
2a4c0782b5 Fix StatsEvent memory usage for pulled events
Add usePooledBuffer flag to the Builder which determines whether to reuse
the Buffer's byte array in StatsEvent or use a copy.
The build() function also calls release() on the Buffer
if a copy of the Buffer's byte array is passed to StatsEvent.

Also, for pushed events, release the StatsEvent object and consequently,
the Buffer in StatsLog.write(StatsEvent)

Fixes: 145026572
Fixes: 144126444
Test: bit FrameworksCoreTests:android.util.StatsEventTest
Change-Id: I1cdaf0027b69281cb7cb6f3c8ca923d03829b4dd
Merged-In: I1cdaf0027b69281cb7cb6f3c8ca923d03829b4dd
2020-01-08 17:04:27 -08:00
Muhammad Qureshi
80e3e7a435 Add JNI call for writing StatsEvent to statsd.
Bug: 143978873
Test: m -j
Test: flashes successfully
Test: DocumentsUI(a Mainline module) is able to successfully log to statsd
Change-Id: I9cdc6151d8feb29a712532e50f143af9d52c8d94
Merged-In: I9cdc6151d8feb29a712532e50f143af9d52c8d94
2020-01-08 17:03:31 -08:00
Muhammad Qureshi
2dfca163ab Fix error handling in StatsEvent
Bug: 143286399
Test: bit FrameworksCoreTests:android.util.StatsEventTest
Change-Id: I2159bf138a307e45c44102a8feb7a69d0c793843
Merged-In: I2159bf138a307e45c44102a8feb7a69d0c793843
2020-01-08 17:02:52 -08:00
Muhammad Qureshi
01268dec13 Handle nulls in Java autogeneration
Bug: 143979391
Test: m -j
Change-Id: I93146faa1976cac195c2250832d12ee4a09ae969
Merged-In: I93146faa1976cac195c2250832d12ee4a09ae969
2020-01-08 17:02:22 -08:00
Muhammad Qureshi
ef19b08b05 Use StatsEvent in Java autogenerated code
The change is guarded by STATS_SCHEMA_LEGACY flag in the autogenerator
Android.bp.

The flag can only be removed once rest of statsd switches over to the
new socket schema.

The new autogeneration uses StatsEvent for both Mainline module
clients and the default platform client. For Mainline modules, the
autogenerated code uses a runtime dessert version check to use new
socket schema on R+ platforms and the legacy schema on the older
platforms.

The legacy schema is encapsulated in a separate autogenerated inner
class called QLogger.

generated DocumentsStatsLog.java: https://paste.googleplex.com/4665805503463424
generated StatsLogInternal.java: https://paste.googleplex.com/5955095055302656
generated android_util_StatsLogInternal.cpp:
    https://paste.googleplex.com/6737331711115264

Bug: 142811546
Test: m -j && m -j DocumentsUIGoogle
Test: Flashes successfully and events are logged to statsd
Change-Id: I4c804eaf4d5ae78001146c89ebe46dfb0a453853
Merged-In: I4c804eaf4d5ae78001146c89ebe46dfb0a453853
2020-01-08 17:01:43 -08:00
Muhammad Qureshi
d2ed0f6729 StatsEvent unit tests
Bug: 144605478
Test: bit FrameworksCoreTests:android.util.StatsEventTest

Change-Id: Ied6a13bea3367488c7a6923830284b5e4625cbc5
Merged-In: Ied6a13bea3367488c7a6923830284b5e4625cbc5
2020-01-08 17:01:14 -08:00
Muhammad Qureshi
771119546c Change visibility of members in StatsEvent
- Rename writeAttributionNode to writeAttributionChain
- Make Type Id, size limit constants public and @hide for testing
- Change visibility of StatsEvent package protected functions to public

Bug: 141696033
Test: m -j
Change-Id: Ia4818f621672d469390bf7654bdd317f0cd11692
Merged-In: Ia4818f621672d469390bf7654bdd317f0cd11692
2020-01-08 17:00:24 -08:00
Muhammad Qureshi
f340ab6921 Make StatsEvent.newBuilder() static
Bug: 141696033
Test: m -j
Change-Id: I660a4384f037327ba475e3badd7cba7fea7f77a5
Merged-In: I660a4384f037327ba475e3badd7cba7fea7f77a5
2020-01-08 16:59:51 -08:00
Muhammad Qureshi
a0a4cdf760 Add KeyValuePairs support to StatsEvent.
- Expose atom id in StatsEvent.
- Sync constants with native stats_event.

Bug: 143079343
Bug: 143286399
Test: m -j
Change-Id: Icaa2d90b40d5da7571444182ead03b54b7b25867
Merged-In: Icaa2d90b40d5da7571444182ead03b54b7b25867
2020-01-08 16:59:06 -08:00
Muhammad Qureshi
a56a853c9c Add StatsEvent.Builder
Use a builder to construct StatsEvent objects.
Make StatsEvent immutable.
Wrap socket byte array in a Buffer class with write methods for
primitives.
Implement socket schema at go/statsd-socket-doc
StatsEvent.java design doc at go/statsevent-java-doc

Bug: 141696033
Test: m -j
Change-Id: Ief4890882de66d5dcca71b3827ffa1f43ea628a8
Merged-In: Ief4890882de66d5dcca71b3827ffa1f43ea628a8
2020-01-08 16:58:20 -08:00
Treehugger Robot
9c8b644b83 Merge "Annotating a class with @SystemApi makes its members @SystemApi" 2020-01-09 00:45:50 +00:00
Muhammad Qureshi
ffca2a3597 First draft of StatsEvent.java
The actual APIs are subject to change once socket encoding is finalized
and StatsEvent needs to be marked as @SystemApi. This will be addressed
in a future CL.

Test: builds successfully
Bug: 141696033
Change-Id: I508fa3d2f84850438562d01c78155590819badca
Merged-In: I508fa3d2f84850438562d01c78155590819badca
2020-01-08 16:44:18 -08:00
Daniel Bright
f095731693 Flipping NR signal strengths coming from HAL
The documentation of NrSignalStrength states that some
of the cell signal strength values should be flipped when
taken in from the HAL (this matches what LTE does.)  The
current implementation did not match this behavior, this
chagne fixes that.

Bug: 144667130
Test: FrameworkTests
Change-Id: Ica2595c5b6480a52209fe5ec93de63c9f323316a
Merged-In: Ica2595c5b6480a52209fe5ec93de63c9f323316a
2020-01-08 16:24:52 -08:00
Kyeongkab.Nam
f692b95b2a Add spoken subtitle information to TvTrackInfo
Add TIF API for getting spoken subtitle attribute for audio tracks
in order for TV App to use it.

Test: build
Bug: 112835103
Change-Id: I2ebc27dae020bce14cd1a3464e91416c7a4415ec
2020-01-09 09:13:08 +09:00
Lorenzo Colitti
dd3358b258 Merge "Refactor NetworkFactoryInfo to hide implementation details." 2020-01-09 00:10:47 +00:00
Peter Wang
24a3f6a6cd Merge "[Telephony Mainline] Move TelephonyUtils to telephony/common" 2020-01-08 23:58:23 +00:00
Xiangyu/Malcolm Chen
939d3d62cd Merge changes from topics "141018421_set3", "146905502", "remove_getPhoneId"
* changes:
  Make sanitizeLocationInfo System Api.
  Expose setUiccApplicationsEnabled as @SystemApi for eSIM to call upon slot mapping change.
  Mainline: remove usage of hiddepn API SubscriptionManager#getPhoneId
2020-01-08 23:51:48 +00:00
Meng Wang
0204e4a08e Merge "PersistableBundle: writeToStream/readFromStream" 2020-01-08 23:47:40 +00:00
Xiangyu/Malcolm Chen
5b879d5b2c Merge "[Mainline] Make canManageSubscription(SubscriptionInfo, String) System API." 2020-01-08 23:05:03 +00:00
evitayan
996aa2a146 Make mainline IPsec(IKE) to statically include @UiccAppType
This commit adds android.telephony.Annotation to
framework-ike-shared-srcs so that mainline module IPsec(IKE) can
statically include it.

Bug: 146360859
Test: build, flash, boot
Test: atest FrameworksIkeTests
Change-Id: I58b733fd6c020b76313b750e18eebb7bd0c12e7c
2020-01-08 14:17:31 -08:00
Chen Xu
bcc31107cd move UiccAppType to annotation class
this is to allow non-telephony mainline module statically link
to telephony annotatons.

Bug: 135956699
Test: Manual
Change-Id: I1207418cc83217cefc603589496660aa0d4be202
(cherry picked from commit d1b06a2090b63143481a706aed5659b5a341f2fe)
Merged-In: I1207418cc83217cefc603589496660aa0d4be202
2020-01-08 14:17:15 -08: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
Malcolm Chen
c3f7041810 Remove usage of @hide @Deprecated Telephony API in NPMS
Bug: 140908357
Test: build and unittest
Change-Id: I33ce53a8f6156f77c09a5562382e39f14c45bc78
Merged-In: I33ce53a8f6156f77c09a5562382e39f14c45bc78
2020-01-08 14:15:50 -08:00
Malcolm Chen
a4f2522c8a Use proper Telephony API to supply sim pin and puk.
Bug: 146593004
Test: manual - pin and puk

Change-Id: Ic64cc8a48c6e28f3ac8a013cbb4c15e7e58f7f4d
Merged-In: Ic64cc8a48c6e28f3ac8a013cbb4c15e7e58f7f4d
2020-01-08 14:10:16 -08:00
Malcolm Chen
893f393125 Hook supplyPin and supplyPuk to proper impl with subId specified
All TelephonyManager APIs are subId specified, where the public  API call
should map to a subId specific implementation via ITelephony and
PhoneInterfaceManager. But that's not the case for supplyPin and
supplyPuk. So fixing it and clean up unused aidl calls.

Bug: 146593004
Test: manual - pin and puk
Change-Id: If496674ef2ddc608264cf7b12905614698dc7e2d
Merged-In: If496674ef2ddc608264cf7b12905614698dc7e2d
2020-01-08 14:06:13 -08:00
Meng Wang
b42b1e7302 Merge "Remove ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED" 2020-01-08 22:05:07 +00:00
Malcolm Chen
538fd0d477 [Telephony Mainline] Make newFromBundle and fillInNotifierBundle System
API

The APIs are used in several placed where listens to
SERVICE_STATE_CHANGE broadcast.

Bug: 140908357
Test: build
Change-Id: I84543dbb056694d975799c7959c7ed66e286c530
Merged-In: I84543dbb056694d975799c7959c7ed66e286c530
2020-01-08 14:03:55 -08:00
Malcolm Chen
b9446af563 Make sanitizeLocationInfo System Api.
sanitizeLocationInfo is a helper API but it's used by TelephonyRegistry
which is not part of mainline module. So we need to expose it as System
Api, and properly rename it.

Bug: 146905502
Test: build flash and boot
Change-Id: Ia318ada2e478dbb24349119203b7869d23342ee5
Merged-In: Ia318ada2e478dbb24349119203b7869d23342ee5
2020-01-08 14:01:39 -08:00
Malcolm Chen
4ece3db113 Expose setUiccApplicationsEnabled as @SystemApi for eSIM to call upon slot
mapping change.

Because currently we rely on eSIM module to do handle some slot mapping
change and single to dual SIM config change, eSIM needs to also make
sure uicc applications are enabled for certain scenarios. So we expose
the SubscriptionManager#setUiccApplicationsEnabled as @SystemApi

Bug: 141018421
Test: unittest
Change-Id: I9844e71260ea009afd0928a0f4be4426e7d12358
Merged-In: I9844e71260ea009afd0928a0f4be4426e7d12358
2020-01-08 13:56:27 -08:00
evitayan
e22e47f48e Allow mainline IPsec(IKE) to statically include @PolicyDirection
@PolicyDirection was hidden API defined in IpSecManager and
mainline module IPsec(IKE) needs to depend on it.

To remove this hidden API dependency, this commit:
- Moves definition of @PolicyDirection to a separate class
- Creates sharing filegroup framework-ike-shared-srcs for mainline
  IKE and include PolicyDirection.java

Bug: 146360859
Test: build, flash, boot
Test: atest FrameworksIkeTests
Change-Id: Ic6d7c06d4b92e16a9a65430365c9acc73932147b
2020-01-08 13:53:14 -08:00
Cody Kesting
afa0f1756e Merge "Add API surface for ConnectivityDiagnostics API." 2020-01-08 21:53:14 +00:00
Malcolm Chen
443ba6fc8d Mainline: remove usage of hiddepn API SubscriptionManager#getPhoneId
Re-submit Iee05686bb935b9459e1f20654ec016c7c42e01af with unittest fixes.

Bug: 140908357
Test: build
Change-Id: Ia997291dc13487dad43519641369b4a357614602
Merged-In: Ia997291dc13487dad43519641369b4a357614602
2020-01-08 13:50:41 -08:00
Meng Wang
2536134b12 PersistableBundle: writeToStream/readFromStream
Bug: 143911192
Test: manual sanity test
Change-Id: I208487d572c8148f28fac3307873dfdc90996ae1
2020-01-08 13:44:15 -08:00
Peter Wang
3d292322b9 [Telephony Mainline] Move TelephonyUtils to telephony/common
Bug: 140908357
Test: Build
Change-Id: I94764fcf698477285ea366c5c7e90e7bd8a27eb3
Merged-In: I94764fcf698477285ea366c5c7e90e7bd8a27eb3
2020-01-08 13:41:38 -08:00
Malcolm Chen
2619a9b138 [Mainline] Make canManageSubscription(SubscriptionInfo, String)
System API.

Bug: 146900942
Test: Build flash and bootup
Change-Id: I824582f9203b950d1153091181de345629adfe65
Merged-In: I824582f9203b950d1153091181de345629adfe65
2020-01-08 13:39:36 -08:00
Hall Liu
f428f58080 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" 2020-01-08 20:54:48 +00: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
Yifan Hong
d0c62b9dab Merge changes from topics "vab_allocate", "vab_wait"
* changes:
  Use @ErrorCode for UpdateEngineCallback
  Add @ErrorCode annotation to UpdateEngine APIs
  Add UpdateEngine.cleanupSuccessfulUpdate
  Add UpdateEngine.allocateSpace
2020-01-08 18:37:16 +00:00
nchalko
53379f83d1 Merge "Add hearingImpaired information to TvTrackInfo" 2020-01-08 18:27:36 +00:00
Xin Li
45fa8ce95e Merge "DO NOT MERGE - Merge January 2020 Security Release into master" 2020-01-08 17:39:17 +00:00
Treehugger Robot
9395887931 Merge "Use new UnsupportedAppUsage annotation." 2020-01-08 16:49:24 +00:00