Commit Graph

14024 Commits

Author SHA1 Message Date
Lorenzo Colitti
8b6e155a59 Merge "Use connectivity resources in service-connectivity" into sc-dev 2021-03-22 02:21:13 +00:00
Remi NGUYEN VAN
12e02a3da5 Merge "Use jniThrowErrnoException from JNIHelp" into sc-dev 2021-03-22 00:20:36 +00:00
Roshan Pius
332e7a241a resolve merge conflicts of 403b7fd0b0a6736bcee1817fb5c774f8c8a040de to stage-aosp-master
Change-Id: Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3
2021-03-21 19:16:33 +00:00
Remi NGUYEN VAN
9de8916610 Use connectivity resources in service-connectivity
Migrate resource usage to the connectivity resource package.
For framework resources that have known overlays, keep a fallback until
the overlays can be migrated.

Bug: 182125649
Test: atest FrameworksNetTests
Change-Id: I778d94a5aac0c4e20e78b1ba3a002495c17a38a0
2021-03-21 01:39:51 +09:00
Treehugger Robot
920228f96d Merge "Fix InetAddressCompat exception handling" am: cd37173df6 am: ef16d9420d am: efcd8e96e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645300

Change-Id: I6b1aa628a1c48c4c7ed02a4d379cab2316b13526
2021-03-19 18:44:03 +00:00
Treehugger Robot
efcd8e96e7 Merge "Fix InetAddressCompat exception handling" am: cd37173df6 am: ef16d9420d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645300

Change-Id: Ib33b1d69e8480ba1ee2193671a88ed91d624d4bc
2021-03-19 18:01:07 +00:00
Treehugger Robot
ef16d9420d Merge "Fix InetAddressCompat exception handling" am: cd37173df6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645300

Change-Id: I1d65d6b011e5ce585835e1c9df9eea0afb74b0f4
2021-03-19 17:21:29 +00:00
TreeHugger Robot
4730840e60 Merge "[NS03] Mix in other CS-managed properties" into sc-dev 2021-03-19 17:07:21 +00:00
TreeHugger Robot
969cb54fa5 Merge "Use module resources in NetworkNotificationManager." into sc-dev 2021-03-19 16:54:49 +00:00
TreeHugger Robot
9d5ce0fdbc Merge "Fix InetAddressCompat exception handling" into sc-dev 2021-03-19 16:14:10 +00:00
Lorenzo Colitti
9d239b5515 Use module resources in NetworkNotificationManager.
Also make getTransportName non-static so it can access the module
resources.

Also fix a duplicate comment in a resource file.

Bug: 183097033
Test: atest FrameworksNetTests
Test: connected to Wi-Fi with no Internet, observed notification
Change-Id: Ic0d24d36af0b87153d527083f8964ddc6cd78482
2021-03-20 00:21:21 +09:00
Lorenzo Colitti
11619d0fb9 Merge "Copy NetworkNotificationManager resources to conectivity module." into sc-dev 2021-03-19 15:18:34 +00:00
Lorenzo Colitti
3b8af467a8 Copy NetworkNotificationManager resources to conectivity module.
The localized resources were automatically generated with:

===========
export OLDRES=core/res/res
export NEWRES=packages/Connectivity/service/ServiceConnectivityResources/res
export FILE=services/core/java/com/android/server/connectivity/NetworkNotificationManager.java

