Commit Graph

385700 Commits

Author SHA1 Message Date
Baligh Uddin
1474c7bf34 Remove these subdirectories per b/133225687
Bug: 133225687
Test: Local compile/test.
Change-Id: I94f962e4e15c5addb193d6a54a6776614ed02657
2019-06-01 23:35:01 -07:00
Jack Yu
d40f7dc42e Merge "Considered network preference when simulating legacy data RAT" 2019-06-02 00:11:16 +00:00
Jack Yu
89ccc66963 Considered network preference when simulating legacy data RAT
Correctly supported the legacy data RAT when both cellular
and IWLAN are in service. In this case only report
RAT as IWLAN when any type of APN is preferred on IWLAN.
Otherwise still use the RAT reported by cellular network
service.

Bug: 133516945
Test: Manual

Merged-In: Ifdddad1d5ee95f4576d5002a1b66caafc172cb58
Change-Id: Ifdddad1d5ee95f4576d5002a1b66caafc172cb58
(cherry picked from commit a74f2d8c34)
2019-06-01 00:13:03 -07:00
Evan Tyra
c6e5a7197e Merge "Catch NPE in getServiceStateForSubscriber" 2019-06-01 02:50:10 +00:00
Evan Tyra
9bd937a0f6 Catch NPE in getServiceStateForSubscriber
ITelephony can enter a bad state with an incorrect SubId and throw an
NPE as shown in the attached bug. This is not an expected error, so a
bugreport will be triggered on userdebug builds on catch.

Test: Local
Bug: 134067547
2019-06-01 00:02:42 +00:00
Baligh Uddin
bc76317347 Merge "Add OWNERS file prior to migration." 2019-05-31 22:30:25 +00:00
Baligh Uddin
379969282d Add OWNERS file prior to migration.
Bug: 133225687
2019-05-31 15:28:57 -07:00
Treehugger Robot
1b817b81fd Merge "Stop USB Debugging authorization window dismissing on tap outside." 2019-05-31 18:13:20 +00:00
David Sehr
b1ec00b5ea Merge "Add system option to disable lock profiling" 2019-05-31 14:23:12 +00:00
Lorenzo Colitti
55d1b0500a Merge "Don't crash ConnectivityService if the network stack crashes." 2019-05-31 13:58:00 +00:00
Lorenzo Colitti
878a3dd49d Merge "Add a wrapper for INetworkMonitor." 2019-05-31 13:25:36 +00:00
Lorenzo Colitti
ac955b3171 Don't crash ConnectivityService if the network stack crashes.
When the network stack crashes, the system will rebind to it.
Existing references are no longer useful (they just throw
RemoteException) but if the system is still up, then the user
can at least recover the situation by taking actions such as
going into airplane mode, toggling wifi, etc.

This CL stops ConnectivityService from crashing the system when
it cannot talk to NetworkMonitor. This is arguably better than
crashing the system, because crashing the system is disruptive
and carries the serious risk of a bootloop from which it is not
possible to recover.

NetworkStackClient already contains code to crash the system
when the network stack crashes. This change help ensure that
if a crash occurs, it is the result of an explicit decision by
that code instead of an unchecked exception in one of the callers
of the network stack.

Bug: 133725814
Test: builds, boots
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: Ib9a15fececd8579fc5b139fe0341275a45512e0f
2019-05-31 19:30:36 +09:00
Lorenzo Colitti
836f6a4a05 Add a wrapper for INetworkMonitor.
Generated using:
./wrap_aidl.sh frameworks/base/services/net/aidl/networkstack/3/android/net/INetworkMonitor.aidl > frameworks/base/services/net/java/android/net/NetworkMonitorManager.java

Bug: 133725814
Test: builds, boots
Test: atest FrameworksNetTests
Change-Id: I9f3f2588d498a05e2405129cf58bfcdd30f45e3b
2019-05-31 19:22:32 +09:00
Colin Cross
9a2d64872b Merge "Make test_options.timeout an int64" 2019-05-31 03:11:21 +00:00
David Sehr
26a6427c44 Add system option to disable lock profiling
Disable lock profiling to test for overhead.

Bug: 133257467
Test: build
Change-Id: Ida5f83e626c82266de69b13dc2def0477cc87b0f
2019-05-30 18:04:16 -07:00
Colin Cross
d0de38b222 Merge "Convert SettingsLib tests to Android.bp" 2019-05-30 21:08:52 +00:00
Varun Anand
b50e778fa7 Merge changes from topic "vpn_data_accn_tests"
* changes:
  Add one more test for VPN usage stats.
  Addressing comments for http://ag/7700679.
2019-05-30 19:34:28 +00:00
Colin Cross
c3378677a6 Make test_options.timeout an int64
Test: m RunSettingsLibRoboTests

Change-Id: I87e185a54474c43a0c5e77a657c28d3403354876
2019-05-30 11:39:13 -07:00
Neil Fuller
a326166eba Merge "Switch to HexEncoding from ByteStringUtils" 2019-05-30 16:31:09 +00:00
Neil Fuller
ae6fef3de7 Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.

