Commit Graph

660143 Commits

Author SHA1 Message Date
Benedict Wong
fb4a590dbc Remove VCN Carrier Privilege grace period
This change removes the grace period after the VCN is notified that a
provisioning app is no longer carrier privileged. This is due to the
switch to use CarrierPrivilegesTracker, which inherently has the
identical grace period.

This both simplifies the code, as well as removes some edge cases. As
such, tests for the delay before VCN tears down are no longer necessary.

Bug: 183554244
Test: atest FrameworksVcnTests
Change-Id: Ia50223108e45eeaedc860adf5e29a6ea459d956f
2022-01-07 22:11:26 +00:00
Benedict Wong
31d56f8298 Update TelephonySubscriptionTracker to use CarrierPrivilegesListener
This change adds use for CarrierPrivilegesListener to use the callbacks
as triggers to re-check carrier privileges. For simplicity, the carrier
privileges returned by the callback are not used, as it requires an
additional layer of caching. Instead, a query is performed, which
should hit a cache in the CarrierPrivilegesTracker, thus not be
performance-sensitive.

Bug: 183554244
Test: atest FrameworksVcnTests
Change-Id: Ia4529d087ee7f0deca7101c6849183ba7267c067
2022-01-07 22:11:22 +00:00
Henry Fang
525fc0dccb Merge "TvProvider API standardization for ARIB and DVB TvProvider" 2021-12-16 19:34:31 +00:00
Hui Wu
d628edb425 Merge "Adding owners in cloudsearch packages" 2021-12-16 19:33:49 +00:00
Hunter Knepshield
d54e1126ab Merge "Create CarrierPrivilegesListener callback." 2021-12-16 19:00:24 +00:00
Steven Moreland
8581d27415 Merge "Binder: recycle Parcel in finally block" 2021-12-16 17:16:31 +00:00
Ayush Sharma
da37e0f471 Merge "Revert "Add APIs that allow to exclude routes from VPN"" 2021-12-16 15:01:30 +00:00
Ayush Sharma
487b2e645a Revert "Add APIs that allow to exclude routes from VPN"
Revert "Suppress NewApi warnings for @SystemApi -> public APIs"

Revert "Add VpnServiceBuilderShim for VpnService.Builder"

Revert submission 1551943-vpn-impl

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN

Change-Id: I89209357ab4bb206d206adcf9fd6d3498ce6ef4c
BUG: 210979001
2021-12-16 14:40:13 +00:00
Treehugger Robot
8f4e057fa7 Merge "Remove isUnsafeBuild() from IpSecAlgorithm" 2021-12-16 14:16:50 +00:00
Xiao Ma
23b9aec38e Merge "Move Ethernet related files to f/b/packages/ConnectivityT." 2021-12-16 14:12:39 +00:00
Aaron Huang
da5df1a9d8 Merge "Remove NetdService usage from IpSecService" 2021-12-16 12:32:41 +00:00
Taras Antoshchuk
55f030225b Merge "Add APIs that allow to exclude routes from VPN" 2021-12-16 11:13:33 +00:00
Junyu Lai
7fee9dd710 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" 2021-12-16 10:42:15 +00:00
Xiao Ma
dfed81ffde Move Ethernet related files to f/b/packages/ConnectivityT.
ethernet-service is going to be moved into Connectivity mainline module.
Move all ethernet related files in f/b/ to f/b/packages/ConnectivityT so
that it's easier to migrate these files to Connectivity module finally
after clearing the hidden API usages. Below files to be moved:

Ethernet framework related files:
    - EthernetManager.java
    - EthernetNetworkSpecifier.java
    - IEthernetManager.aidl
    - IEthernetServiceListener.aidl
    - ITetheredInterfaceCallback.aidl

Ethernet service related files:
    - IpConfigStore.java(EthernetConfigStore has dependency on the class)

For the ethernet-service related files, keep it as-is temproraliy and
fix the hiden API dependencies in f/opt/net/ethernet/. After this work
is done, then migrating the whole of ethernet folder to Connectivity
module completely.

