571444 Commits

Author SHA1 Message Date
Zoey Chen
a6f8188539 Merge "[PhysicalChannelConfig] UL's frequency should not be same with DL's" 2021-08-19 17:56:20 +00:00
Treehugger Robot
e476546592 Merge "Disable errorprone for platformtestprotos" 2021-08-19 17:18:42 +00:00
Alice Kuo
ee29136541 Add a system api to fetch uuids by the specific transport
The functionality is similar with fetchUuidsWithSdp which uses TRANSPORT_AUTO. Bt stack depends on the devie type and address type to do sdp or gatt service discovery. Add an api to specific the transport. It would be fexible to handle the dual mode device.

Tag: #feature
Bug: 197195548
Test: atest BluetoothInstrumentationTests
Test: Take two headphone to test the dual mode behavior
Change-Id: I32c8dde68969e0bdc42e4e898c43a4f2c1d3379a
Merged-In: I32c8dde68969e0bdc42e4e898c43a4f2c1d3379a
2021-08-19 15:29:32 +00:00
Victor Chang
480f33c187 Regenerate LocaleDataTables.cpp due to ICU 69 upgrade
The command:
./tools/localedata/extract_icu_data.py $ANDROID_BUILD_TOP > libs/androidfw/LocaleDataTables.cpp

Bug: 195953235
Test: atest CtsIcu4cTestCases CtsIcuTestCases CtsLibcoreTestCases CtsLibcoreOjTestCases CtsBionicTestCases CtsTextTestCases
Change-Id: Idd4329a83a27bd550185e815dc5c92e3f2882d12
2021-08-19 15:04:14 +01:00
Ashok Mutyala
26d8e9e85a RESTRICT AUTOMERGE Avoid the scenario Where taskdisplayarea is null
Problem: Framework Reboot i.e., NPE in android.ui Thread
E AndroidRuntime: FATAL EXCEPTION IN SYSTEM PROCESS: android.ui
E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'com.android.server.wm.ActivityStack com.android.server.wm.TaskDisplayArea.getRootHomeTask()' on a null object reference
E AndroidRuntime: **at com.android.server.wm.ActivityStarter.postStartActivityProcessing(ActivityStarter.java:1486)
E AndroidRuntime: **at com.android.server.wm.ActivityStarter.startActivityUnchecked(ActivityStarter.java:1533)
E AndroidRuntime: **at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1190)
E AndroidRuntime: **at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:673)
E AndroidRuntime: **at com.android.server.wm.ActivityStartController.startHomeActivity(ActivityStartController.java:206)

Analysis:
getDisplayArea in Task and its Super Class is annotated with Nullable and can be return Null.

Bug: 196568035
Test: StabilityTest
Change-Id: I4f3c8fdca0202591e7ac07aa7b8e3de3b08b2475
Merged-In: I4f3c8fdca0202591e7ac07aa7b8e3de3b08b2475
2021-08-19 11:41:49 +00:00
Zoey Chen
bcf65aa1d0 [PhysicalChannelConfig] UL's frequency should not be same with DL's
Bug: 194042135
Test: atset PhysicalChannelConfigTest
Change-Id: I1225a1429ff77b33c54af0dfce60a8739494e47a
Merged-In: I1225a1429ff77b33c54af0dfce60a8739494e47a
2021-08-19 06:59:45 +00:00
Jooyung Han
8ed699e610 OverlayManager: use typed collection type in AIDL
Use Map<K,V> and List<V>.

Bug: 192615532
Test: m
Change-Id: I5ad7f67b4b08b646362a58214c3b62cd1ada28c0
2021-08-19 15:56:48 +09:00
Jooyung Han
54a1fd2e0f tuner: use typed Map<String, String>
Bug: 192615532
Test: m
Change-Id: Ifa4c9c56d642e1047397cc185872f76a5970f944
2021-08-19 15:29:23 +09:00
Hongguang
0daaeb1d8a Update tuner OWNERS.
Bug: 191825295
Test: N/A
Change-Id: I5cd78e277008897913dcd3a5ce4d382a66fa3d27
2021-08-19 02:43:19 +00:00
Treehugger Robot
cb8f9e3429 Merge "Rename ProcResult stdout and stderr fields" 2021-08-19 00:40:13 +00:00
Colin Cross
95f3535381 Disable errorprone for platformtestprotos
Running errorprone on platformtestprotos took more than 45 minutes.
Disable it.

Bug: 197157393
Test: m RUN_ERROR_PRONE=1 javac-check
Change-Id: I4e62adfddb93489d83c7e41e4ecba75fdf654004
2021-08-18 17:19:27 -07:00
Colin Cross
304793a811 Rename ProcResult stdout and stderr fields
stdout and stderr are macros in musl, which causes build failures
when they are used as field names.  Rename the fields to stdout_str
and stderr_str.

