Commit Graph

5280 Commits

Author SHA1 Message Date
Nader Jawad
85ff47e3fc Removed hidden mutable APIs from PorterDuffColorFilter
Removed PorterDuffColorFilter#setColor and PorterDuffColorFilter#setMode
as the public facing ColorFilter API is immutable. These framework
internal APIs were causing issues with Drawables as updates to state of
the ColorFilter would not be propagated up to the Drawable to cause an
invalidation.

Fixes: 77723600
Test: Ran atest on SystemUITest and CtsGraphicsTest modules

Change-Id: I935c9e35ffa225735b951bb3b1eb753ea5815a84
2018-04-10 19:37:19 +00:00
Nicolas Geoffray
b19c2e7451 Merge "Exempt tests for hidden APIs." into pi-dev am: 0e675bd901
am: 03ba2d9241

Change-Id: I0e4517312cac9b37537eee55eafd811aff531ea8
2018-04-10 10:11:10 -07:00
Nicolas Geoffray
03ba2d9241 Merge "Exempt tests for hidden APIs." into pi-dev
am: 0e675bd901

Change-Id: I012a1ce8483f5fdddf60cfd33ea4303d72455fca
2018-04-10 09:56:52 -07:00
TreeHugger Robot
0e675bd901 Merge "Exempt tests for hidden APIs." into pi-dev 2018-04-10 16:34:05 +00:00
dalyk
1fcb7398d1 Trigger NetworkCallback events when private DNS usage has changed.
Relies on events sent from netd in aosp/578162.

Test: Added tests to ConnectivityServiceTest. Added a new test
class DnsManagerTest. Built a simple app that appears to
receive onLinkProperties events correctly upon manual changes
to the private DNS settings on a Pixel.
Bug: 71828272

Merged-In: I1e6c54ba016f6a165a302bd135a29d9332aaa235
Merged-In: I7705412803fb9aa707a18ae5a1c50292e084d851
Change-Id: I3223c1285a73d5d531c5051ce70007857caa57e3
(cherry picked from commit 7301aa4140)
2018-04-09 23:04:20 -07:00
Erik Kline
cca8a0d80f Merge "Trigger NetworkCallback events when private DNS usage has changed." am: ec4ded5222 am: ed67e23577
am: a7347262d1

Change-Id: I7705412803fb9aa707a18ae5a1c50292e084d851
2018-04-09 22:54:39 -07:00
Erik Kline
a7347262d1 Merge "Trigger NetworkCallback events when private DNS usage has changed." am: ec4ded5222
am: ed67e23577

Change-Id: I1e6c54ba016f6a165a302bd135a29d9332aaa235
2018-04-09 22:13:36 -07:00
Benedict Wong
d74a971fc2 Merge "Force creation of Socket upon Transform application" into pi-dev 2018-04-09 20:55:30 +00:00
dalyk
7301aa4140 Trigger NetworkCallback events when private DNS usage has changed.
Relies on events sent from netd in aosp/578162.

Test: Added tests to ConnectivityServiceTest. Added a new test
class DnsManagerTest. Built a simple app that appears to
receive onLinkProperties events correctly upon manual changes
to the private DNS settings on a Pixel.
Bug: 71828272
Change-Id: I68665aaf74b7d59182cc6f9586b80b55b0dfe427
2018-04-09 16:45:22 -04:00
Erik Kline
d7375ac9d7 Support bluetooth not using MultinetworkPolicyTracker
This required advancing the IpManager to IpClient refactoring
(Bluetooth used IpManager and friends). Most importantly, the
Bluetooth code used WaitForProvisioningCallback, so this is
moved into IpClient proper now. Also: some more renaming
cleanup.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 62476366
Bug: 72663849

Merged-In: I5e5b2c59ad3ea9ad574e8e683bcab3b09cfe0791
Merged-In: I89b45310181d952129fb2294db63654da9b4057f
Change-Id: I9eee2a9d5c31cdd48a054a7edc3403584efb1864
(cherry picked from commit 8d1fe54be1)
2018-04-09 03:05:37 -07:00
Erik Kline
c90ce76b0c Merge "Support bluetooth not using MultinetworkPolicyTracker" am: ed631bf5aa am: bfcbe96fd0
am: 08eab46ef9

Change-Id: I89b45310181d952129fb2294db63654da9b4057f
2018-04-09 02:58:06 -07:00
Erik Kline
08eab46ef9 Merge "Support bluetooth not using MultinetworkPolicyTracker" am: ed631bf5aa
am: bfcbe96fd0

