Commit Graph

11848 Commits

Author SHA1 Message Date
Benedict Wong
95d9c6164b Merge changes I5a01d709,I1b7da86d
* changes:
  Add Skeleton Ikev2VpnRunner class
  Add VpnRunner abstract class
2020-02-06 00:55:05 +00:00
Benedict Wong
e0b672d117 Add VpnRunner abstract class
This change adds a VpnRunner superclass to the LegacyVpnRunner in
preparation for the PlatformVpnRunner

Bug: 144246767
Test: FrameworksNetTests passing
Change-Id: I1b7da86d59c34f5d8c1ac13fb621f2e5d3bf8d26
2020-02-04 21:17:37 +00:00
Chalard Jean
0b32981970 Merge changes Icb062ffb,I66c4e8f5,I85247411,Id47c19b7,Ib713c4ae, ...
* changes:
  [NS A36] Add a test for lost trusted capability
  [NS A35] Send updated scores to factories at the end.
  [NS A34] Still more simplification
  [NS A33] Unify changing the default network
  [NS A32] More simplification
  [NS A31] Simplification
  [NS A30] Note linger out of the rematch loop
  [NS A29] Call LOST callbacks at the end of the rematch.
  [NS A28] Move setting the default network out of the rematch loop.
2020-02-04 13:14:27 +00:00
Chalard Jean
9f0e8ddad5 [NS A28] Move setting the default network out of the rematch loop.
Bug: 113554781
Test: FrameworkNetTests NetworkStackTests
Change-Id: I02d85f17bf0ea37ae173f306f5a47d7551773c3a
2020-02-04 16:23:58 +09:00
Treehugger Robot
b20182a741 Merge "ims:rcs uce update Add call composer, standalone chatbot feature tags for UCE" 2020-02-04 07:08:51 +00:00
Treehugger Robot
55d16fac97 Merge "Minor refactor of ChangeReporter and PlatformCompat" 2020-02-03 12:37:48 +00:00
atrost
e0c0823569 Fix comments on ChangeId.
This allows them to be used in doc generation.

Test: m -j offline-sdk-docs
Bug: 144927670
Change-Id: I849975c8bf880433490b42d514f3c8089029b497
2020-01-31 14:50:43 +00:00
Andrei Onea
1220afbd75 Minor refactor of ChangeReporter and PlatformCompat
Move all StatsLog generated constants into ChangeReporter, to make
re-submitting http://ag/10194708 easier.

Bug: 145952197
Test: atest PlatformCompatTest ChangeReporterTest
Change-Id: Iccff9582099c58f070a6b6aeb1d2588b0fafa90a
2020-01-31 14:30:28 +00:00
Qingxi Li
0b61b3d716 Remove try-catch from LocationPermissionChecker
Since LocationPermissionChecker#checkLocationPermission will be
used in ConnectivityService and the try-catch style will end up
in unwinding the stack. This CL remove the try-catch block from
this check function.

Bug: 148460709
Test: atest LocationPermissionCheckerTest
Change-Id: Ia97b3d8b1a96aca10fd87876969c290818e7e758
Merged-In: Ia97b3d8b1a96aca10fd87876969c290818e7e758
2020-01-31 01:06:17 +00:00
Qingxi Li
545a87c852 Update location permission check for ConnectivityUtil
This CL does following updates for the ConnectivityUtil class:
1. Remove the current profile check from location permission
check since it's not related to location permission check.
2. Makes all the checking functions to static to avoid memory
allocation
3. Rename the class from util to checker.

Bug: 148180968
Bug: 148232681
Bug: 148233000
Test: atest FrameworksNetTest
Change-Id: Ibf8879fe7dbcecdf766b959cb052d4d825b9b24c
Merged-In: Ibf8879fe7dbcecdf766b959cb052d4d825b9b24c
2020-01-27 14:11:15 -08:00
Evgenii Stepanov
372a9b99e2 Merge "Disable heap pointer tagging on Q or earlier." 2020-01-24 00:26:32 +00:00
Benedict Wong
50b147d827 Add additional fields to VpnProfile for profile-based IKEv2/IPsec VPNs
This commit adds the fields required to support IKEv2/IPsec VPNs. Other
fields will be reused where possible.