for i in $OLDRES/values-*/strings.xml; do
    outfile=$NEWRES/${i#core/res/res/}
    outdir=$(dirname $outfile)

    if egrep -q "$regex" $i || egrep -q "$strarrayregex" $i; then
        mkdir -p $outdir

        cat << EOF > $outfile
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
EOF

        egrep $regex $i >> $outfile

        egrep -A $strarraylines "$strarrayregex" $i >> $outfile

        echo "</resources>" >> $outfile
    fi
done
===========

The text to the the base resources file was added manually from
the output of:

===========
egrep -B 2 $regex core/res/res/values/strings.xml  | grep -v -- ^--
egrep -B 2 -A 6 $strarrayregex core/res/res/values/strings.xml  | grep -v -- ^--
===========

The drawables were copied from the Wifi resources and from the
framework resources.

Test: m
Bug: 183097033
Change-Id: I99c0d28069dd1a13d452105b0a83a03a833232a2
2021-03-20 00:16:17 +09:00
Remi NGUYEN VAN
cb5c2e141e Fix InetAddressCompat exception handling
Fix InetAddressCompat exception handling to throw the original exception
in case of InvocationTargetException, rather than wrapping in a generic
IllegalStateException.

Bug: 183198868
Test: Test device with and without connectivity
Change-Id: Idc4d678afe9f20f920d7061790af4203ab75be26
2021-03-19 23:56:27 +09:00
Remi NGUYEN VAN
31c5d94fb2 Fix InetAddressCompat exception handling
Fix InetAddressCompat exception handling to throw the original exception
in case of InvocationTargetException, rather than wrapping in a generic
IllegalStateException.

Bug: 183198868
Test: Test device with and without connectivity
Change-Id: Idc4d678afe9f20f920d7061790af4203ab75be26
2021-03-19 14:45:48 +00:00
Chalard Jean
e37aaf54ad Merge "Reland: CaptivePortalData: use CharSequence in VenueFriendlyName API" into sc-dev 2021-03-19 14:26:06 +00:00
Remi NGUYEN VAN
eb0e59193e Use jniThrowErrnoException from JNIHelp
Use the jniThrowErrnoException that is available in JNIHelp, instead of
reimplementing in NetworkUtils.

Bug: 179229316
Test: device boots and has connectivity
Change-Id: I257a9d55ce1f5a7c588e209b4a89d3e7a3e09994
2021-03-19 13:44:11 +00:00
Remi NGUYEN VAN
75689f7cdb Merge "Move NetworkUtils JNI out of core/jni" into sc-dev 2021-03-19 13:42:54 +00:00
Chiachang Wang
6ae5f25ede Merge "Add startCaptivePortalApp to system API" am: 9e18198cc5 am: b01cafdb08 am: 48c2c5949f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1639899

Change-Id: Ia3be29892f62b82d23a165bc8334a083c674aefb
2021-03-19 13:09:03 +00:00
Chiachang Wang
48c2c5949f Merge "Add startCaptivePortalApp to system API" am: 9e18198cc5 am: b01cafdb08
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1639899

Change-Id: I7e82a2a8efb13b960b8f79b9646fcac07c7ac569
2021-03-19 12:26:42 +00:00
Chiachang Wang
b01cafdb08 Merge "Add startCaptivePortalApp to system API" am: 9e18198cc5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1639899

Change-Id: I2efbc3276ccce8df4d77c06dc2d50bd4d2bed9b5
2021-03-19 11:59:16 +00:00
Chalard Jean
4f7e05ccae Merge "[NS03] Mix in other CS-managed properties" am: dc2fed3454 am: 4ff025d8a5 am: be8093b125
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556101

Change-Id: I20c4d8392dba72b142cd9cdf15bed94d52848b81
2021-03-19 11:32:34 +00:00
Lucas Lin
ee8ed23808 Merge "Expose getCapabilities" am: 0f441f7bdd am: e988cf4321 am: bf42eae162
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641919

Change-Id: I9a6b6f405ee4b7d5d03173d6c5e22e1018dc3417
2021-03-19 11:32:07 +00:00
Treehugger Robot
5654c21221 [automerger skipped] Merge "Reland "Add an API to listen for changes in network blocked status of an uid."" am: cd3ea1f002 -s ours am: e58eafa8c4 -s ours am: 363f1b34c4 -s ours
am skip reason: skip tag Change-Id Ib9949b8619c6b148f73630b314c4113d76c31ec1 with SHA-1 cb5fd4a670 is already in history

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

Change-Id: Ib90dc576f29662385479a9f7bbb16cdca13ef826
2021-03-19 11:31:48 +00:00
Chiachang Wang
9e18198cc5 Merge "Add startCaptivePortalApp to system API" 2021-03-19 11:30:20 +00:00
Chalard Jean
be8093b125 Merge "[NS03] Mix in other CS-managed properties" am: dc2fed3454 am: 4ff025d8a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556101

Change-Id: I6c325a102c93459a377e0a8670176f0989f88738
2021-03-19 11:07:51 +00:00
Lucas Lin
bf42eae162 Merge "Expose getCapabilities" am: 0f441f7bdd am: e988cf4321
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641919

Change-Id: I5a7df27d7b6f7eca0364c3d88d4ad8663063cb3e
2021-03-19 11:07:40 +00:00
Treehugger Robot
363f1b34c4 [automerger skipped] Merge "Reland "Add an API to listen for changes in network blocked status of an uid."" am: cd3ea1f002 -s ours am: e58eafa8c4 -s ours
am skip reason: skip tag Change-Id Ib9949b8619c6b148f73630b314c4113d76c31ec1 with SHA-1 cc8f26dea8 is already in history

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

Change-Id: Iffa4b2d7c7a9d03a70a6a01a545bb91e88bfebb1
2021-03-19 11:07:23 +00:00
Remi NGUYEN VAN
8f0031d7aa Move NetworkUtils JNI out of core/jni
Keep the utilities included via a library, but move them out of
core/jni, and prepare a library to package them together with
framework-connectivity.

Also remove unnecessary dependencies in framework-connectivity.

Bug: 171540887
Test: device boots and has connectivity

Change-Id: I0b55dfe92f3cb6e848d79ac7953756f39aaa2597
2021-03-19 11:01:17 +00:00
Chalard Jean
4ff025d8a5 Merge "[NS03] Mix in other CS-managed properties" am: dc2fed3454
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556101

Change-Id: I7b904af6c34190f53378cc1acc518840b527d434
2021-03-19 10:52:23 +00:00
Remi NGUYEN VAN
abba870866 Merge "Move connectivity AIDLs to android.net" into sc-dev 2021-03-19 10:51:22 +00:00
Lucas Lin
e988cf4321 Merge "Expose getCapabilities" am: 0f441f7bdd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641919

Change-Id: Ie524f7538aa7a7048c55097c0995d8c6194dc682
2021-03-19 10:49:12 +00:00
Treehugger Robot
e58eafa8c4 [automerger skipped] Merge "Reland "Add an API to listen for changes in network blocked status of an uid."" am: cd3ea1f002 -s ours
am skip reason: skip tag Change-Id Ib9949b8619c6b148f73630b314c4113d76c31ec1 with SHA-1 cc8f26dea8 is already in history

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

Change-Id: I19a6e876187a5cf64a00c3f2dac15c8bec8f2911
2021-03-19 10:46:12 +00:00
Chiachang Wang
d8802f6968 Merge "Expose constants of ConnectivityManager" into sc-dev 2021-03-19 10:40:49 +00:00
Chalard Jean
dc2fed3454 Merge "[NS03] Mix in other CS-managed properties" 2021-03-19 10:32:46 +00:00
Chiachang Wang
293900ff01 Merge changes from topic "replaceUidRange" into sc-dev
* changes:
  Expose uids related APIs in NetworkRequest and NetworkCapabilities
  Replace the usage of UidRange
2021-03-19 10:32:30 +00:00
Lucas Lin
0f441f7bdd Merge "Expose getCapabilities" 2021-03-19 10:24:25 +00:00
Paul Hu
e6acab8b9a Merge "Remove unused NetworkPolicyManagerInternal in CS" into sc-dev 2021-03-19 10:21:40 +00:00
Treehugger Robot
cd3ea1f002 Merge "Reland "Add an API to listen for changes in network blocked status of an uid."" 2021-03-19 10:12:15 +00:00
Chalard Jean
42ab433e3d [NS03] Mix in other CS-managed properties
These properties are necessary to figure out the maximum
score of a network.

Test: FrameworksNetTests
Bug: 167544279
Change-Id: I48dce20ad4a80597039393dca607e8da829b2a61
2021-03-19 18:58:48 +09:00
Chiachang Wang
e79617978f Merge "Send a Network instead of network id for wifi no internet dialog" am: 94dc99ea38 am: 3ff1e2fe49 am: 7bbc040746
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644766

Change-Id: I54259f3084560fe457e3108dee815d0e305675c2
2021-03-19 09:43:49 +00:00
Aaron Huang
511a67f767 Merge "Remove hidden API usage from ProxyTracker" am: ed15b01b0d am: 2f04604df2 am: 330ba163d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646966

Change-Id: I4c5e91ae575c5cd79198a47572a7403e12d64dfa
2021-03-19 09:43:21 +00:00
Lorenzo Colitti
c5f2fd7fb7 Merge "Ensure all calls to getCallingUid use the version in mDeps." am: a6b1b9d110 am: 18e2734d2f am: c3b003da37
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635320

Change-Id: I064e02172a86cd68afb757004102c68ce331dda6
2021-03-19 09:42:53 +00:00
Hai Shalom
5ee45003b4 Reland: CaptivePortalData: use CharSequence in VenueFriendlyName API
Following up on feedback from API council, change the String type
to CharSequence in the get and set Venue friendly name API.

Bug: 179163405
Test: atest ConnectivityServiceTest CtsNetTestCasesLatestSdk:CaptivePortalDataTest
Test: atest NetworkNotificationManagerTest NetworkMonitorTest
Change-Id: Ifa3ea9aae0cabf5757791c4ae13e6f551759ed97
2021-03-19 09:40:34 +00:00
Remi NGUYEN VAN
af56509da2 Merge "Revert "CaptivePortalData: use CharSequence in VenueFriendlyName API"" into sc-dev 2021-03-19 09:38:35 +00:00
Chiachang Wang
7bbc040746 Merge "Send a Network instead of network id for wifi no internet dialog" am: 94dc99ea38 am: 3ff1e2fe49
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644766

Change-Id: I1428a4bf9be18601ff70e8fc50e06fecac158a4b
2021-03-19 09:02:20 +00:00
Aaron Huang
330ba163d9 Merge "Remove hidden API usage from ProxyTracker" am: ed15b01b0d am: 2f04604df2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646966

Change-Id: Idd7ae6ad01db35ed2ea47abab183ae423439ede9
2021-03-19 09:02:08 +00:00
Lorenzo Colitti
c3b003da37 Merge "Ensure all calls to getCallingUid use the version in mDeps." am: a6b1b9d110 am: 18e2734d2f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635320

Change-Id: Ib427fa0d6d9b2ecf35e820db9eb1dc762a81bb3a
2021-03-19 09:01:55 +00:00
Chiachang Wang
3ff1e2fe49 Merge "Send a Network instead of network id for wifi no internet dialog" am: 94dc99ea38
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644766

Change-Id: I676152104fafb5c4e1b93f0e39fa39e43dd6891c
2021-03-19 08:27:56 +00:00
Aaron Huang
2f04604df2 Merge "Remove hidden API usage from ProxyTracker" am: ed15b01b0d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646966

Change-Id: I2d609875a3a31586626a82dddbfcb015bf5ca0bf
2021-03-19 08:27:14 +00:00