Test: builds
Merged-In: I04770d2d6e82ca8393308ab12a304838a80f0ae5
Change-Id: I04770d2d6e82ca8393308ab12a304838a80f0ae5
2021-08-18 23:01:24 +00:00
Samiul Islam
33dce2cffd Hook the new APIs in StagingManager to PackageManagerNative service
Also note, if a StagedApexObserver is observing through binder, they
might not be able to send the original observing object for
unregistration. As such, for binder observer we clean them up when they
die.

(Note: Unit tests have been removed to resolve merge conflict)

Bug: 187444679
Test: atest StagedInstallInternalTest
Change-Id: Ie2e01b01690a5882574282f3158e454a9b6056e7
Merged-In: Ie2e01b01690a5882574282f3158e454a9b6056e7
(cherry picked from commit 5ac0ee8278ea33a6f0bf14b96821d31576e81df4)
2021-08-18 15:26:52 +01:00
Samiul Islam
7675b5c154 Notify StagedApexObservers when there is a change in set of staged APEX
The set of staged APEX is changed whenever:
- a session containing APEX succesfully passes pre-reboot verification
  and gets marked ready
- a staged session gets abandoned

(Note: Unit tests have been removed to resolve cherry-pick conflict)

Bug: 187444679
Test: atest StagedInstallInternalTests
Change-Id: I5c5bb4523cdab46e22fe3c8e2373289d8619c10e
Merged-In: I5c5bb4523cdab46e22fe3c8e2373289d8619c10e
2021-08-18 14:01:52 +01:00
Samiul Islam
9a68bedca7 Open up new API in StagingManager to get information about staged APEX
These APIs will be later used by PackageManagerNative service to open up
the information to native clients.

The current implementation is a bit wasteful since everytime the client
makes a request, we ask the ApexManager to fetch us information about
the staged sessions N times, where N is the number of staged sessions
that are marked ready.

We can optimize it by caching the result of getStagedApexInfos(session)
method. This will be done in a separate CL.

(Note: Unit tests have been removed to resolve cherry-pick conflict)

Bug: 187444679
Test: atest StagedInstallInternalTests
Change-Id: I76803382db26a029f6d9cabb0d9ce9a2bf9c8ea1
Merged-In: I76803382db26a029f6d9cabb0d9ce9a2bf9c8ea1
(cherry picked from commit c8132a943723f56fb4850b96779ac39d41fec336)
2021-08-18 13:36:47 +01:00
Samiul Islam
43d5b8b3f7 Connect the new API from ApexService to ApexManager
Bug: 187444679
Test: atest ApexManagerTest
Change-Id: I60482a180d873a5f65887d0a5bb4230f75cb55df
Merged-In: I60482a180d873a5f65887d0a5bb4230f75cb55df
(cherry picked from commit 2bcdaf91d59cec2b007e211bd4e0107c7ec07147)
2021-08-18 12:02:34 +01:00
Max Bires
773a378390 Merge "Fixing a condition that can cause deadlock" 2021-08-18 01:45:15 +00:00
Treehugger Robot
6e3ea69863 Merge "Update OWNERS for Intent* and Content*" 2021-08-17 23:14:07 +00:00
Makoto Onuki
ea8407635c Update OWNERS for Intent* and Content*
Test: Build
Change-Id: I2232342d3e68cc8e1eea14bfa999f32b15ba5789
2021-08-17 14:27:35 -07:00
Treehugger Robot
dee731ad0b Merge "Suppress AIDL warnings: untyped-collection" 2021-08-17 11:46:23 +00:00
Max Bires
c9be198afe Fixing a condition that can cause deadlock
Callbacks on ServiceConnection happen on the main UI thread for an
application. Since the thread that calls bindService then immediately
blocks to wait for the service to be connected, this will cause a
deadlock if key operations are happening on the main UI thread.

This bug has likely not been detected yet since key operations are not
supposed to be performed on the main UI thread, however it was uncovered
in a similar application during other testing. This fix ensures the
ServiceConnection object's callbacks will be triggered from a separate
thread from the calling thread.

Bug: 196571032
Test: Apps that run key operations on the UI thread don't hang.
Change-Id: I630a0ef2560a8ebd962de54c65e3d6277133a1cb
Merged-In: I630a0ef2560a8ebd962de54c65e3d6277133a1cb
2021-08-17 06:43:46 +00:00
zhuyunyi
afcd22acaa Change Shallow Copy to Deep Copy in UsageStats
There are three reference type members in UsageStats's constructor, when using "new UsageStats(stats)" to copy, it will be a Shallow Copy, which may cause concurrent modify problem.