This CL also fixes some minor errors of code style format to pass the
code style check.

Bug: 210586283
Test: build pass
      atest FrameworksNetTests
      atest EthernetServiceTests
Change-Id: Ib359d29d5221105f648bc4194c6d6dbe4cc6e3e5
2021-12-16 06:59:08 +00:00
Treehugger Robot
00d8163936 Merge "Add scan result logs." 2021-12-16 04:29:41 +00:00
Rambo Wang
33acead6f6 Merge "Support subscription for CarrierService#onLoadConfig" 2021-12-16 04:10:31 +00:00
Hyundo Moon
e4a79de89e Merge "BluetoothGatt: Deprecate unsupported methods" 2021-12-16 01:35:46 +00:00
Steven Moreland
713c258edc Binder: recycle Parcel in finally block
If other types of exceptions happen here, we should still recycle the Parcel.

Bug: 207778694
Test: boot
Change-Id: I3375b87a674c45f8bc66848dfaf899497f5acaa8
2021-12-16 01:03:54 +00:00
Hunter Knepshield
18d9d9feb1 Merge "Create a convenience method to get the CarrierService package." 2021-12-16 00:50:44 +00:00
Hui Wu
fa11d35357 Adding owners in cloudsearch packages
Bug: 210528288
Test: not needed as this is a meta file change
Change-Id: I6bbf9f350639ed53edb1643c937c8c55702ff254
2021-12-16 00:03:19 +00:00
Rambo Wang
bbec7b6a5f Support subscription for CarrierService#onLoadConfig
CarrierService#onLoadConfig is called from platform to carrier service
to load carrier-specific configuration values.

In case when the multiple subscriptions are supported for the same
carrier (e.g. Fi on pSIM + Fi on eSIM case), the current API is not
able to distinguish on which subscription the carrier config should
be loaded. The subscription parameter introduced in the API can
resolve the problem.

If carrier app has no need to distinguish configs by subscriptions,
it can simply ignore overriding the new version of the API.

Bug: 131697791
Test: atest CarrierServiceTest
CTS-Coverage-Bug: 210143342
Change-Id: Id7cd75c24f01119749cb5bf31d4335c638547aaf
2021-12-16 00:02:35 +00:00
Treehugger Robot
325b64ce57 Merge "Add carrier configuration for list of opportunistic carrier-ids associated with CBRS pSIM" 2021-12-15 23:54:48 +00:00
Treehugger Robot
d1d210762b Merge "Change the wakeup alarms for "light-doze-maintenance step" to non-wakeup alarms" 2021-12-15 23:51:19 +00:00
Treehugger Robot
303aa3d8ac Merge "New SIMINFO DB columns for phone number" 2021-12-15 23:18:31 +00:00
Rambo Wang
eaa2a701cd Merge "Support CarrierService#notifyCarrierNetworkChange with subscription" 2021-12-15 23:17:30 +00:00
Treehugger Robot
d1b31d480a Merge "Remove usage of IntegerRes in type usage target" 2021-12-15 23:08:09 +00:00
Rambo Wang
1f8d32dc29 Merge "Make get/setSystemThresholdReportingRequestedWhileIdle @SystemApi" 2021-12-15 22:57:13 +00:00
Rambo Wang
1b85e74899 Make get/setSystemThresholdReportingRequestedWhileIdle @SystemApi
SignalStrengthUpdateRequest#setSystemThresholdReportingRequestedWhileIdle
is built to replace the deprecated feature
PhoneStateListener#LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH.

The only client (Bluetooth) does not allow hidden API call.
@SystemApi is the next option while the API is not intended
to be public yet.

The javadoc is also updated to be more precise on when the
permission is required.

