Begin process of migrating WifiNetworkScoreCache.java from System Server
(//frameworks/opt/net/wifi/service/java/com/android/server/wifi/) to a
SystemApi. This CL is a straight copy and paste of
WifiNetworkScoreCache.java. Only new code is located in
WifiNetworkScoreCacheTest.java
Bug: b/33050254
Test: Unit tests added to cover most common use cases.
Change-Id: I7510420d293339ce7811fcf71a6efceb8d809c3a
NetworkPolicyManagerServiceTest had many tests there were @Suppressed
because they were obsolete and harder to fix using Easymocks.
This CL replaced EasyMock by Mockito and re-enabled most tests, although
some tests were removed because:
- It's underlying logic changed too much that.
- It would be hard to mock all external entities they interact with.
- They are covered by CTS tests.
Bug: 30764608
Test: runtest --path
frameworks/base/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java
(cherry picked from commit I53ff86fc9b64cb058846f1aefa244771630d9e1e)
Change-Id: Ia9cdb780cb0917477b310dc38d2e39731d6a7609
Functionfs requires MtpServer to write descriptors before the device can be
configured. This adds a new configure call that will occur only when
functions are changed (new argument added to updateUsbStateBroadcast for this)
and be called after sys.usb.config is changed but before the waitForState
call to ensure compatibility with configfs devices.
Bug: 30976142
Change-Id: I7e94a5847d3b19c0fd75139e1b15a3f2a1cea01d
Test: Manual
If permission review is enabled toggling bluetoth on or off
results in a user prompt to collect consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.
Also added a configuration resource which controls whether
permission review mode is enabled. By default it is not and
an OEM can change this via an overlay. For now we also keep
the old mechanism to toggle review mode via a build property
which is still used and will be removed when clients have
transitioned.
bug:28715749
Change-Id: I77bca2305f9d0f20034b2c8fc5b58e0565d5e617
Now that installd is throwing both SecurityException and
IllegalArgumentException, it's time that we turned all these
into InstallerException.
Also extend ServiceSpecificException to include the contained
errorCode value when printing.
Test: builds, boots, apps install/uninstall fine
Bug: 13758960, 30944031
Change-Id: Ic9c1e99ae87f4442402ef528bf352c7978572c85
Note that this is somewhat of a hack, until we properly
solve b/33440494.
Bug: 33440494
Bug: 33173166
Test: mma, hidl_test, hidl_test_java
Change-Id: I7db8eb11c8c9c624f2f5ed11bef6c32f155b5a76
Move last two straggling installd commands to Binder and destroy the
socket-based communication channel forever.
Test: builds, boots, apps install fine, pre-OTA dexopt works
Bug: 13758960, 30944031
Change-Id: I9afb9f71858febde34a94f53839b2986493b68a0
Defined a new IntDef in NetworkScoreManager named CacheUpdateFilter
with 3 values. Caches must be registered with a filter value and will
only receive updates based on their registered filter. Actual
filtering implementation will follow.
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 32912120
Change-Id: I3ce0bee171e6405176358479fa8a532fd5193824
Merged-In: I8940e0ed1a7bbcb5a81fb3b6a7fafe4fbbc33875