For example, in UserUsageStatsService.java, the sUsageStatsCombiner is using "new UsageStats(stats.packageStats.valueAt(i)" to copy, and the value is passing to the computeCacheQuotaHints in
CacheQuotaStrategy.java. If we change the UsageStats.mForegroundServices at the same time, IndexOutOfBounds Exception will happen.

Therefore, it is necessary to modify the way of copying of the UsageStats.

Signed-off-by: zhuyunyi <zhuyunyi@xiaomi.com>
Change-Id: I58a54d17aad6ef5213e52658ee3387f3069339af
2021-08-17 14:10:39 +08:00
Jooyung Han
133879b683 telephony: suppress warnings in AIDL
Warnings from using untyped List/Map. For now these List/Map can't be
migrated to typed ones because AIDL List/Map doesn't support Integer as
key/value types.

Bug: 192615532
Test: m
Change-Id: If55364b4ad4dc5660871f7eef051e12ec0399a70
2021-08-17 14:36:04 +09:00
Treehugger Robot
bfc5088c1d Merge "Update OWNERS." 2021-08-17 03:57:07 +00:00
Joe Bolinger
2fc9e3fa0a Update OWNERS.
Test: N/A
Change-Id: I3da6e85dd944ca19ecfabfacb2e6928500ee0c49
2021-08-16 17:11:15 -07:00
Hongguang Chen
850866e94a Merge "Fix Quiescent Reboot Reason" 2021-08-16 18:12:18 +00:00
Jeff DeCew
1cbc573b93 Add notifications team as OWNERS of notification-related utilities and their tests
Change-Id: I153ab4e182a0843706c25f03c891a92eb48eea9c
2021-08-16 14:56:48 +00:00
Treehugger Robot
efc036801c Merge "Keystore 2.0 SPI: Fix contract between equals and hashCode" 2021-08-14 05:07:21 +00:00
Treehugger Robot
4c462beeae Merge "Allow SHELL_UID to disable Bluetooth for testing" 2021-08-14 00:42:29 +00:00
Myles Watson
c4b27dfce3 Allow SHELL_UID to disable Bluetooth for testing
Bug: 189952422
Test: atest VtsHalBluetoothV1_0TargetTest
Change-Id: Id45a43b824b2be49fb38686f9582484931024187
2021-08-13 16:03:12 -07:00
Jooyung Han
72d5595e0e Merge "AIDL: use typed Map" 2021-08-12 23:14:53 +00:00
Chris Li
a1431a8227 Merge "Fix thread safety issues;" 2021-08-12 23:07:32 +00:00
Janis Danisevskis
7bdc12d5f3 Keystore 2.0 SPI: Fix contract between equals and hashCode
This fixes the contract between equals and hashCode in
AndroidKeystoreKey and AndroidKeystorePublicKey.

Bug: 196118021
Test: N/A
Change-Id: I3f7e6d72d53c7051c13daeb5aa6ce1abf4eb0cc5
2021-08-12 12:29:02 -07:00
Riddle Hsu
99e5c70ff0 Merge "Avoid the scenario where Contexts list filled with null value in ShowAnrDialogs()" 2021-08-12 09:50:46 +00:00
Jooyung Han
553c027bbf AIDL: use typed Map
AIDL supports typed maps, so use it instead of untyped one.

Bug: 192615532
Test: m, TH presubmit
Change-Id: I0fedf05872cbe2025e04ca07ce6c90bc9067b331
2021-08-12 08:38:10 +00:00
Jooyung Han
fb8ebe9f44 Suppress AIDL warnings: untyped-collection
For now AIDL doesn't support Map<String,Integer>, there's no way to fix
it with typed map.

Bug: 192615532
Test: m
Change-Id: Id0011372a0997b4ab9aa700a7c4f8746bff29189
2021-08-12 17:30:32 +09:00
Ashok Mutyala
895d981852 Avoid the scenario where Contexts list filled with null value in ShowAnrDialogs()
Problem: Framework Reboot i.e., NullPointer Exception in android.ui Thread
E AndroidRuntime: FATAL EXCEPTION IN SYSTEM PROCESS: android.ui
E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method
'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference

E AndroidRuntime: **at android.app.Dialog.<init>(Dialog.java:199)
E AndroidRuntime: **at android.app.AlertDialog.<init>(AlertDialog.java:204)
E AndroidRuntime: **at android.app.AlertDialog.<init>(AlertDialog.java:200)
E AndroidRuntime: **at com.android.server.am.BaseErrorDialog.<init>(BaseErrorDialog.java:39)
E AndroidRuntime: **at com.android.server.am.AppNotRespondingDialog.<init>(AppNotRespondingDialog.java:53)
E AndroidRuntime: **at com.android.server.am.ErrorDialogController.showAnrDialogs(ErrorDialogController.java:183)
E AndroidRuntime: **at com.android.server.am.AppErrors.handleShowAnrUi(AppErrors.java:1077)