Bug: 205544105
Test: atest TelephonyManagerTest
CTS-Coverage-Bug: 205602896
Change-Id: Ia72cc1c77cf5b97458f8f6191a24bfa77a861234
2021-12-15 22:34:48 +00:00
Etienne Ruffieux
4d612ad87b Merge "Replaced Bluetooth SystemProperties.set by sysprop" 2021-12-15 19:14:42 +00:00
Treehugger Robot
c2bc642bbc Merge "Delete skipCallbacks when Exception dispatchInputEvent beacuse calling finishInputEvent twice will cause 'Native Crash'" 2021-12-15 18:59:39 +00:00
Avinash Malipatil
f63c1fddb3 Add carrier configuration for list of opportunistic carrier-ids
associated with CBRS pSIM

Bug: 209555162
Test: build

Change-Id: I4429a0bada9632dff0935fabafdd23785837f184
2021-12-15 18:58:09 +00:00
Treehugger Robot
a9666fccb9 Merge "Log UI events to traces" 2021-12-15 18:11:52 +00:00
Aurimas Liutikas
7e9eccb6e2 Remove usage of IntegerRes in type usage target
Fixes:
frameworks/base/packages/SystemUI/src/com/android/systemui/media/RecommendationViewHolder.kt:50:40: error: this annotation is not applicable to target 'type usage'
    val mediaCoverItemsResIds = listOf<@IntegerRes Int>(
                                       ^

Test: make -j
Merged-In: I55129c609ecc26ee71f234778de379d31c9e9cb6
Change-Id: I55129c609ecc26ee71f234778de379d31c9e9cb6
2021-12-15 17:41:23 +00:00
Rambo Wang
241b1fa964 Support CarrierService#notifyCarrierNetworkChange with subscription
Current APIs does not include subId or phoneId to locate which
carrier network reported the change. A patch based on carrier
privilege were deployed in Q to temprarily fix the issue.

However, multiple subscriptions which all have the carrier
privileges will all get notified, even only one of them
has the real change.

To throughly resolve the issue, the subscription is introduced
in the API to distinguish which network actually has the change.

Bug: 131697791
Test: atest TelephonyRegistryManagerTest CarrierServiceTest
Change-Id: Ie7ee25f53da605c15e1a9228482cc8c4e7406d2a
2021-12-15 17:35:52 +00:00
Treehugger Robot
e908851af5 Merge "Fix an off-by-one bug in EditableInputConnection#endBatchEdit() return value" 2021-12-15 17:00:15 +00:00
Jon Eckenrode
629810015f Merge "Revised the OnDragListener and onDragEvent API documentation." 2021-12-15 15:22:55 +00:00
Etienne Ruffieux
807dc12c1a Replaced Bluetooth SystemProperties.set by sysprop
Tag: #feature
Bug: 197210455
Test: set/get sysprop with SystemProperties
Merged-In: I613808dbc930c90e391df9857a173a86aedc4acf
Change-Id: I613808dbc930c90e391df9857a173a86aedc4acf
2021-12-15 13:06:17 +00:00
Aaron Huang
eb4de5ff49 Remove isUnsafeBuild() from IpSecAlgorithm
IpSec is going to move to Connectivity mainline module so
hidden API usage should be removed. There's no formal API
could be an alternative for Build.IS_ENG. Considering
isUnsafeBuild() is not a really helpful method because it
only prints the log in eng build. Therefore, remove it.

Bug: 204153604
Test: FrameworksNetTests
Change-Id: Ic354e12423629b0d72e8087843893953a0c8c465
2021-12-15 19:33:03 +08:00
Aaron Huang
7d17a103c8 Remove NetdService usage from IpSecService
IpSecService is going to be moved into ConnectivityService
module. So, NetdService won't be visible to IpSecService
since it is a hidden class.

NetdService.get(timeout) is a method that blocks for specified time
until INetd instance is available. In SystemServer IpSecService is
created after NetworkManagementService and NMS uses NetdService.get()
to get INetd instance which is a method that blocks until an INetd
instance is available. Thus, connectNativeNetdService can be removed
because NMS already waits for INetd instance is available so IpSecService
should be able to get INetd instance immediately.

Bug: 204153604
Test: FrameworksNetTest
Change-Id: I007cb28de63783d60084f93dddb4de78faa0e868
2021-12-15 19:29:00 +08:00
Hyunho Shin
a706df510f Merge "IMS RCS UCE API Improvement" 2021-12-15 10:59:35 +00:00
Aaron Huang
033ccab2a0 Merge "Refactor IpSecServiceConfiguration to Dependencies" 2021-12-15 07:53:23 +00:00
Treehugger Robot
58863696db Merge "Fix style errors for IpSec associated files" 2021-12-15 06:28:14 +00:00
Treehugger Robot
7e32693bc7 Merge "Add CachedBluetoothDeviceManager test case for csip set member device logic" 2021-12-15 05:52:24 +00:00
Treehugger Robot
0c02dc46e1 Merge "Fix the set member size check error" 2021-12-15 05:35:24 +00:00
Jing Ji
8a9e2c51c1 Merge "Add settings to toggle the phantom process monitoring in dev options" 2021-12-15 02:14:50 +00:00
Alice Kuo
e19be3ce15 Add CachedBluetoothDeviceManager test case for csip set member device logic
The patch contains two topic.
1. Add test case for csip set member device add/remove logic
2. Fix clearNonBondedDevices issue. Remove object from set as iterating, it would cause ConcurrentModificationException, make a copy as iterating to achieve the safe remove.

Bug: 205507889
Bug: 150670922
Bug: 178981521
Test: make -j50 RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceManagerTest
Change-Id: I3fa3fd9a9e13e011ce2ce01a8142511c86ccbf1c
2021-12-15 08:55:58 +08:00
Treehugger Robot
373b687d96 Merge "Allow renounce location permission" 2021-12-15 00:35:20 +00:00
Joonhun Shin
6de3c4c12e Merge "Support RCS master switch" 2021-12-14 23:16:23 +00:00
Yohei Yukawa
1fdc14b8a9 Fix an off-by-one bug in EditableInputConnection#endBatchEdit() return value
This is a follow up CL to our previous CL [1], which had an off-by-one
bug when determining the return value of

   EditableInputConnection#endBatchEdit().

According to the API document of InputConnection#endBatchEdit(), the
following test should pass.

   EditText editText = new EditText(context);
   EditorInfo editorInfo = new EditorInfo();
   InputConnection editableInputConnection =
           editText.onCreateInputConnection(editorInfo);
   assertThat(editableInputConnection.beginBatchEdit()).isTrue();
   assertThat(editableInputConnection.beginBatchEdit()).isTrue();
   assertThat(editableInputConnection.endBatchEdit()).isTrue();
   assertThat(editableInputConnection.endBatchEdit()).isFalse(); // (*)
   assertThat(editableInputConnection.endBatchEdit()).isFalse();

However, the last assertion marked with (*) actually fails due to an
off-by-one bug.  This CL finally fixes it.

The risk of app compat breakages because of fixing this long standing
bug is supposed to be low, mainly because:

 * the system has not relied on this return value yet.
 * Widgets like WebView have correctly implemented this API.
 * IME has always received true no matter what the app returned, which
   is the same behavior as other async InputConnection APIs.

This CL adds several notes to InputConnection#endBatchEdit() document
to help developers correctly implement and use this API.

 [1]: I1ec5518fdc16fb0551fbce9d13f5d92eb4bc78c0
      c478c171e9

Fix: 209958658
Fix: 210165648
Test: atest -c CtsInputMethodTestCases:EditTextImeSupportTest
Change-Id: Ibc40072fa11a4d6e3c24b8d7860c914ccdbcbc8a
Merged-In: Ibc40072fa11a4d6e3c24b8d7860c914ccdbcbc8a
(cherry picked from commit beda2b7f76)
2021-12-14 15:15:54 -08:00
Ady Abraham
744da388db Merge "RefreshRatePolicy: set both min and max refresh rate when camera is used" 2021-12-14 23:12:44 +00:00