Bug: 143221465
Test: Compiles, new tests written for parcel/unparcel, encode/decode
Change-Id: I4c0e8fb934e75548424a15bbfb35c2ea9a3a57bc
2020-01-22 19:23:00 -08:00
Evgenii Stepanov
cba0c36535 Disable heap pointer tagging on Q or earlier.
For testing, this feature can be enabled per-application with
  adb shell am compat 135754954 <app.name>

Bug: 135754954
Bug: 147147490
Test: malloc() returns tagged pointer with the feature enabled

Change-Id: I067b4ba6f5fbfcb8287f0cc07d17978dbe708806
2020-01-22 15:20:54 -08:00
Eric Chang
c4296a944c ims:rcs uce update Add call composer, standalone chatbot feature tags for UCE
Bug: 147613952
Change-Id: Id3cc794e268b90fce9fc609830dc29a7e34fe0dc
2020-01-22 14:11:48 -08:00
Jing Ji
54469bf6ff Merge "DO NOT MERGE: Add support to send notification from Zygote to system_server" 2020-01-17 18:53:19 +00:00
Rick Yiu
28aec752bd Merge "Implement the ThreadPrioritySetter interface" 2020-01-17 13:32:54 +00:00
Jing Ji
82551f5e0e DO NOT MERGE: Add support to send notification from Zygote to system_server
Zygote will send message to system_server on SIGCHILD now.

Bug: 136036078
Test: atest CtsWebkitTestCases
Test: atest CtsHostsideWebViewTests
Test: atest CtsAppTestCases
Change-Id: I0ad2a3299f34344a12e2a3c153ca518aca6f6f11
Merged-In: Ifb385d907018bbe76b2aa81eb09209a77ea9224d
2020-01-16 17:24:40 -08:00
Christian Wailes
391bc94404 Merge changes from topic "manual-zygote-snap"
* changes:
  Fixed an issue Zygote initialization.
  Improved timekeeping logic for USAP Pool refill mechanism.
  Resets the refill action/timing info after a pool fill event.
  Make the USAP Pool refill delay configurable.
  Re-adds a trace  point that was accidentally removed.
  Moved some thread priority changes.
  Adjust Java Language thread priority in new processes.
  Adjusts the USAP pool refill mechanism.
  Change USAP name to application name as soon as possible.
2020-01-16 19:00:00 +00:00
Treehugger Robot
8478802be5 Merge "Remove phoneId from ImsUceManager" 2020-01-16 01:33:03 +00:00
Treehugger Robot
948c4086af Merge "Create an until function to check location permission" 2020-01-16 00:30:39 +00:00
Chris Wailes
ce55f80e17 Fixed an issue Zygote initialization.
An assignment to a flag and a call to a function that uses that flag
were in the wrong order.

Bug: 146614089
Test: Treehugger
Change-Id: If046aa62084892b8dae10497f15cf4c685d226db
Merged-In: If046aa62084892b8dae10497f15cf4c685d226db
2020-01-15 16:20:45 -08:00
Chris Wailes
d8ef116993 Improved timekeeping logic for USAP Pool refill mechanism.
This patch makes two changes to increase the reliability of the USAP
pool refill mechanism.  The first is to change the storage type of the
result of an expression from int to long.  This will help avoid
potential overflow issues.

The second change mitigates the impact of the non-monotonic system clock
having its value changed.  If the clock goes backwards in time past when
the initial event triggered the refill delay, the delay will now be reset.

