616418 Commits

Author SHA1 Message Date
Les Lee
b241613297 Merge changes from topic "bridged_AP_callback"
* changes:
  wifi: Add callback onConnectedClientsOrInfoChanged handling
  wifi: Add new callback to support use case in bridged mode
2020-12-23 13:53:17 +00:00
Nikita Ioffe
cf749b9154 [automerger skipped] Merge "Fix ApexManager#snapshotCeData (3/n)" am: 3a9796a8c6 am: 299da8f790 am: 85de24f37f -s ours
am skip reason: Change-Id I10ed0e3adef88a27ee239c183d99a836b623d0d1 with SHA-1 6d8e4e5a40 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535142

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I70dbc6cca301cd27a913e021a6ffa9ad017bf858
2020-12-23 13:49:10 +00:00
Adam Wright
68e25d8da0 Merge "Revert "Prefetching can be interupted by other service requests."" 2020-12-23 13:48:53 +00:00
Andrei-Valentin Onea
92c74acd69 Merge "Don't cap the targetSDK for change id's in UI" am: 816f4ed50f am: 073b8d2381 am: 7d7459bf24
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534427

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I41f9bf9bc24c1e7fb5e3fd603208987db6a3c09a
2020-12-23 13:48:19 +00:00
Eric Laurent
ba231a6546 [automerger skipped] Merge changes from topic "comm_routing" am: 8553f77dce am: 10c6362030 am: b4d0c3785e -s ours
am skip reason: Change-Id I665257fc5903b663096104b0424781d9799635a5 with SHA-1 c78b49af77 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534433

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic639ff1dca32f5e2c6b3da2b0f871c1a61f7c0fc
2020-12-23 13:47:42 +00:00
Eric Laurent
40a96a618b [automerger skipped] AudioManager: Add communication device management APIs am: f39726f262 am: 890a5d474c am: cb629524ec -s ours
am skip reason: Change-Id I8028d842e4a8ca1abe0f87d03e3c5d57c46b9362 with SHA-1 b36d4a13a0 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534432

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I88cfaae92a70d4f09a0baa2b6391e5d042d501a7
2020-12-23 13:47:18 +00:00
Eric Laurent
255d74cc1b [automerger skipped] AudioService: refactor communication route control am: ec51aa8207 am: ad87098233 am: b1733f14be -s ours
am skip reason: Change-Id If9d2f24b9def78ccd791294ed42d95ce30f0ba8b with SHA-1 dadbceed72 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534431

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1e5b91414b3c6bf8e78a6889c1662b1a9c451005
2020-12-23 13:47:02 +00:00
Nikita Ioffe
85de24f37f Merge "Fix ApexManager#snapshotCeData (3/n)" am: 3a9796a8c6 am: 299da8f790
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535142

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If8eafd6289ef9aede446b3b7c16dd30b29fd25d9
2020-12-23 13:39:48 +00:00
Andrei-Valentin Onea
7d7459bf24 Merge "Don't cap the targetSDK for change id's in UI" am: 816f4ed50f am: 073b8d2381
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534427

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94e081e31050fdb2b66cd3a510d68dcaf70da5fe
2020-12-23 13:39:19 +00:00
Nikita Ioffe
299da8f790 Merge "Fix ApexManager#snapshotCeData (3/n)" am: 3a9796a8c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535142

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I223d5e23410130f3c8b4c056e097670685dde9c8
2020-12-23 13:34:20 +00:00
Eric Laurent
b4d0c3785e Merge changes from topic "comm_routing" am: 8553f77dce am: 10c6362030
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534433

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib8c5ace4fd7636db42e14523557604fb5d80542a
2020-12-23 13:31:28 +00:00
Andrei-Valentin Onea
073b8d2381 Merge "Don't cap the targetSDK for change id's in UI" am: 816f4ed50f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534427

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I797c4b3ab274b360a6686109539e8e13767676f4
2020-12-23 13:31:26 +00:00
Eric Laurent
cb629524ec AudioManager: Add communication device management APIs am: f39726f262 am: 890a5d474c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534432

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I525bc7d9040f15eb3c60c47ed10629f7d433b660
2020-12-23 13:31:25 +00:00
Eric Laurent
b1733f14be AudioService: refactor communication route control am: ec51aa8207 am: ad87098233
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534431

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id01d7af0da83c4acc44303cb77e1858914a25687
2020-12-23 13:31:15 +00:00
Nikita Ioffe
3a9796a8c6 Merge "Fix ApexManager#snapshotCeData (3/n)" 2020-12-23 13:08:35 +00:00
Andrei-Valentin Onea
816f4ed50f Merge "Don't cap the targetSDK for change id's in UI" 2020-12-23 13:08:18 +00:00
Eric Laurent
10c6362030 Merge changes from topic "comm_routing" am: 8553f77dce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534433

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35def97c4eda8d484e42addde6b43377d748f578
2020-12-23 12:58:54 +00:00
Eric Laurent
890a5d474c AudioManager: Add communication device management APIs am: f39726f262
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534432

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6df2d1f67e71f5550edf7c0c490c7d50782f339d
2020-12-23 12:56:52 +00:00
Eric Laurent
ad87098233 AudioService: refactor communication route control am: ec51aa8207
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534431

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3749a0d5ace4abccefdf156159a320f774a3abb2
2020-12-23 12:53:21 +00:00
Eric Laurent
8553f77dce Merge changes from topic "comm_routing"
* changes:
  Audio: use preferred device for strategy for communication route
  AudioManager: Add communication device management APIs
  AudioService: refactor communication route control