Change-Id: I5e5b2c59ad3ea9ad574e8e683bcab3b09cfe0791
2018-04-09 02:47:01 -07:00
Erik Kline
8d1fe54be1 Support bluetooth not using MultinetworkPolicyTracker
This required advancing the IpManager to IpClient refactoring
(Bluetooth used IpManager and friends). Most importantly, the
Bluetooth code used WaitForProvisioningCallback, so this is
moved into IpClient proper now. Also: some more renaming
cleanup.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 62476366
Bug: 72663849

Change-Id: I9eee2a9d5c31cdd48a054a7edc3403584efb1864
2018-04-08 23:09:36 -07:00
Nicolas Geoffray
b0284fb5de Exempt tests for hidden APIs.
Bug: 64382372
Bug: 74963051
Test: m
Change-Id: I5234dd6230f2bdd6ffccbf12b25a02d929d20161
2018-04-06 14:54:39 +01:00
Erik Kline
8d8a35a90e Merge "Move the logic of (re)evaluation of Private DNS" into pi-dev 2018-04-06 06:48:25 +00:00
Erik Kline
79c6d0590e Move the logic of (re)evaluation of Private DNS
Moves this out of ConnectivityService and into each NetworkMonitor
(where it's more self-contained).

Test: as follows
    - builds, flashes, boots
    - runtest frameworks-net passes
    - manual testing with working and non-working hostnames behaves
      somewhat (but not entirely) as expected, and not always quickly
Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 77140445
Merged-In: I5dc90ecfe6f6f10967b7501645ad8e030cb38982
Merged-In: Ida4967d22f0781524f0f269e30e653b8ec867258
Change-Id: Ic4322af3cb49149f2d975cb31f54b2ac7927f907
(cherry picked from commit 736353a584)
2018-04-05 19:18:47 -07:00
Erik Kline
27d9b3aa9a Merge "Move the logic of (re)evaluation of Private DNS" am: 04233ef175 am: 23ed88acad
am: 44027dbc13

Change-Id: Ida4967d22f0781524f0f269e30e653b8ec867258
2018-04-05 19:08:43 -07:00
Erik Kline
44027dbc13 Merge "Move the logic of (re)evaluation of Private DNS" am: 04233ef175
am: 23ed88acad

Change-Id: I5dc90ecfe6f6f10967b7501645ad8e030cb38982
2018-04-05 18:53:08 -07:00
Benedict Wong
ffa4d3fd9d Merge "Update IpSecManager to use InetAddress and prefixLen" into pi-dev am: b172d5b437
am: c96c65c6ca

Change-Id: I99400a09c15868058fdd4af67c85ace48b33c3bc
2018-04-05 17:48:00 -07:00
Benedict Wong
c96c65c6ca Merge "Update IpSecManager to use InetAddress and prefixLen" into pi-dev
am: b172d5b437

Change-Id: I03c0745662ab8868f719dc65c9ff8502e2ff817c
2018-04-05 17:34:11 -07:00
Erik Kline
736353a584 Move the logic of (re)evaluation of Private DNS
Moves this out of ConnectivityService and into each NetworkMonitor
(where it's more self-contained).

Test: as follows
    - builds, flashes, boots
    - runtest frameworks-net passes
    - manual testing with working and non-working hostnames behaves
      somewhat (but not entirely) as expected, and not always quickly
Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 77140445
Change-Id: Ic4322af3cb49149f2d975cb31f54b2ac7927f907
2018-04-05 15:17:38 -07:00
Benedict Wong
3f2c54b782 Update IpSecManager to use InetAddress and prefixLen
LinkAddress constructors are currently @hide; this change updates
IpSecManager to use InetAddress and prefixLen, and then construct a
LinkAddress internally. LinkAddress is used over the binder interface to
IpSecService to ensure validity.

Bug: 77528639
Test: CTS, Java unit tests ran on walleye
Change-Id: I19e124adef6d9f4992d8293db3190bcf74c95848
2018-04-05 17:41:11 +00:00
Adrian Roos
02740e16b4 Merge "WM Tests: Use a separate WindowManager instance per test" into pi-dev am: 71c632367a
am: cc5779a287

Change-Id: Ieb474399335bde49d7f13213fbde9b3cbc009a7f
2018-04-04 18:06:42 -07:00
Adrian Roos
cc5779a287 Merge "WM Tests: Use a separate WindowManager instance per test" into pi-dev
am: 71c632367a

Change-Id: Ib27bd64528218cf826a3a674efad863e3cdc6555
2018-04-04 17:46:10 -07:00
TreeHugger Robot
71c632367a Merge "WM Tests: Use a separate WindowManager instance per test" into pi-dev 2018-04-05 00:25:34 +00:00
Benedict Wong
edb2c03960 Merge "Merge "Force creation of Socket upon Transform application" am: 119cf2bc61 am: abcf07af81" into pi-dev-plus-aosp
am: ffec0b0f43

Change-Id: I9ba6fb1058ca0f67c531d173574c8f9a8d978060
2018-04-04 13:15:36 -07:00
Benedict Wong
16cec63d28 Merge "Force creation of Socket upon Transform application" am: 119cf2bc61
am: abcf07af81

Change-Id: I2034448a22461d51728e66bcc0e965821aa4a42f
2018-04-04 12:52:00 -07:00
Benedict Wong
5e9b4c7c33 Force creation of Socket upon Transform application
This change forces Socket and DatagramSocket to populate the
SocketImpl, ensuring that the socket file descriptor can be
retrieved when applying Transport mode Transforms

This is done by calling getSoLinger(), triggering a getImpl(), which
triggers setImpl() if needed.

Bug: 77491294
Test: Added tests in IpSecManagerTest, ran on walleye
Merged-In: I40da08b031357710eb794e0f866aec5660c79594
Change-Id: I40da08b031357710eb794e0f866aec5660c79594
(cherry picked from commit d175a3d3a0)
2018-04-04 10:33:49 -07:00
TreeHugger Robot
c4020ffcab Merge "Mark networks with OEM_PAID always restricted" into pi-dev 2018-04-04 16:54:46 +00:00
TreeHugger Robot
a13620737b Merge "Migrate EasterEgg, JankBench, UiBench to androidx" 2018-04-04 16:16:20 +00:00
Lorenzo Colitti
83c1e74b1e Mark networks with OEM_PAID always restricted
Bug: 68762530
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Cherry-picked from AOSP with no conflicts

Merged-in: I173ee0a3bc1797d03ba34c5f025844eaada87ee4
Change-Id: I173ee0a3bc1797d03ba34c5f025844eaada87ee4
(cherry picked from commit efbacc0ccb)
2018-04-04 05:35:54 +00:00
Aurimas Liutikas
1d6c6dab01 Migrate EasterEgg, JankBench, UiBench to androidx
Bug: 76692459
Test: make -j EasterEgg JankBench UiBench
Change-Id: Id9bed936dd1cb1cb4e1c0792618c9a3d608c1fb8
2018-04-03 17:08:29 -07:00
Benedict Wong
d175a3d3a0 Force creation of Socket upon Transform application
This change forces Socket and DatagramSocket to populate the
SocketImpl, ensuring that the socket file descriptor can be
retrieved when applying Transport mode Transforms

This is done by calling getSoLinger(), triggering a getImpl(), which
triggers setImpl() if needed.

Bug: 77491294
Test: Added tests in IpSecManagerTest, ran on walleye
Change-Id: I40da08b031357710eb794e0f866aec5660c79594
2018-04-03 17:04:55 -07:00
Nathan Harold
c1c08d10d1 Merge "Add AppOps Checks for MANAGE_IPSEC_TUNNELS" into pi-dev
am: 80a2bba9a6

Change-Id: Icd1b2cfc699ab44e4ca536b98298d5b23db7372e
2018-04-03 14:41:56 -07:00
Nathan Harold
592dadbd43 Add AppOps Checks for MANAGE_IPSEC_TUNNELS
Adds support for a new AppOp to permit services to
use IpSec tunnel mode. The IpSecService now needs
a context so change the service mode to a cached
service rather than a static service.

Bug: 66955045
Test: runtest frameworks-net
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4
2018-04-03 18:23:11 +00:00
Bernie Innocenti
5be71dcb03 APF: drop multicast ICMPv6 while in doze mode
Some WiFi hotspots send excessive multicast IPv6 ping requests which
cause considerable power drain. Thus, drop all multicast ICMPv6 ping
requests while the device is in doze mode.

Bug: 66930077
Test: runtest -x tests/net/java/android/net/apf/ApfTest.java
Test: manual - compared generated APF bytecode using apf_disassembler
Test: manual - force idle mode while sending multicast pings to device
Change-Id: I25dbf99985cf4413b4d0e3920d281fe6d663197a
(cherry picked from commit e2c70f8a60)
2018-04-03 16:16:14 +09:00
TreeHugger Robot
5a36b3b6ea Merge "Refactor isTetheringSupported() calls" into pi-dev 2018-04-03 02:25:49 +00:00
Erik Kline
7a26ba37f6 Refactor isTetheringSupported() calls
Tethering currently wants access to complex isTetheringSupported
logic that is only available in ConnectivityService. Instead of
trying to access that via ConnectivityManager, pass this capability
in to Tethering directly, in the TetheringDependencies object.

Also:
    - ConnectivityManager is only a source of static constants now,
      so "import static" all the constants that are actually used.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net works
    - manual USB towards WiFi tethering works
Bug: 68951715

Merged-In: Ifa121b057f9959ddb980edc940327929e48ea973
Merged-In: Iad6358dc2f1d10b322d22ec90543adc50882962d
Change-Id: Ia64faaadefb4a5d84a50da98bdebd544b6fda101
(cherry picked from commit 465ff3a0c1)
2018-04-02 16:59:23 -07:00
Erik Kline
019cb1d42c Merge "Refactor isTetheringSupported() calls" am: e34c426fd3
am: 6f63d051d6

Change-Id: Iad6358dc2f1d10b322d22ec90543adc50882962d
2018-04-02 21:08:52 +00:00
Chalard Jean
72e7ad96be Merge "Fix PermissionMonitorTest that has been failing." into pi-dev
am: 6e66280d35

Change-Id: Ifb04fdda2b54b0bde8b6eeead3e0240d5cc1ff79
2018-04-02 20:14:29 +00:00
Treehugger Robot
e34c426fd3 Merge "Refactor isTetheringSupported() calls" 2018-04-02 18:47:18 +00:00
Bernie Innocenti
dd819de65a Merge "APF: drop multicast ICMPv6 while in doze mode" am: 7880e284c8
am: f0ddd72f0f

Change-Id: I2827fc9159fe8d372d881451b9971ddcc4a0530f
2018-04-02 18:22:47 +00:00
Remi NGUYEN VAN
75525b39f4 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Merged-In: Ieb25c41c651499fdd01225ae5ac21d95e3d823f5
Merged-In: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
(cherry-pick of aosp I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda)

Change-Id: Id41cf22a0f9a63cb1832e9375bfb045861f08e52
2018-04-02 13:30:02 +00:00
Bernie Innocenti
e2c70f8a60 APF: drop multicast ICMPv6 while in doze mode
Some WiFi hotspots send excessive multicast IPv6 ping requests which
cause considerable power drain. Thus, drop all multicast ICMPv6 ping
requests while the device is in doze mode.

Bug: 66930077
Test: runtest -x tests/net/java/android/net/apf/ApfTest.java
Test: manual - compared generated APF bytecode using apf_disassembler
Test: manual - force idle mode while sending multicast pings to device
Change-Id: I25dbf99985cf4413b4d0e3920d281fe6d663197a
2018-04-02 21:17:51 +09:00
TreeHugger Robot
6e66280d35 Merge "Fix PermissionMonitorTest that has been failing." into pi-dev 2018-04-02 09:42:26 +00:00
TreeHugger Robot
4a3ccc18e6 Merge "apf: adjust JNI to accept_packet()'s new signature" into pi-dev 2018-04-02 08:37:20 +00:00
Chalard Jean
577164bd45 Fix PermissionMonitorTest that has been failing.
The fail is related to a recent fix to PermissionMonitor
that went into pi-dev only : ag/3799094, which fixed getting
the remote package name for the correct macro user instead of
the default. That fix had broken the test, this change fixes it.

Test: test now passes
Bug: 77315205
Change-Id: I26f8276eafe80478d5fefcff92e7dc2f12128bb4
2018-04-02 07:44:21 +00:00
Bernie Innocenti
035dbd438a apf: adjust JNI to accept_packet()'s new signature
Bug: 73804303
Test: runtest -x tests/net/java/android/net/apf/ApfTest.java
Merged-Id: I0a3ad562496f3e06bc9527af4e038be3cdfe25c6
Merged-Id: I1674ac22f00af037ad415a4436b94b2eec6a02b7
Merged-Id: I966776e6574cbf167a6148e20d40e2bdcc887327
Change-Id: Id5c3cec5459ce6f9693457448002e60bbca6c09b
(cherry picked from commit 64bc32c5d4)
2018-04-02 16:27:08 +09:00
Remi NGUYEN VAN
6f5a8db2e9 Merge "Add method to NetworkStatsService for UID stats." into pi-dev 2018-04-02 05:40:04 +00:00
Calin Juravle
5df6423a29 Merge "Fix BackgroundDexOptTest" into pi-dev
am: ddc4e1ab06

Change-Id: Icd564239c493ed402fe9914f52c48da72a3d58db
2018-03-31 01:34:28 +00:00