445151 Commits

Author SHA1 Message Date
Orion Hodson
c0fe0ae29f Merge "Add explicit dependencies on jni_headers" 2020-04-16 10:29:06 +00:00
Orion Hodson
63f06b738d Add explicit dependencies on jni_headers
Preparation for removing implicit include paths for jni.h from soong.

Also remove unnecessary jni.h includes from PathParser.{h,cpp}.

Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
2020-04-16 08:26:14 +00:00
Paul Hu
0ca532a78c Merge "[TNU05.1] Address aosp/1237036 leftover comments" 2020-04-16 08:25:24 +00:00
paulhu
dc5c86ddd9 [TNU05.1] Address aosp/1237036 leftover comments
Bug: 147818698
Test: atest TetheringTests
Change-Id: Ife738339aeae00d2063fea6918b50204daef24fc
2020-04-16 14:39:12 +08:00
Paul Hu
8e8224c97b Merge "Add TetheringCoverageTests" 2020-04-16 06:00:07 +00:00
Treehugger Robot
ad70ff1e44 Merge "Allow non-system server code to AppOpsManager.checkOp and NoteOp" 2020-04-16 04:33:28 +00:00
Mark Chien
c826614862 Merge "Remove sendMessage inside EntitlementManager" 2020-04-16 02:07:55 +00:00
Paul Hu
cef08983cf Merge "[TNU05] Add no upstream notification" 2020-04-16 01:31:06 +00:00
Philip P. Moltmann
128b9106ad Allow non-system server code to AppOpsManager.checkOp and NoteOp
1. Allow checkOp from any caller, not only callers with
  android.permission.UPDATE_APP_OPS_STATS. This is ok as checkOp does not
  update any stats
2. Clear the binder identity when calling noteOp so that it is checked
  if the service can perform the operation, not the caller.

Test: Verified that RecognitionService can be used by third party apps
Bug: 152436092
Merged-In: Ie6fe90b5737a1cd24e45446ea91560940b41c8fc
Change-Id: Icfd46548b1c23b499b712ad795eab0c417b8586f
2020-04-15 23:44:41 +00:00
Sarah Chin
08447f260e Merge "Update Bands API" 2020-04-15 21:08:14 +00:00
markchien
f4b6ca7ac9 Remove sendMessage inside EntitlementManager
EntitlementManager and its callers(Tethering and UpstreamNetworkMonitor)
run in the same threads.

Bug: 141256482
Test: atest TetheringTests
Change-Id: I0a376d28b123eaab2e8d00a98a4719ce983d3bb2
2020-04-15 02:29:21 +00:00
Mark Chien
197e35198d Merge "Do not stop IpServer when recieve wifi ap disabling state." 2020-04-15 01:38:11 +00:00
Sarah Chin
3ff26a3bed Update Bands API
Test: build
Bug: 151842542
Change-Id: Ib033758d469b9b485eb7cce6c026b5a649e6a6fa
Merged-In: Ib033758d469b9b485eb7cce6c026b5a649e6a6fa
2020-04-14 18:07:55 -07:00
paulhu
1b404e56ae Add TetheringCoverageTests
Bug: 148636687
Test: atest TetheringCoverageTests
      atest TetheringTests
      atest TetheringIntegrationTests
      atest NetworkStackTests
      atest CtsTetheringTest
Change-Id: I1f2a50f16894b05e988476520ba25baba0b60d88
Merged-In: I1f2a50f16894b05e988476520ba25baba0b60d88
2020-04-15 00:50:01 +00:00
Eric Laurent
688857ea3b Merge "AudioManager: Add functional tests for productstrategy/volumegroup" 2020-04-15 00:22:44 +00:00
Amit Mahajan
c0f6f60d8e Merge changes If4e8e87c,Ie8e48422,Iab4974f9
* changes:
  Exposing TelephonyManager.isIccLockEnabled as a system API.
  Un-expose LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH for R.
  Un-expose ACTION_SERVICE_PROVIDERS_UPDATED.
