Commit Graph

424753 Commits

Author SHA1 Message Date
Lorenzo Colitti
fc901157dc Properly test TrafficController permissions on package updates.
The current test we have for a package changing TrafficController
permissions (i.e., INTERNET or UPDATE_DEVICE_STATS permissions)
is not realistic.

This is because the test simulates the update by removing and
adding the package. But TrafficController permissions are not
driven by broadcasts, they are driven by PackageListObserver,
and when an app is updated, PackageListObserver does not see a
remove and and add, but a single change event.

Add a new test for this.

Bug: 137864893
Test: new unit test added
Change-Id: I691b928f57c79c19dfb6ddb01983d55ef305c472
2019-09-20 11:58:43 +09:00
Treehugger Robot
e6901bc862 Merge "Add new onSmsStatusReportReceived() without message reference" 2019-09-17 22:28:35 +00:00
Steven Moreland
b0e6033182 Merge "HwBinder: don't rely on kernel headers." 2019-09-17 21:49:31 +00:00
Amit Mahajan
eeeb74a093 Merge "Fix descriptions for default SIM in global preferences" 2019-09-17 17:18:04 +00:00
Christopher Ferris
539d37679c Merge "Use bionic platform headers." 2019-09-17 16:33:25 +00:00
Taesu Lee
0399854df0 Fix descriptions for default SIM in global preferences
Test: Not required.

Change-Id: I7f32eb495b53d13aba50b07d86e63f0549e9e6bb
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-09-17 13:45:54 +09:00
Yifan Hong
bc45ac13ef Merge "VintfObject: Fix getHalNamesAndVersions doc" 2019-09-16 23:58:51 +00:00
Treehugger Robot
7529e67a80 Merge "Ignore physics animation tests that have suddenly become flaky." 2019-09-16 21:32:43 +00:00
Jordan Liu
be83f253f4 Merge "Add carrier config KEY_CALL_FORWARDING_WHEN_UNREACHABLE_SUPPORTED_BOOL" 2019-09-16 21:28:03 +00:00
Jean-Michel Trivi
4f86011710 Merge "AudioService: fix missing CEC message on unmute after vol down" 2019-09-16 21:04:08 +00:00
Joshua Tsuji
c5fab4172a Ignore physics animation tests that have suddenly become flaky.
Test: atest SystemUITests
Change-Id: Ia15f767fdb251338a7e7b15be7836b6928e48ba5
Merged-In: Ia15f767fdb251338a7e7b15be7836b6928e48ba5
(cherry picked from commit 2b991d91c6)
2019-09-16 19:55:35 +00:00
Christopher Ferris
15c0233afe Use bionic platform headers.
Bug: 130763340

Test: Builds.
Change-Id: Ieed72d4e15c0ce0dfc3a4f3383ea6563905bc236
Merged-In: Ieed72d4e15c0ce0dfc3a4f3383ea6563905bc236
(cherry picked from commit 8269f3a377)
2019-09-16 12:44:35 -07:00
Taesu Lee
61e826d576 Add new onSmsStatusReportReceived() without message reference
IMS providers must generate unique token and don't need to parse the PDU
to get the message reference for new onSmsStatusReportReceived() API.
The platform will extract the message reference from the PDU and return
it to the IMS providers via acknowledgeSmsReport(). And @Deprecated tag
is added on existing onSmsStatusReportReceived() API.
This CL includes some fixing doc bug and description for APIs also.

Test: atest FrameworksTelephonyTests:ImsSmsDispatcherTest

Change-Id: Ib788e291f2e70c3e062319e17e2c9efe33f31164
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-09-16 16:42:19 +09:00
Andy Hung
763cb4638a Merge "SoundPool: Do not sleep on stop for USAGE_GAME or on BUFFER_END" 2019-09-13 21:18:56 +00:00
Shuo Qian
7674b345a9 Merge "Listeners of active emergency numbers" 2019-09-13 19:50:16 +00:00
Treehugger Robot
eb97eab212 Merge "WindowOrientationListener: Check if proposed rotation is in range" 2019-09-13 18:57:50 +00:00
Jean-Michel Trivi
91f9b5cc6f AudioService: fix missing CEC message on unmute after vol down
Group in one method sending volume / mute updates to HDMI CEC
when applicable. Use this method, maybeSendSystemAudioStatusCommand,
to avoid code duplication.
  Add missing synchronization in onUnmuteStream for stream mute check.
  When STREAM_MUSIC is unmuted, also call
