OSDN Git Service

Don't mark NetworkRequests restricted when they don't have restricted caps
authorPaul Jensen <pauljensen@google.com>
Fri, 28 Aug 2015 16:00:15 +0000 (12:00 -0400)
committerThe Android Automerger <android-build@android.com>
Mon, 28 Sep 2015 23:29:57 +0000 (16:29 -0700)
commitee409d3ab5abc34c786a5e8d087d5a9ba61f5275
tree80a497836ec4ea590e5c75c774b5f4d4cdc22974
parent2de275c9a3b0f472f617089f1f817b09f6dad493
Don't mark NetworkRequests restricted when they don't have restricted caps

Requests without NET_CAPABILITIES_INTERNET and just the default network
capabilities should not be marked restricted.  Without this fix apps
can hit permissions exceptions if they inadvertently make requests
without NET_CAPABILITIES_INTERNET.

Bug:23164917
Change-Id: I4c7136821315bcb05dfc42ffbc505a5d4f6109e6
(cherry picked from commit aae613d96134245af7c55976731a49fa59e77470)
core/java/android/net/NetworkCapabilities.java