2020-12-23 12:34:10 +00:00
TreeHugger Robot
f5e1a0b84e Merge "Get bluetooth A2DP status directly from BT" 2020-12-23 12:20:34 +00:00
Eric Laurent
148e8f410e [automerger skipped] Merge "Support set/clear/get preferred device for capture preset." am: 617d14954d am: db95172696 am: 54e6b9c79b -s ours
am skip reason: Change-Id Ib7aa142ad4c56a8138c7b440e8efbbf7a7ee38a6 with SHA-1 b55305f011 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534430

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibee383bc6444001235ce28b8932ec423b3fc47d0
2020-12-23 10:40:53 +00:00
Eric Laurent
54e6b9c79b Merge "Support set/clear/get preferred device for capture preset." am: 617d14954d am: db95172696
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534430

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic7ff104b7e0aab924ff51950b41ce63ec3a742f3
2020-12-23 09:44:49 +00:00
Eric Laurent
db95172696 Merge "Support set/clear/get preferred device for capture preset." am: 617d14954d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534430

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie13b9835abef801bbf845a2b3748cfe76ac4c346
2020-12-23 09:19:31 +00:00
Sungsoo Lim
15eb7da794 Get bluetooth A2DP status directly from BT
MediaRourter uses main thread for internal operations, and ANR could
happens if AudioService is not running when MediaRouter tried to get
BT A2DP status. This CL avoids such ANR by getting the info using
BroadcastReceiver insteead of AudioService.

Bug: 170327593
Test: manually
Change-Id: If9eba19481fceb0c86ff0117e8a604b64d7ebc49
2020-12-23 18:19:30 +09:00
Eric Laurent
d88b1e45b6 Audio: use preferred device for strategy for communication route
Replaced use of forced usage for communication by set preferred device
for strategy to control communication route in audio policy manager.

Also do not use forced usage for record which was redundant with forced
usage for communication.

Bug: 161358428
Test: audio smoke tests

Change-Id: I665257fc5903b663096104b0424781d9799635a5
Merged-In: I665257fc5903b663096104b0424781d9799635a5
2020-12-23 08:36:39 +00:00
Eric Laurent
f39726f262 AudioManager: Add communication device management APIs
Add new APIs to manage the audio device used for communication
use cases (Cellular calls, VoIP and Video calls).
These APIs are meant to replace specific APIs like setSpeakerPhoneOn()
and provide a single generic way of configuring the audio device selected
for calls.
They will be used for newly added device types (e.g. BLE audio) instead
of adding new specific APIs.
They will also offer more options like for instance allowing to select the
earpiece (handset) device when a wired headset is connected.
The new APIs are:
 - boolean setDeviceForCommunication(AudioDeviceInfo)
 - void clearDeviceForCommunication()
 - AudioDeviceInfo getDeviceForCommunication()