maybeSendSystemAudioStatusCommand for a mute adjust, to ensure
other CEC devices' UI is in sync with the internal state.

Bug: 136977965
Test: with ATV device in system audio mode, mute with remote, then \
  press vol down on TV remote, verify TV display matches ATV UI    \
  with current volume.

Change-Id: I279a97871ba98e67f282bf148969ba41ed3f6062
2019-09-13 10:54:48 -07:00
Andy Hung
f1588f2694 SoundPool: Do not sleep on stop for USAGE_GAME or on BUFFER_END
Test: SoundPoolApplication, SoundPoolOggTest, Games
Bug: 139787914
Bug: 139788416
Bug: 140579743
Bug: 140779732
Merged-In: I83b9b1d61b65dcc4a73d676e1f8be1e022c70302
Change-Id: I83b9b1d61b65dcc4a73d676e1f8be1e022c70302
(cherry picked from commit a527524356)
2019-09-13 10:30:02 -07:00
Treehugger Robot
4017f8be2f Merge "Fix QuotaController constants." 2019-09-13 17:14:40 +00:00
Tao Bao
7e3b406f26 Merge "Add nullability anotations" 2019-09-13 17:04:12 +00:00
Treehugger Robot
4efb0c510d Merge "Honor HDMI_CONTROL_ENABLED setting in AudioService" 2019-09-13 16:58:19 +00:00
Tobias Thierer
414d53442e Merge "Check FIPS_mode() rather than explicitly calling BORINGSSL_self_test." 2019-09-13 16:56:06 +00:00
Shuo Qian
e6f0e85516 Listeners of active emergency numbers
1) Introduce a new signature-level system permission allowing system apps to listen the
 active emergency number, placed by calls or texts.

2) Add PhoneStateListener API surface to provide a mechanism to listen the
outgoing call emergency number or outgoing sms emergency number.

Bug: 135204580
Test: atest
Change-Id: I6e6bce6d4b97d492ca20302002911f9daa20767e
Merged-In: I6e6bce6d4b97d492ca20302002911f9daa20767e
(cherry picked from commit 7a1eb6d56b)
2019-09-13 03:16:17 +00:00
Kweku Adams
24cbc741d5 Fix QuotaController constants.
1. QuotaController wasn't using the updated constants on system start.
It would only use the updated constants if they were changed after
system start.
2. Updating ACTIVE limits to more workable numbers.

Bug: 137166468
Test: atest com.android.server.job.controllers.QuotaControllerTest
Change-Id: I3e2848446b20f7258fac2d96566c96aea5715949
2019-09-12 18:43:45 -07:00
Madhava Srinivasan
154e0193ce Honor HDMI_CONTROL_ENABLED setting in AudioService
This change updates how AudioService is updated of changes to Hdmi Cec
status (enable/disable) and availablity.

Bug: 138956107
Bug: 138373017
Test: Android TV STB: make; flashall;Volume -/+; HDMI control enable/disable.
Change-Id: Iaf83a45206be076858e13d113ba772ed5c59ef60
Merged-In: Iaf83a45206be076858e13d113ba772ed5c59ef60
2019-09-12 22:14:59 +00:00
Mathieu Chartier
cbc3d5d0ea Merge "Remove android.permission.PermissionManager from blacklist" 2019-09-12 18:20:14 +00:00
Mathieu Chartier
942300fa20 Remove android.permission.PermissionManager from blacklist
This is getting pulled in from somewhere, removing to fix
PreloadCheck test.