2020-04-15 00:08:01 +00:00
Treehugger Robot
f892c9a6a5 Merge "Add unit test for ClosedSubscriberGroupInfo" 2020-04-14 23:13:47 +00:00
Amit Mahajan
f360f2cf05 Exposing TelephonyManager.isIccLockEnabled as a system API.
This was recently removed as part of un-exposing telephony
mainline related APIs (b/146983487), but being added back in R as GMSCore
already uses it (b/151742706).

Test: TH
Bug: 151742706
Bug: 146983487
Merged-in: If4e8e87c7dfbb261ee3abfec2a4774980c24d0c2
Change-Id: If4e8e87c7dfbb261ee3abfec2a4774980c24d0c2
(cherry picked from commit 1c6679a3adf72fa4e2d3b8152ea3641f05b86d3e)
2020-04-14 14:41:56 -07:00
Amit Mahajan
c8c1919abe Un-expose LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH for R.
Test: TH
Bug: 147322848
Merged-in: Ie8e4842264eb47e09397c9e56355d00c732c86c1
Change-Id: Ie8e4842264eb47e09397c9e56355d00c732c86c1
(cherry picked from commit aed5beae536c914dc7e872efd3cbd15791cd4340)
2020-04-14 14:34:40 -07:00
Amit Mahajan
6b2eddec32 Un-expose ACTION_SERVICE_PROVIDERS_UPDATED.
Will be exposed/reworked on in S.

Test: basic sanity
Bug: 147921202
Merged-in: Iab4974f9cd7cecde1ef6eba35c320101a288b481
Change-Id: Iab4974f9cd7cecde1ef6eba35c320101a288b481
(cherry picked from commit 13a8d14fcd4e1ea9b248d186652bc379ce8fde88)
2020-04-14 14:28:01 -07:00
Sarah Chin
06a2db194f Merge changes from topic "msisdn"
* changes:
  Update READ_PHONE_NUMBER security checks
  Move getMsisdn and getLine1Number to READ_PHONE_NUMBERS
2020-04-14 20:02:40 +00:00
Francois Gaffie
ea96cf2e49 AudioManager: Add functional tests for productstrategy/volumegroup
Test: adb shell am instrument -w -e class com.android.audiopolicytest.AudioManagerTest com.android.audiopolicytest
adb shell am instrument -w -e class com.android.audiopolicytest.AudioProductStrategyTest com.android.audiopolicytest
adb shell am instrument -w -e class com.android.audiopolicytest.AudioVolumeGroupTest com.android.audiopolicytest
adb shell am instrument -w -e class com.android.audiopolicytest.AudioVolumeGroupChangeHandlerTest com.android.audiopolicytest

Bug: 136121584

Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: Ia7e92ff37ff9c5e51bc2b5fe54b15c6338868b23
Merged-In: Ia7e92ff37ff9c5e51bc2b5fe54b15c6338868b23
2020-04-14 19:51:27 +00:00
Sarah Chin
4f8716bb8d Update READ_PHONE_NUMBER security checks
For SDK R+, READ_PRIVILEGE_PHONE_STATE and carrier privilege should
allow access.

Test: atest TelephonyPermissionsTest
Bug: 151952050
Change-Id: Ie97d0b195937d4729875afd1e74357c1284e101f
Merged-In: Ie97d0b195937d4729875afd1e74357c1284e101f
2020-04-14 11:42:19 -07:00
Robert Greenwalt
1ace38473c Move getMsisdn and getLine1Number to READ_PHONE_NUMBERS
This is done to get dangerous stuff off the READ_PHONE_STATE permission.
Also keeping READ_PHONE_STATE for apps targeting old SDK versions.
Refactored getPhoneNumber to allow READ_PHONE_STATE pre-R