Analysis:
As Context Object is passed from showAnrDialogs method and will be retrieved from getDisplayContextWithErrorDialogs
And list of context objects will be filled by querying from RootWindowContainer.getDisplayUiContext and this method is
Annotated with Nullable. So, the possibility could be null value filled in the context object List.

Bug: 196189977
Test: Stability Test

Change-Id: Ib944fc5ffc8bcca999c75f99d462d441e555fcda
2021-08-12 04:31:18 +00:00
Nate Jiang
a4d60ac1ee Merge "Remove modules-utils-build_system from filegroup" 2021-08-12 01:56:33 +00:00
Suren Baghdasaryan
1fdacf6376 Merge "Adding native flag namespace for lmkd." 2021-08-11 22:56:11 +00:00
Suren Baghdasaryan
9a740a18df Adding native flag namespace for lmkd.
For experiment flag testing, adding lmkd flag in DeviceConfig.

Bug: 194316048
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1f13d6bbb4a9a7fd8825d7e5acde416750271df4
Merged-In: I1f13d6bbb4a9a7fd8825d7e5acde416750271df4
2021-08-11 17:41:41 +00:00
Steven Moreland
b801a513d1 Merge "ServiceManager: waitForService uses allowBlocking" 2021-08-11 17:16:42 +00:00
Steven Moreland
d247e417a2 ServiceManager: waitForService uses allowBlocking
For parity with getService and checkService.

Bug: 194806512
Test: boot
Change-Id: Iecc3f1c6d6ae9bee94252281b416d62f3bf30afd
2021-08-11 17:16:32 +00:00
John Wu
703378f39c Merge "Update DynamicSystemInstallationService manifest" 2021-08-11 17:07:06 +00:00
John Wu
2508f7b926 Update DynamicSystemInstallationService manifest
Add additional data specifications in VerificationActivity's
<intent-filter>.

Bug: 195988279
Test: atest CtsOsTestCases:DynamicSystemClientTest
Change-Id: Iabe53ed421ce23f0f7062e9b9d92c29c47cc98ab
2021-08-11 10:06:38 +00:00
Nate Jiang
452bfe1ae9 Remove modules-utils-build_system from filegroup
Remove modules-utils-build_system from static lib of service-wifi.jar,
becasue it is already in static lib of framework-wifi.jar

Bug: 195965491
Test: build module
Change-Id: Ica496e67dd8b7c83aa93a512d06ad1a05d1c9c8d
2021-08-11 00:11:49 -07:00
Treehugger Robot
cf2ef57519 Merge "Require calls to BluetoothA2dp#setBufferLengthMillis to pass a non-negative value" 2021-08-11 04:44:53 +00:00
jiayongqiang
079495ac63 Fix thread safety issues;
There are two threads can modify "mLastChanged" and "mScreenState" variables:
1. onFinishedWakingUp()/onFinishedGoingToSleep() are called from main thread in system_server;
2. setDeviceFolded() is called from android.display thread in
system_server.

Otherwise, NullPointerException might be throw when invoke method 'long java.lang.Long.longValue()'.

Test: press power key to wake up the device and fold the device at the
same time.

Change-Id: I3a0f1862548f2e567baa8a4a615906dbf87a8243
Signed-off-by: jiayongqiang <jiayongqiang@xiaomi.com>
2021-08-11 10:57:15 +08:00
Rahul Sabnis
465f489430 Require calls to BluetoothA2dp#setBufferLengthMillis to pass a
non-negative value

Tag: #feature
Bug: 194837771
Test: Manual
Merged-In: I3c1d2da1d28a494d8b393c4502521b3f0699adf6
Change-Id: I3c1d2da1d28a494d8b393c4502521b3f0699adf6
2021-08-10 13:57:57 -07:00
Treehugger Robot
5a5c3d7562 Merge "Add new API to notify CallRedirectionService timed out." 2021-08-10 18:38:14 +00:00
Grace Jia
5400101ec6 Add new API to notify CallRedirectionService timed out.
Currently, CallRedirectionService is unable to know if a call failed due
to timeout. Add new API to notify them and call it when Telecom wait too
long to complete a call redirection request.

Bug: 187346611
Test: CTS test
Change-Id: I65aa0a893b3e35a412851ec969f6cdec74af8fab
2021-08-10 15:37:27 +00:00