Bug: 140912480
Test: atest PreloadCheck
Change-Id: I8eea07930732865cc72fea0e352a1704d1c26118
2019-09-12 17:06:31 +00:00
Kyeongkab.Nam
77f1aac15d Add nullability anotations
Add missing nullability for applyPayload.

Test: manual
Change-Id: Iafce9091767bd7a31937b0be329ede6639239d73
2019-09-12 11:33:39 +09:00
Christian Wailes
d9bce3cfff Merge "Revert "Revert "Remove a misleading "flush" function.""" 2019-09-11 18:23:50 +00:00
Yifan Hong
0cdba3256c VintfObject: Fix getHalNamesAndVersions doc
Test: CTS device info collect
Bug: 140832836
Change-Id: Iddc3c36d15370baa661e485b76c490a5d2b7815c
2019-09-11 11:07:43 -07:00
Colin Cross
2e928fb62a Merge changes from topic "protobuf-3.9.1"
* changes:
  Convert statsd_test and statsd_benchmark to proto lite
  Adapt to google::protobuf::uint64 type change
2019-09-11 18:00:16 +00:00
Neil Fuller
28b12c347c Merge "Track changes to CountryTimeZones API" 2019-09-11 10:58:38 +00:00
Treehugger Robot
3a49014ca0 Merge "Add uhid group to system_server" 2019-09-11 09:31:23 +00:00
Sama Lin
48dce552f0 Merge "Swisscom VVM free SMS shortcodes CH" 2019-09-11 07:06:26 +00:00
Treehugger Robot
32f968b767 Merge "Remove libhwbinder/libhidltransport deps" 2019-09-10 23:36:54 +00:00
Treehugger Robot
080cdb24d5 Merge "FocusRequester: refactor handleFocusLoss" 2019-09-10 20:49:49 +00:00
Jean-Michel Trivi
3ecc7eeaa1 FocusRequester: refactor handleFocusLoss
Break out the checks to see if a focus loss is handled by the
framework in a separate method, and reorder the if statements
for code clarity.

Annotate PlayerFocusEnforcer methods for nullability, add
javadoc

Test: atest AudioFocusTest
Change-Id: I9aaab804c78a2e2627ddbd7b9bd41fdec47d2b57
Merged-In: I9aaab804c78a2e2627ddbd7b9bd41fdec47d2b57
2019-09-10 12:56:02 -07:00
Treehugger Robot
b5cc2bfea0 Merge "Re-enable testAppZygoteServices in pre-submit." 2019-09-10 18:48:31 +00:00
Treehugger Robot
980681e525 Merge "Reconcile Zygote process name code with Q release." 2019-09-10 18:48:31 +00:00
Treehugger Robot
003eee49d4 Merge changes If2b3b414,I1039748d,Ib3cd38f5
* changes:
  AudioService: fix disconnect/connect of A2DP device
  audioservice: re send BT_SCO parameter to HAL when audioserver restarts
  audioservice: fix hasMediaDynamicPolicy() for loopback and render policies
2019-09-10 17:39:16 +00:00
Treehugger Robot
70532e5231 Merge "Refactor SoundEffectsHelper for asynchronous loading" 2019-09-10 17:35:25 +00:00
Treehugger Robot
728c58725e Merge "AudioService: factor out sound effects handling" 2019-09-10 17:29:46 +00:00
Jean-Michel Trivi
e8b184be30 Merge "Use sendVolumeKeyEvent API instead of sendKeyEvent API" 2019-09-10 16:43:00 +00:00
Christian Wailes
79a1b3a333 Merge "Don't clear the output array if it failed to open the proc status file" 2019-09-10 16:40:18 +00:00
Jean-Michel Trivi
b3580a89da AudioService: fix disconnect/connect of A2DP device
Due to the expected BECOMING_NOISY behavior associated
with a device disconnection, the disconnection is handled
asynchronously after a fixed delay. This delay caused an
inversion of commands in the processing order of the
disconnection of a device closely followed by connection
of the same device.
 The fix consists in:
- overriding the equals() operator for BtDeviceConnectionInfo
 so messages for a given device in the message queue
 can be checked / removed.