Bug: 136160623
Test: atest SubInfoControllerTest, TelephonyPermissionsTest
Change-Id: I5c0adcbe432ffcbb22ac8959792ee60da7039f15
Merged-In: I5c0adcbe432ffcbb22ac8959792ee60da7039f15
2020-04-14 11:41:53 -07:00
paulhu
481512a6b0 [TNU05] Add no upstream notification
Reminder user of unavailable tethering status if there is no
internet access.

Bug: 147818698
Test: atest TetheringTests
Change-Id: Ic6557f9f7703337596100cd6a477fd7239217166
2020-04-15 01:25:37 +08:00
Treehugger Robot
8d7c075bee Merge "Rename conscrypt-module-public-api-stubs-source" 2020-04-14 11:45:54 +00:00
markchien
714e647af3 Do not stop IpServer when recieve wifi ap disabling state.
This is used to fix the race when quickly OFF/ON wifi tethering.
When IpServer is started/stopped, there is callback update tethering
interface status. Before this change, IpServer is stopped when wifi
ap is disabling. Then the next startTethering may fail in wifi because
wifi is in disabling state.
Error pattern: WifiService: Tethering is already active.
No unitest for this CL but it fixed the CtsTetheringTest flakty rate
than around 30% to 0 for more than 100 runs.

Bug: 153925821
Test: atest CtsTetheringTest --iteration 100
Change-Id: I8b65f621abe20799a3a0d410ba1f06368746ee49
2020-04-14 10:42:32 +00:00
Lorenzo Colitti
17917f7bb0 Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." 2020-04-14 08:22:30 +00:00
Paul Hu
2d377066e6 Merge "Update tethering notification strings" 2020-04-14 07:15:16 +00:00
Lorenzo Colitti
210ac1e145 Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED.
These events don't have MAC addresses, so the code attempts to
create an Ipv6ForwardingRule with a null MAC address. This
crashes when attempting to get the raw MAC address bytes to send
to netd in the TetherOffloadRuleParcel.

This was not caught by unit tests because the test exercise this
code path in a way that is not correct (by sending RTM_DELNEIGH
and NUD_FAILED events with MAC addresses). Fix the unit tests to
properly pass in null MAC addresses for these events.

Bug: 153697068
Test: fixed existing tests to be more realistic
Change-Id: I26d89a81f1c448d9b4809652b079a5f5eace3924
2020-04-14 15:02:17 +09:00
Mark Chien
c31e88ace6 Merge "Change tethering file structure to respect its package name" 2020-04-14 04:29:01 +00:00
Calvin Pan
f2da40ad07 Merge changes from topic "DEFAULT_PREFERRED_NETWORK_MODE"
* changes:
  Make DEFAULT_PREFERRED_NETWORK_MODE @hide for now
  Add new system API constant DEFAULT_PREFERRED_NETWORK_MODE
  Remove usage of Telephonymanager getDefault() hidden API
  SettingsProvider: use sysprop as API for telephony
2020-04-14 02:13:14 +00:00
markchien
711d8b4e4a Change tethering file structure to respect its package name
Bug: 145099347
Test: atest TetheringTests
      atest CtsTetheringTest
Change-Id: I7401c550fbafd17a5ed2d925b5d0e17e358af467
2020-04-14 02:09:51 +00:00
Mark Chien
ec6cf543f9 Merge "Tethering: Add an exported flag in manifest" 2020-04-14 01:38:42 +00:00
Eric Laurent
c48b0c9e96 Merge "AudioService: fix AudioProductStrategy matching rule" 2020-04-13 21:32:59 +00:00
Rambo Wang
8b1006614d Add unit test for ClosedSubscriberGroupInfo
Compare homeNodebName based on values instead of references.

