660312 Commits

Author SHA1 Message Date
Junyu Lai
7fee9dd710 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" 2021-12-16 10:42:15 +00:00
jimsun
6fb25dc35a Add mock modem service operations in Telephony
Bug: 205101043
Bug: 203241555
Test: manual
Change-Id: I65127fc43c62b52e3efaa99d06bf77855aab7bb0
Merged-In: I65127fc43c62b52e3efaa99d06bf77855aab7bb0
2021-12-16 17:02:34 +08: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
Raymond Tiong
0a229569cb Adding mustPlayShutterSound to break Cam2 dependency on Cam1
This replaces the already deprecated field:
android.hardware.Camera.CameraInfo#canDisableShutterSound

Bug: 203461517

Test: tested in Camera CTS

Change-Id: I0a0c6a3d5346413074344a079500f1c30c4431d9
2021-12-16 04:25:55 +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
Devin Moore
bba4af8447 Use new AIDL IR interface for ConsumerIr service
Continue using the HIDL service if it is registered, otherwise use the
AIDL service.

Test: atest ConsumerIrTest VtsHalIrTargetTest hal_implementation_test
Bug: 205000342
Change-Id: I648aa765d14c4f5d4c862523a1bb69b2e7bc5cc1
2021-12-16 00:25:59 +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
Jared Duke
d098791d6e Add jdduke@ to services/proguard.flags OWNERS
This file is only used in optional optimized builds, and will likely
undergo significant churn in the coming weeks. Add jdduke@ as an
OWNER for this file only to help expedite review.

Bug: 210510433
Change-Id: I46d3dfa2d3fc56acd849aa93e3361ac3af5c1341
Test: N/A
2021-12-16 00:03:11 +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
770d50ed43 Moved AttributionSource related APIs in AttributionSource
Modified myAttributionSource() to check for global AS for
process in ActivityThread and fallback to building new AS
with PackageManager#getPackageForUid(myUid()) if null.

Tag: #feature
Bug: 210467846
Bug: 210468546
Test: build
Change-Id: I7aa75395469bf0bb806100420faaf98c52057355
CTS-Coverage-Bug: 210906055
2021-12-15 22:03:50 +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
      c478c171e92b2f255e9699d9c9306b001368ac20

Fix: 209958658
Fix: 210165648
Test: atest -c CtsInputMethodTestCases:EditTextImeSupportTest
Change-Id: Ibc40072fa11a4d6e3c24b8d7860c914ccdbcbc8a
Merged-In: Ibc40072fa11a4d6e3c24b8d7860c914ccdbcbc8a
(cherry picked from commit beda2b7f76e9372db5b4d52bbfac3910cb2fda4d)
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
Rahul Sabnis
202ab8ff95 Merge "Remove unused references to android.app.ActivityThread in BluetoothAdapter" 2021-12-14 21:41:26 +00:00
Lucas Dupin
2f72aa0bd1 Log UI events to traces
Add LogBuffer tags to perfetto traces in order to simplify the process
of reading them.

A new track will indicate the state of notification, lock screen, AOD,
etc.

Bug: 207049735
Test: atest TraceDevTest
Change-Id: I3253c0f5a369ad4a25d6646daa62810644553a36
2021-12-14 21:35:19 +00:00
Sooraj Sasindran
5d02dbb7bf Allow renounce location permission
Allow renounce location permission

Bug: 198533763
Test: CTS
Merged-In: I10872f34603441da2cf80f1f2976f3f3ca0ff6c2
Change-Id: I10872f34603441da2cf80f1f2976f3f3ca0ff6c2
2021-12-14 13:25:04 -08:00
Alice Kuo
4312cc9206 Fix the set member size check error
The default member device set object are not null. We should check it by
its size instead.

Bug: 205507889
Bug: 150670922
Bug: 178981521
Test: make -j50 RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceManagerTest
Change-Id: Iae4b2f70723c1b083ad71df1374a608a12ff6c0e
2021-12-15 05:20:16 +08:00
Hui Wu
d15fe6e622 Merge "Add new MANAGE_CLOUDSEARCH permission for the cts test" 2021-12-14 20:35:51 +00:00
Xin Li
85d715bac3 Merge "Merge Android 12 QPR1" 2021-12-14 20:25:23 +00:00
Treehugger Robot
b4950bde08 Merge "Copy attributable to Bluetooth" 2021-12-14 20:13:31 +00:00