- when AudioDeviceBroker receives a command for A2DP
 connection or disconnection, remove all upcoming connection
 and disconnection commands in the queue for this device
 (see postBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent)
- remove AudioDeviceBroker.handleSetA2dpSinkConnectionState, which
 was only used in BtHelper.onA2dpProfileConnected() with
 a CONNECTED state, and have this method perform a regular device
 connection (just like when coming from AM->AS).
- in AudioDeviceInventory.onSetA2dpSinkConnectionState(), support
 receiving a connection event for an already connected device,
 to support codec changes.

This change also includes modifications to the classes involved
in the device connection to make them support mocking/spying
to reproduce the bug conditions (see AudioDeviceBrokerTest).

Bug: 134932649
Test: atest AudioDeviceBrokerTest
Change-Id: If2b3b41409c77467a181a2f9b42310db9b9de8c5
Merged-In: If2b3b41409c77467a181a2f9b42310db9b9de8c5
2019-09-10 15:47:17 +00:00
Eric Laurent
0ea0da634e audioservice: re send BT_SCO parameter to HAL when audioserver restarts
Fix omission in AudioDeviceBroker.onAudioServerDied() where parameter
"BT_SCO=on|off" must be send to HAL according to current forced usage
for communication.

Bug: 135512789
Test: killaudio server during call over BT SCO
Change-Id: I1039748db5591321869f70c3dc589fbc62d41c31
Merged-In: I1039748db5591321869f70c3dc589fbc62d41c31
2019-09-10 15:46:57 +00:00
Eric Laurent
159b427652 audioservice: fix hasMediaDynamicPolicy() for loopback and render policies
Exclude mixes with LOOPBACK + RENDER flags when looking for dynamic
policies matching media usage. As this is only used in the context
of sending becoming noisy intent we want to send the intent when playback
capture is active.

Bug: 137055231
Test: enable live caption and disconnect headset while music is playing
Change-Id: Ib3cd38f58c2ff78a2f2f13c5c22b637f9701e345
Merged-In: Ib3cd38f58c2ff78a2f2f13c5c22b637f9701e345
2019-09-10 15:46:42 +00:00
Mikhail Naganov
7324049f9a Refactor SoundEffectsHelper for asynchronous loading
Use a dedicated thread for all SoundPool and MediaPlayer
operations. This ensures that the client (AudioService) doesn't
get blocked or delayed. This also removes the need to use
locking as all access to data happens on the same thread.

Simplify the implementation of the mapping between UI effect IDs
and SoundPool sample IDs.

Add event logging for sound effects loading.

Bug: 135763139
Test: normal scenario
      media volume responsiveness with stuck SoundPool
      behavior when declared sound assets are missing
Change-Id: Ie5a1684a2cabe05ff53270ad97cab161a87a59f9
Merged-In: Ie5a1684a2cabe05ff53270ad97cab161a87a59f9
2019-09-10 15:46:25 +00:00
Mikhail Naganov
96b3acd780 AudioService: factor out sound effects handling
Move the code related to sound effects loading and playback
into a separate class SoundEffectsHelper.

Bug: 135763139
Test: make and run phone
Change-Id: I30a7d897d740b02943c68924074f14fae3c3eff8
Merged-In: I30a7d897d740b02943c68924074f14fae3c3eff8
2019-09-10 15:46:12 +00:00
Amy
dcf1a84842 Use sendVolumeKeyEvent API instead of sendKeyEvent API
sendKeyEvent API always forwards the key control to the TV.
But for volume keys, we want it to be forwarded to the audio system if
system audio mode is on and if we are not a audio system itself.
sendVolumeKeyEvent can handle this logic.

Test: manual
Bug: 129116245
Change-Id: I6b81072ab49c092fac65cd542c19e611fc939cea
Merged-In: I6b81072ab49c092fac65cd542c19e611fc939cea
(cherry picked from commit ada40f59b63fe613448278a7cfbb7055146f8ccd)
2019-09-10 15:45:33 +00:00