Bug: 151976726
Test: atest ClosedSubscriberGroupInfoTest
Merged-In: I15557e673c8b6842a6fc28b6ea814323652a00b8
Change-Id: I15557e673c8b6842a6fc28b6ea814323652a00b8
(cherry picked from commit e0c4e40512a8a8c96a3959f83cf5d1a713dd85e4)
2020-04-13 12:58:11 -07:00
Treehugger Robot
6ed4be3ab4 Merge "Include what you use: <fcntl.h>" 2020-04-13 19:14:29 +00:00
Hans Boehm
b7383f2c5f Merge "Don't call exit() with threads running" 2020-04-13 18:51:16 +00:00
Francois Gaffie
05672e534e AudioService: fix AudioProductStrategy matching rule
Strategies use rules on attributes, and use public getter
to compare usages. However, some usage are system only and
now filtered by public getter.
This CL fixes this issue by adding a hidden get for usage
that return whatever public or system usage.

Test: adb shell am instrument -w -e class com.android.audiopolicytest.AudioManagerTest#testAudioAttributesToStreamTypes com.android.audiopolicytest

Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: Iddd55af8f230cb063dcaa9ba950b890cbbb81643
Merged-In: I377e840b18443c33fb0b562b27fbc706aaeb8055
2020-04-13 18:42:34 +00:00
Tom Cherry
30f8f823aa Include what you use: <fcntl.h>
This was transitively included, but no longer is, so it must be
explicitly included.

Exempt-From-Owner-Approval: Janitorial
Test: build
Change-Id: Id88ee5113aa9f0a223dfabfc164ce17747727647
2020-04-13 11:10:30 -07:00
Chalard Jean
2f46cd181a Merge "Allow testing of signal strength" 2020-04-13 17:27:06 +00:00
Treehugger Robot
5bfe628d0b Merge "Remove some hdmi ro properties" 2020-04-13 17:00:42 +00:00
Ashwini Oruganti
64fa4f8154 Tethering: Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.

Bug: 150232615
Test: TH
Change-Id: I25b55378df393cd4fb8932b7ae64f97eb9f1aa8e
Merged-In: I25b55378df393cd4fb8932b7ae64f97eb9f1aa8e
(cherry picked from commit 9226d6c835cd57d10a7562f18143dbaae8601b43)
2020-04-14 00:08:24 +08:00
Chalard Jean
40517308f2 Merge "Add instrumentation to test NetworkAgent." 2020-04-13 14:47:58 +00:00
paulhu
23f0417c48 Update tethering notification strings
Update strings after converged with carrier.

Bug: 145629001
Bug: 147818698
Test: atests TetheringTests
Change-Id: I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b
2020-04-13 13:36:52 +00:00
Chalard Jean
ca241694cb Allow testing of signal strength
- Let any process with NETWORK_SETTINGS register for signal strength
  wakeup.
- Allow agents registering test networks to assign them a signal
  strength.

Test: NetworkAgentTest
Bug: 139268426
Change-Id: I2b4b89be3e69f4853fd6978d2c8f5c8eb4271f21
2020-04-13 21:55:32 +09:00
Chiachang Wang
0bb146e48c Merge "Add more tests for CaptivePortalData" 2020-04-13 09:46:20 +00:00
Chiachang Wang
55bde27f29 Add more tests for CaptivePortalData
Add missing tests to cover all system APIs

Bug: 152280218
Bug: 150640683
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalDataTest on
      both Q and R device
Change-Id: I6d3826922f16816d5b18ed3540266442a0ed3e49
2020-04-13 08:58:48 +00:00
Chiachang Wang
fcdea07db4 Merge "Move CaptivePortalDataTest to common test to support cts" 2020-04-13 08:56:31 +00:00
Chiachang Wang
f4ebfd4bde Move CaptivePortalDataTest to common test to support cts
Commit has to on top of aosp/1281921 to skip whole test in Q
device since CaptivePortalData class is introduced in R.

Result in Q will be:
[1/1] android.net.CaptivePortalDataTest#skippedClassForDevSdkMismatch: IGNORED

Bug: 152280218
Bug: 150640683
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalDataTest on
      both Q and R device
Change-Id: Iddd00e1c85abe767b1a41a1761d3266ba322dba6
2020-04-13 08:13:04 +00:00