DexLogger contains import ordering fixes to enable upload.

Bug: 124232146
Test: build only
Exempt-From-Owner-Approval: Already approved internally
Merged-In: I2cb09da5ec5296799e03bab812b7fb29452a623e
Change-Id: I2cb09da5ec5296799e03bab812b7fb29452a623e
2019-05-30 16:30:53 +00:00
Lorenzo Colitti
4e4efe42a1 Add one more test for VPN usage stats.
(cherry picked from commit 1419b0b20e)

Covers the case where the majority of traffic through the VPN is
caused by the VPN app itself, and ensures that that traffic is
correctly attributed to the VPN app as opposed to spread between
the other apps that use the VPN.

Bug: 120145746
Test: atest NetworkStatsServiceTest
Change-Id: Ibd7646dc088fa4180abd696e89c3148ff34ce190
Merged-In: Iffd3f95fc2e11d311691a797b010edb38d2ef3c6
2019-05-30 15:59:28 +00:00
Varun Anand
e4bfdccb57 Addressing comments for http://ag/7700679.
(cherry picked from commit a229333986)

Note, that its in a separate CL so we could cherry-pick this CL to aosp.
http://ag/7700679 is already in aosp (http://aosp/865073).

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests

Change-Id: Ic1767bc8bf1460e4223f86465fc72344428e6055
Merged-In: I7cfda226b4ed11b67002b83b38fba0f5caf96718
2019-05-30 15:59:07 +00:00
Chalard Jean
ad0be320e2 Merge "Fix a comment" 2019-05-30 14:39:48 +00:00
Luke Huang
3fd64333d2 Merge "Fix issue for DnsResolver#query" 2019-05-30 11:22:50 +00:00
Chiachang Wang
b6482348b0 Merge "Replace limited connectivity notification after detecting it" 2019-05-30 10:56:08 +00:00
Treehugger Robot
2b801dc016 Merge "Prevent a 4-way binder interlock leading to a leak." 2019-05-30 10:22:30 +00:00
Chalard Jean
8a0f055e75 Fix a comment
I need to learn to read

Bug: 119216095
Test: comment-only change
Change-Id: Ia2317fc146462e73c1c770ad0f6f2009e497649b
2019-05-30 18:10:01 +09:00
Chalard Jean
3ec6ba7509 Merge "Always give VPN the INTERNET capability." 2019-05-30 08:36:19 +00:00
Chiachang Wang
d74d7e62d9 Replace limited connectivity notification after detecting it
No internet notification may be prompted before partial
connectivity being detected. Partial connectivity status will
be set into NAI and prompted in the Setting. Behavior is not
aligned between Setting and notification. Thus, update
notification again if partial connectivity is detected.
Also, sliently show the updated notification if no internet
notification has already been shown to user to prevent alerting
user in short time.

Bug: 130683832
Test: Verified with simulated partial connectivity
Test: atest FrameworksNetTests
Change-Id: Ie16a8ce6e0fa437048e8c1eea240314ca30e9520
2019-05-30 16:19:47 +08:00
Chalard Jean
d5603307e1 Prevent a 4-way binder interlock leading to a leak.
System server             |        NetworkStack
                              |
NetworkMonitorCallbacks  ←----|--- NetworkMonitorCallbacks$Stub$Proxy
         ↓                    |           ↑
  NetworkAgentInfo            |      NetworkMonitor
         ↓                    |           ↑
NetworkMonitor$Stub$Proxy ----|---→ NetworkMonitorImpl

