- Introduce network capability which allows apps to access network
despite power restrictions.
- Update NPMS to allow apps network access only if they are in a
higher proc_state or they are hodling the new network capability.
Bug: 177641226
Test: atest ./services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: Ia411ddef2e8cb77d371c22262d5b1e06a0396e29
Merged-In: Ia411ddef2e8cb77d371c22262d5b1e06a0396e29
App holding System Gallery role is allowed WRITE_MEDIA_* appops by
virtue of the role. This allows the System Gallery app write-access for
images and videos.
When app preferences are reset AppOpsService toggles the appops for
all apps. Only the appops mentioned in sOpDisableReset are not toggled.
Disable WRITE_MEDIA_* appops to reset, as the system gallery app loses
write access on images/videos.
Bug: 179133883
Test: Manual
Change-Id: I168221c641566a9f691ed7956c038206b114d802
Merged-In: I168221c641566a9f691ed7956c038206b114d802
For quickly checking an app's targetSdkVersion without building and
returning an entire ApplicationInfo object.
Bug: 164459559
Test: atest android.content.pm.cts.PackageManagerTest#testGetInfo
Merged-In: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
Change-Id: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
Add setHttpProxyConfiguration to the public API, and use
ConnectivityManager APIs from ActivityThread (instead of hidden APIs) to
get/set the proxy for an app process.
The default proxy is now initialized with getDefaultProxy instead of
getProxyForNetwork(null); this should not make a difference, as nothing
should have called bindProcessToNetwork at that point yet.
Bug: 174436414
Test: m; device boots
Merged-In: Ifb516194ecde1567cea4b6806946091cdcf2f015
Change-Id: I06b797eeae54609aecdc0afe1df4e6c602a17a69
* changes:
Check registering system default callback needs NETWORK_SETTINGS.
Move VPN code from ConnectivityService to VpnManagerService.
Add a skeleton VpnManagerService, and start it on boot.
Convert LockdownVpnTracker to NetworkCallbacks.
Minor fixes to VpnTransportInfo.
This is part of the work to support
a credential management app on
unmanaged devices.
Bug: 179180345
Test: atest android.appsecurity.cts.AppOpsTest
Merged-In: Ifd87b5e38f341db4b34bf9f61480e29e49148846
Change-Id: Ifd87b5e38f341db4b34bf9f61480e29e49148846
With this change, callers can set overrides for specific versions of an
app. The framework falls back to default version when the given version
doesn't have an override set.
Bug: 174043039
Test: atest FrameworksServicesTests:CompatConfigTest
Test: atest FrameworksServicesTests:PlatformCompatTest
Test: atest PlatformCompatGating
Change-Id: Ib5ff67e752a9c5ee94b6e1dd664d324ab5bf4542
ConnectivityService itself does not depend on mVpns or the Vpn
class any more. Most of this CL is simply moving code from one
class to another:
- Move the AIDL calls from IConnectivityManager to IVpnManager.
- Move the implementation from ConnectivityService to
the new VpnManagerService.
- Move the APIs from ConnectivityManager to VpnManager, but
temporarily maintain some shims in ConnectivityManager for the
moved calls so that existing callers do not have to be modified
in this CL.
- Update VpnService to call IVpnManager instead of
IConnectivityManager.
- Move the code that registers the VpnManager service from
ConnectivityFrameworkInitializer to SystemServiceRegistry.
Bug: 173331190
Test: atest HostsideVpnTests FrameworksNetTests CtsNetTestCases
Change-Id: I4911e2144df721a94fa00da9edf0dc372a7091c2
Put AppHibernationManager in the system service registry so that system
apps can actually use it.
Bug: 175829330
Test: builds
Change-Id: I62a5bf7319615c86fbffa9344047903910095f78
This patch also removes the functionality of returning
original subscriberId in eng build since it is not really useful.
Test: atest NetworkIdentityUtilsTest
Bug: 174123988
Change-Id: I721457e571aa9403a2200b3e4261b4895e4f7a3e
As connectivity services are planned to move to a separate module, move
the manager classes registration from SystemServiceRegistry to
ConnectivityServicesRegistrar, using the registerContextAwareService
APIs.
This follows patterns and naming in WifiFrameworkInitializer.
Bug: 171540887
Test: device boots, connectivity working
Change-Id: I62ced1275750c73f209bac8ec3a3204b95695b83
Proxy is planned to move to the connectivity module, so framework
classes like DevicePolicyManager cannot depend on its private symbols.
Replace usage of ProxyInfo.validate by the equivalent isValid method on
ProxyInfo.
Bug: 174436414
Test: atest DevicePolicyManagerTest#testGetProxyParameters
Change-Id: I6da49a34c9893d07ef7cbee6a7386c9258839467
In preparation for a refactor of the logic, add a test to verify proxy
spec building and validation in DevicePolicyManager#setGlobalProxy.
Bug: 174436414
Test: atest DevicePolicyManagerTest#testGetProxyParameters
Merged-In: Ic1c8bf6e8f5e79a7a1736af6cc1d50a7969fb9ad
Change-Id: Ic1c8bf6e8f5e79a7a1736af6cc1d50a7969fb9ad
This is called from a GC handler hook in BinderInternal, from the
finalizer thread. It's a call from an app process into system_server. On
some devices, we observed this call taking a long time, causing
TimeoutExceptions on the finalizer thread.
Since this work is not critical, and when the GC runs is anyway
unpredictable, make releaseSomeActivities() oneway instead.
Bug: 118997212
Test: TH
Change-Id: I6b06917493a09a2fba63502c4bd1a203c184a62c
Merged-In: I6b06917493a09a2fba63502c4bd1a203c184a62c
Per request from a partner, these APIs will not be restricted as they
are in use. This is conceptually a partial revert of change 5d123b6775.
NoNonSdkCheck: b/170729553
Bug: 171933273
Test: Treehugger
Change-Id: Ibb525e9a9e2fc90248b74f45f3cdcb0be7487c3a