Bug: 146614089
Test: Treehugger
Change-Id: Ic6f65de51757803b5ba95975bab3b9322a91c837
Merged-In: Ic6f65de51757803b5ba95975bab3b9322a91c837
2020-01-15 16:20:36 -08:00
Chris Wailes
b28db4abbc Resets the refill action/timing info after a pool fill event.
Bug: 132794985
Bug: 146614089
Test: m & flash & launch more apps than USAPs in the pool
Change-Id: I9ee74d76692fa8aeba9c70765b3e8f98ea9105bc
Merged-In: I9ee74d76692fa8aeba9c70765b3e8f98ea9105bc
2020-01-15 16:20:29 -08:00
Chris Wailes
eabbf8720c Make the USAP Pool refill delay configurable.
This patch fetches the USAP pool refill delay value from device_config
instead of hardcoding it.

Bug: 131362095
Bug: 146614089
Test: Build and launch 10+ apps successfully
Change-Id: Idfeb30fa62fa296492da211b2b44902ff4f99b18
Merged-In: Idfeb30fa62fa296492da211b2b44902ff4f99b18
2020-01-15 16:20:23 -08:00
Chris Wailes
7e9f83e18a Re-adds a trace point that was accidentally removed.
Test: Built and collected a trace to verify slice ended
Bug: 146614089
Change-Id: Ic75d65fc7b2a417fc3a58c2df8ec9deb795fb418
Merged-In: Ic75d65fc7b2a417fc3a58c2df8ec9deb795fb418
2020-01-15 16:20:16 -08:00
Chris Wailes
9091be3eb7 Moved some thread priority changes.
The previous place I had moved these changes resulted in runtime threads
being created at the wrong priority.  This patch moves the calls to the
correct location.

Test: atest CtsJvmtiRunTest924HostTestCases
Bug: 146614089
Change-Id: Iad2e17cd137eab81c595cb6816608a36b009da8b
Merged-In: Iad2e17cd137eab81c595cb6816608a36b009da8b
2020-01-15 16:20:07 -08:00
Chris Wailes
80993a6e60 Adjust Java Language thread priority in new processes.
Previously init started the Zygote with -20 nice value and then
immediately switched it to 0 in ZygoteInit.main so that new applications
forked from the Zygote have the correct Java Language thread priority.
This patch delays this priority change so that it only affects the new
processes and not the priority of the Zygote.

Test: m & flash & check ps
Bug: 146614089
Change-Id: Id00d0cfd642f02640c40b6e7b2aa8933a320b60c
Merged-In: Id00d0cfd642f02640c40b6e7b2aa8933a320b60c
2020-01-15 16:20:00 -08:00
Chris Wailes
0b2fbfcf6f Adjusts the USAP pool refill mechanism.
This patch adjusts the USAP pool refill mechanism so that it is less
disruptive to launching applications.  Refill events are now delayed
by several (3) seconds if delaying wouldn't cause the pool to be below
the minimum population size.

This patch also adjusts the process priorities for the USAPs and other
processes spawned from the Zygote so that they behave better in the
context they are spawned in.

Bug: 131362095
Bug: 146614089
Test: booted & launched apps & checked logs
Change-Id: I7328f304c9b744cfdbfbdbe522a5f9aeea5233bb
Merged-In: I7328f304c9b744cfdbfbdbe522a5f9aeea5233bb
2020-01-15 16:19:53 -08:00
Chris Wailes
82cde3eaed Change USAP name to application name as soon as possible.
This patch changes the location where the process's name is changed to
that of the application being launched.  It also attempts to use the
package name if the "nice name" is missing.

Test: m & flash & boot
Bug: 146614089
Change-Id: Id3a3d0b2b66d31c48274f8a986e86e9ed1d28f34
Merged-In: Id3a3d0b2b66d31c48274f8a986e86e9ed1d28f34
2020-01-15 16:19:46 -08:00
Qingxi Li
cd4a08fb4a Create an until function to check location permission
This util function will check whether the app has location permission
and whether the location mode is enabled for the users. This function
will be used by both connectivity service and wifi networks.

