History log of /frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
28011a418050bfd2744a147fc177bc30f747c26c 08-Mar-2018 dalyk <dalyk@google.com> Add BaseNetdEventCallback class that provides no-op implementations for INetdEventCallback.

Test: None
Bug: 71828272
Merged-In: I261015d0d3e7e4159bb514742a6c588bfd34e795
Merged-In: I3a701fc52641615bf197f980022a61518c7347f4
Merged-In: I1ed5ede74ca14718e6d4f8a9a8d57de6026c9e93
Merged-In: Ib0c4b69a24144d27f672ec716fb9a8f06987ce7d
Change-Id: I75e0620f82195f18befe9dc079492a8c69bb764b
(cherry picked from commit 985d89a6e0412a3b0e8b1519de8ebffdbf708d31)
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
1a6e667cb6e9211908d02eb21c50c006473376f9 27-Oct-2017 Ricky Wai <rickywai@google.com> Add Network security watchlist service

Network security watchlist service is a service to monitor all potential
harmful network traffic. By setting a network watchlist, any connections
that visit any site from watchlist will be logged.

Logs will be aggregated everyday and encoded using differential
privacy before exporting it from framework.

This feature is disabled now, run "setprop ro.network_watchlist_enabled true" to enable it.

All network events are handled in an async bg thread, it should not
cause any delay in netd. Also, it uses the hooks in enterprise network logging,
so we can run netd_benchmark to measure the impact to netd.

Here are the things not included in this CL:
- ConfigUpdater to get and set watchlist
- Differential privacy encoding logic and reporting
- CTS
- Memory and performance optimization for internal watchlist data structure

Test: manual - turn on the feature, hard code a watchlist xml, process
that visited that domain is being logged in sqlite.
Test: run netd_benchmark - seems no obvious performance change.
Test: bit FrameworksCoreTests:android.net.NetworkWatchlistManagerTests
Test: runtest frameworks-net
Test: runtest frameworks-services -p com.android.server.net.watchlist

Bug: 63908748

Change-Id: I09595178bac0070a867bc5e0501a7bf2c840e398
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
d36dd15d9bf9f65270b9bee16d6419b96b18bd86 15-Dec-2016 Esteban Talavera <etalavera@google.com> Make device wide DO features available if all users affiliated

Currently, those features are available on single user devices only
(since they collect privacy sensitive data device wide). Now making
them available as long as all users are affiliated.

It'll take a certain amount of time between user creation and the DPC
of that new user setting the appropriate affiliation ids. The DO won't
be able to access the logs during that time (and won't get any "logs
ready" callback). Once the affiliation ids are set, if they match,
logs become available again - this includes logs collected while the
user was being setup. Some logs might be lost though if the amount of
data exceeds the internal limit.

Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest frameworks-services

Test: cts-tradefed run cts -a armeabi-v7a --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest

Bug: 32326223

Change-Id: Idfe881dd6497d3ad2bead10addfd37b98b8a6e2b
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
3dcd39c14adbfd2a6854f6f8912d91406c20e57a 12-Jan-2017 Michal Karpinski <mkarpinski@google.com> [DPM] Improvements to the network logs batch finalization mechanism

The full batch will still be available to DPC if there were no
network logs pending.
Added some more debug logging to better investigate the issues.

Test: manual for both cases - pending batch was empty and non-empty,
with locally decreased timeout
Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testNetworkLoggingWithSingleUser

Bug: 34157435
Bug: 29748723
Change-Id: Iee229d74d4b0a06025b305a15687f336a0aa337e
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
e4dfd2d0028ff1c7088ec58a4d3eaf8f222311e6 16-Dec-2016 Michal Karpinski <mkarpinski@google.com> Initialize AtomicBoolean for NetworkLogger#mIsLoggingEnabled

Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testNetworkLoggingWithSingleUser
Bug: 29748723
Change-Id: Ib175f1d57093590b0080f32dc5f6c60ea50066e0
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
d8145f674334af203716b6a3219da6e9bd414b45 15-Dec-2016 Michal Karpinski <mkarpinski@google.com> Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean

Fixes a potential race condition - when enabling/disabling the logging
some events might have been lost.

Bug: 29748723
Change-Id: I8a436d525393b2314805e287eddcea26d4ec073b
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
a9ff206af26871695bfce54969428b8ad03e31e6 03-Nov-2016 Michal Karpinski <mkarpinski@google.com> [DPM] DO uses batch token to retrieve network logs, and can retrieve
the same batch many times

This allows DO to:
a) know that some logs were dropped (by trying with token and not
getting anything)
b) know how many logs were there in each batch (useful especially
for the dropped ones)
c) retry batch retrieval if it failed

Test: will be CTS tested once APIs unhidden
Bug: 29748723
Change-Id: I788359242e3b2a4cb638edb25e5db8b25646c29f
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
f77ee4f1b79929a77f603e5e879f3616ae464e3e 12-Oct-2016 Michal Karpinski <mkarpinski@google.com> [DPM] Management and retrieval of network logs

This CL follows up on ag/1530343 and adds:
1) Various network events.
2) Retrieval method in DPM and APIs in DeviceAdminReceiver.
3) Extension of NetworkLogger and it's NetworkLoggingHandler.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Bug: 29748723
Change-Id: I42a1a477e7c75c109a3982f809c22732b814e8b2
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java
dd9bb4fdd9f4b528734a7907d2bc92841ca648ab 12-Oct-2016 Michal Karpinski <mkarpinski@google.com> [DPM] DO can start network logging and listen for events

This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).

Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/NetworkLogger.java