Bug: b/133174607
Test: Manual. The simplest artifact is observed by watching the output of
adb shell dumpsys meminfo -d com.android.networkstack | grep 'Proxy Binders'
while connecting and disconnecting multiple times to any network.
This will display the number of binder proxies. Before this, the binder
proxy count increases by 1 with each connection and never goes down (there
is some noise, as proxy objects are sometimes created for other reasons,
and get GC'd eventually). After this, the binder proxy count is always
eventually stable at 27 + connected network count.

See the bug for the complete analysis.

Change-Id: Ide2428dab3fcd6d7cd00aa2a9fd99d6c99b815a4
2019-05-30 17:12:46 +09:00
Chalard Jean
06d81d2c62 Always give VPN the INTERNET capability.
Split-tunnel VPN (which are the only ones affected by this change)
always fall through to the default network for routes they don't
handle, and even if the underlying network(s) don't provide access
this may be a pinhole that can actually reach the broader network.

In practice this behaves like the original release of P and is the
safest thing to do for Q. In R we should evaluate giving the VPN
app the ability to simply tell the network stack whether it does
provide Internet access or not.

Bug: 119216095
Test: FrameworksNetTests NetworkStackTests
Change-Id: I262ca41fe0225660551c9a421562405366b6acac
2019-05-30 16:11:14 +09:00
Luke Huang
c211b27621 Fix issue for DnsResolver#query
1. Previously, getDnsNetId doesn't handle all the cases.
Fix it with cosidering bypass private DNS flag.
2. Make getDnsNetId return Network instead of netId,
and change name from getDnsNetId to getDnsNetwork

Bug: 129530368
Test: atest DnsResolverTest DnsUtilsTest
Change-Id: Ic8d45b802d72a266f9ec97bfea620c1ede6967e5
2019-05-30 06:34:03 +00:00
Mark Chien
1bbb08b87f Merge "Fix captive portal can't show certificate problem" 2019-05-30 02:13:41 +00:00
Haibo Huang
4fb04e8b7f Merge "Fix compilation issues with new kotlin compiler" 2019-05-29 22:21:00 +00:00
Treehugger Robot
c51996859d Merge "bpfmt -w Android.bp" 2019-05-29 22:02:37 +00:00
Colin Cross
32e0401582 Convert SettingsLib tests to Android.bp
See build/soong/README.md for more information.

Bug: 122332340
Test: m RunSettingsRoboTests
Test: atest SettingsLibTests (same failures before and after)
Change-Id: I69b5b2c6c22f93a31ef978710867226cb1ba3db0
Merged-In: I69b5b2c6c22f93a31ef978710867226cb1ba3db0
2019-05-29 14:44:48 -07:00
Tobias Thierer
21558d758d Merge "Refactoring: Rewrite links in Metalava instead of carrying patches." 2019-05-29 21:13:05 +00:00
Chen Xu
478cbabf8c Merge "NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions" 2019-05-29 17:15:41 +00:00
Jaewoong Jung
cb36cba281 Merge "Convert PrintRecommendationService to Android.bp." 2019-05-29 16:21:58 +00:00
Jaewoong Jung
0fc171c6a6 Convert PrintRecommendationService to Android.bp.
See build/soong/README.md for more information.

Bug: 122332340
Test: Built and flashed to a Pixel device + TreeHugger
Merged-In: I4ff0577a0c27b8a451e6aca2c62c2437481c2a0c
Change-Id: I4ff0577a0c27b8a451e6aca2c62c2437481c2a0c
2019-05-29 08:41:03 -07:00
Chalard Jean
9690384221 Merge "Add a common test library." 2019-05-29 12:16:08 +00:00
Tobias Thierer
bc05034a26 bpfmt -w Android.bp
This CL reformats Android.bp via the above command line.
Before running it, I first had to "make bpfmt".

Test: Visual inspection / self-review only.

Change-Id: I00857646720198e13f875056793802b2e4350264
2019-05-29 12:26:03 +01:00
Tobias Thierer
8f55941ebc Refactoring: Rewrite links in Metalava instead of carrying patches.
Another CL in this topic introduces the metalava feature flag
--replace-documentation <ancestor java packages> <regex> <replacement>
to perform regex replacements in the documentation of some elements.

This CL uses that feature to re-write links in libcore/ojluni/
documentation that previously carried patches.

Since .bp files don't appear to support String literals that are not
(un)escaped, \ and $ occurring in the regexp/replacement parameters
need to be escaped in the .bp file.

Bug: 129765390
Test: Manually checked that this CL topic does not affect the result of
      "make ds-docs offline-sdk-docs"

Change-Id: Idb7366530c4ab255c1348cf48881cf2bde31be1e
2019-05-29 12:26:03 +01:00
Luke Huang
8c4ef95cbb Merge "Minor changes for DnsUtils and its test" 2019-05-29 10:17:24 +00:00
Neil Fuller
b4cc036c1e Merge "Switch to HexEncoding from ByteStringUtils" 2019-05-29 10:12:27 +00:00
Neil Fuller
6ae67f8574 Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.

This change also fixes some import issues necessary for upload.

Bug: 124232146
Test: build only
Exempt-From-Owner-Approval: Already approved internally
Merged-In: I6ee12e9914503a5b628ae6da82a396aa71dd972c
Change-Id: I6ee12e9914503a5b628ae6da82a396aa71dd972c
2019-05-29 10:11:44 +00:00
markchien
1302494b6e Fix captive portal can't show certificate problem
Captive portal overrides two shouldOverrideUrlLoading methods,
but show certificate logic only be implemented in deprecated one.

Bug: 133714666
Test: -build, flash, boot
      -atest FramworksNetTests
      -manual test

Change-Id: Ibdcfb814d9552563416fc30b314916559862c361
2019-05-29 18:10:05 +08:00
chen xu
bd0005b43d NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions
Bug: 133236378
Test: Manual
Change-Id: I49fbde1fe73b33aadcf8fd23ad224f363b137bf3
2019-05-28 23:28:56 -07:00
Luke Huang
9f97f97d0d Minor changes for DnsUtils and its test
fix nits for ag/7671031

Bug: 129530368
Test: atest DnsUtilsTest
Change-Id: I562d33870a933a5fe55c89137a2d9574e3c59b90
2019-05-29 13:56:27 +08:00
Sal Savage
d8b457545a Merge "Update BluetoothProfileConnector to invoke service disconnections with correct profile ID" 2019-05-29 01:26:04 +00:00