Bug: 142072839
Test: atest ConnectivityUtilTest
Change-Id: I5558ed04e5ef28033a1c649f5491f2f15aa63557
Merged-In: I5558ed04e5ef28033a1c649f5491f2f15aa63557
2020-01-15 15:24:01 -08:00
Brad Ebinger
bec99bade4 Remove phoneId from ImsUceManager
ImsUceManager does not need to be created per phoneId, since
the UCE service is created per subscription in RcsStackAdaptor.

Fixes: 147319232
Test: manual; bring up/down RcsService on a MSIM device
Change-Id: If9f89f8f083197c68900a6c1a51837ce0dd0b4a0
2020-01-15 22:21:10 +00:00
Treehugger Robot
c674b05757 Merge "Use new UnsupportedAppUsage annotation." 2020-01-14 13:50:12 +00:00
Brad Ebinger
70e9b70469 Merge "ims:rcs uce update" 2020-01-14 00:07:24 +00:00
Treehugger Robot
93db49faec Merge "Add Callback for Registration Failure" 2020-01-13 20:58:00 +00:00
Treehugger Robot
b2c3eaaf10 Merge "Use new UnsupportedAppUsage annotation." 2020-01-13 14:27:29 +00:00
Treehugger Robot
70a89435e7 Merge "Use new UnsupportedAppUsage annotation." 2020-01-13 13:04:48 +00:00
Nathan Harold
c41cb737ed Add Callback for Registration Failure
Add a callback to PhoneStateListener to indicate that
a registration procedure has failed.

Bug: 143187047
Test: make update-api && make
Merged-In: I4a4ba4479dfd465a9d8063135f3b4bf4e1323e99
Change-Id: I4a4ba4479dfd465a9d8063135f3b4bf4e1323e99
(cherry picked from commit 5e6e983cad)
2020-01-12 10:33:03 -08:00
Daulet Zhanguzin
7b511f0dd8 Merge "Deprecate checkNotNull in favor of Objects.requireNonNull()." 2020-01-10 16:36:15 +00:00
Artur Satayev
2a9f3b8811 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8ffa1da1bcd43c25f4ff817575db77a33c0f3d31
Merged-In: I8ffa1da1bcd43c25f4ff817575db77a33c0f3d31
2020-01-09 15:20:16 +00:00
Artur Satayev
ae5bcf23b5 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I41e12e425284e74561c6b61663241df364ae54a1
Merged-In: I41e12e425284e74561c6b61663241df364ae54a1
2020-01-09 15:15:51 +00:00
Artur Satayev
54af4fc42a Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
Merged-In: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
2020-01-09 13:52:18 +00:00
Rick Yiu
2c7729e516 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: Ib486b7229d5eb723fbb550ed73435fa24afe5190
2020-01-09 12:03:30 +00:00
Daulet Zhanguzin
9dd0f80341 Deprecate checkNotNull in favor of Objects.requireNonNull().
Remove one of unused overloads. The same change passed on master:
ag/10013392

Bug: 126528330

Test: Treehugger
Test: made equivalent change in internal branch to verify that removed method is not in use

Change-Id: I37c5b93e2ffbfa38a5b9feb4cae2062ef24acec5
2020-01-09 11:18:25 +00:00
Meng Wang
8af4d4ad78 Use Parcelable CellIdentity instead of CellLocation in AIDL.
Currently CellLocation is passed over AIDL by manually
marshalling/unmarshalling to/from Bundle, and type info
is not preserved in the process.

Bug: 146092124
Test: make
Merged-In: I6225f100953a2ad354acaa261a774989926393ce
Change-Id: I6225f100953a2ad354acaa261a774989926393ce
2020-01-08 20:29:27 -08: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
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
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
Rick Yiu
bc0290a7b0 Merge "Implement the ThreadPrioritySetter interface" 2020-01-07 02:31:17 +00:00