A listener is also added for applications to monitor current communication
device selection:
- OnCommunicationDeviceChangedListener
As well as listener registration and unregistration APIs:
- addOnCommunicationDeviceChangedListener()
- removeOnCommunicationDeviceChangedListener()

Bug: 161358428
Test: make && atest AudioCommunicationDeviceTest
Change-Id: I8028d842e4a8ca1abe0f87d03e3c5d57c46b9362
Merged-In: I8028d842e4a8ca1abe0f87d03e3c5d57c46b9362
2020-12-23 08:36:12 +00:00
Eric Laurent
ec51aa8207 AudioService: refactor communication route control
Audio routing for communication use cases (cell, video and VoIP calls)
is controlled by separate APIs: setSpeakerPhoneOn(), startBluetoothSco()
and stopBluetoothSco().
Requests for speakerphone and bluetooth are managed by separate client
stacks although in the end they control a single routing state in audio
policy manager, which creates problems in case of conflicting requests
and race conditions.
This CL refactors the implementation by regrouping the Bluetooth Sco and
Speaker client stacks into a single one. This makes sure that no
conflicting routing request exist for a given client.
It also makes handling of race conditions and prioritization between
clients easier.
Finally, it prepares the introduction of a new API that will be the
single entry point for communication route control.

Also in this CL:
- Option to enable more debug log for communication route
- Fixes in BtHelper.receiveBtEvent()
  1) Fix intent broadcast missing in case of transition from external
  activation to internal activation.
  2) Do not clear SCO requests when SCO audio is disconnected: this can
  happen because current active communication route request is different
  from SCO but pending requests must stay in the stack.
  3) Do not clear SCO requests when the audio mode owner changes. Any Active
  communication route requested by new audio mode owner will be honored
  and pending requests will be restored when mode owner changes again.

Test: regression tests with cell and VoIP calls

Change-Id: If9d2f24b9def78ccd791294ed42d95ce30f0ba8b
Merged-In: If9d2f24b9def78ccd791294ed42d95ce30f0ba8b
2020-12-23 08:35:58 +00:00
Eric Laurent
617d14954d Merge "Support set/clear/get preferred device for capture preset." 2020-12-23 08:34:27 +00:00
Riddle Hsu
e295da00ac Merge "Decouple display area from windowing layer" 2020-12-23 07:33:12 +00:00
Chiachang Wang
a6434df347 Merge "[IT4.1] Clean up to remove no-op logic" am: af0c29529d am: 57957ec100 am: a53b25ad26
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529103

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id5f5ea15335e2fffc62b474a1f5d63f4c9170dc3
2020-12-23 07:31:53 +00:00
Chiachang Wang
0930c03c9e Merge "[IT04] Add uid as parameter of interfaceClassDataActivityChanged" am: baef452e38 am: 04aa5eac85 am: a817ecd4b5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1523339

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieafdf569c13b1421c18fa3086827e6e432b498d7
2020-12-23 07:31:25 +00:00
Chiachang Wang
b06e8235db Merge "[IT02] Expose system api to report radio power state" am: b1de9a09bd am: 15cc8f0f71 am: df9fc2853d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517498

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I04944dae4059c790f3f1015068401057d0d81b79
2020-12-23 07:30:43 +00:00
Chiachang Wang
a53b25ad26 Merge "[IT4.1] Clean up to remove no-op logic" am: af0c29529d am: 57957ec100
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529103

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icfccefc4c1076c9eb058db7eb713aa5323d734c7
2020-12-23 06:49:33 +00:00
Chiachang Wang
a817ecd4b5 Merge "[IT04] Add uid as parameter of interfaceClassDataActivityChanged" am: baef452e38 am: 04aa5eac85
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1523339

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3dea98c80dd4d6f29739b26cf120957c58364445
2020-12-23 06:49:23 +00:00
Chiachang Wang
df9fc2853d Merge "[IT02] Expose system api to report radio power state" am: b1de9a09bd am: 15cc8f0f71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517498

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I379193edf34a6371e9e2febe372fa238420a0caa
2020-12-23 06:48:53 +00:00
Ruslan Tkhakokhov
31f583eed9 Merge "Temporarily disable the new adb backup behavior" 2020-12-23 06:34:06 +00:00
Jing Ji
8bd0c78701 Merge "Lock the CoreSettings in ActivityThread separately" 2020-12-23 06:30:36 +00:00
Chiachang Wang
57957ec100 Merge "[IT4.1] Clean up to remove no-op logic" am: af0c29529d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529103

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icd472961055fbfc3d40b8982c4ae1118d58351e7
2020-12-23 06:30:23 +00:00
Chiachang Wang
04aa5eac85 Merge "[IT04] Add uid as parameter of interfaceClassDataActivityChanged" am: baef452e38
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1523339

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9a70b967bf424f8bf4012602c0fac49478d024bb
2020-12-23 06:26:00 +00:00
Riddle Hsu
c2d1211c92 Merge "Use rotated bounds as source touchable region for rotated app" 2020-12-23 06:23:49 +00:00
Chiachang Wang
15cc8f0f71 Merge "[IT02] Expose system api to report radio power state" am: b1de9a09bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517498

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib3beaecefec510f9a1d8cb053117e73efb8c2347
2020-12-23 06:16:24 +00:00
Jimmy Chen
7ff19c531f Merge changes from topics "s-security-params-backup-restore", "s-seucrity-params-setup-migration"
* changes:
  wifi: add setSecurityParams APIs for wifi service migration
  wifi: add getSecurityType and createSecurityParamsBySecurityType methods
2020-12-23 05:24:38 +00:00
Chiachang Wang
af0c29529d Merge "[IT4.1] Clean up to remove no-op logic" 2020-12-23 05:20:54 +00:00
Chiachang Wang
baef452e38 Merge "[IT04] Add uid as parameter of interfaceClassDataActivityChanged" 2020-12-23 05:20:33 +00:00
Chiachang Wang
b1de9a09bd Merge "[IT02] Expose system api to report radio power state" 2020-12-23 05:19:51 +00:00
Remi NGUYEN VAN
11cb8f8634 Merge "Fix testDeclareNetworkRequestUnfulfillable on R" am: 4d90f237f2 am: ed548e8e02 am: 05d5c8bbec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519790

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3bc46833ea281b13ab4013a65e5e6f24e9d76ff9
2020-12-23 05:10:25 +00:00
Remi NGUYEN VAN
05d5c8bbec Merge "Fix testDeclareNetworkRequestUnfulfillable on R" am: 4d90f237f2 am: ed548e8e02
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519790

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I78e997f44d00ee99ca4212bd9b1b72d12dfc8e4f
2020-12-23 04:56:01 +00:00
lesl
e5436af58c wifi: Add callback onConnectedClientsOrInfoChanged handling
Now service will only send onConnectedClientsOrInfoChanged to Manager
side. Add callback handling to dispatch correct callback base on below
scenarios.

1. onInfoChanged(SoftApInfo) will send when a. registration (non bridged) b. non
bridged and info changed
2. onInfoChanged(List) will send when a. registration b. info changed
3. onConnectedClientsChanged(List<WifiClient>) will send  a. registration b. clients changed
4. onConnectedClientsChanged(SoftApInfo, List<WifiClient>) will send
a. when registration and client connected b. client changed on specific
instance. It will also need to handle when info changed(dismisssed), it
means that an instance shutdown. It needs to send empty list if previous
instance has client connected.

AP+AP Part 6 includes:
Support dual SoftApInfo callback
   a. New callback onInfoChanged(List<SoftApInfo>) &
      onConnectedClientsChanged(SoftApInfo, List<WifiClient>)
   b. Callback refactoring
   c. Support shutdown idle instance in bridged mode

Bug: 162686273
Bug: 175351193
Test: FrameworksWifiApiTests
Test: Manual Test, check the log and check SystemUI to confirm clients
update correctly.

Change-Id: Id587125edbb1167f58bba6b50a708be12888490f
2020-12-23 12:42:19 +08:00
TreeHugger Robot
a52a79f7dd Merge "Make IInputMethodManager to oneway (7/N)" 2020-12-23 04:40:21 +00:00